Skip to content

Add secret handling module

Jon Doveston requested to merge add-secret-module into main

What does this MR do?

Add the Secret module. This module defines the Secret struct which wraps a corev1.Secret. The struct adds CRUD methods to manipulate the secrets configuration annotations and data.

Parsing the annotations set by the user to configure the generator:

  • max-age
  • length
  • character-sets
  • keys
  • size
  • algorithm
  • lifespan
  • common-name
  • hosts

Managing the annotations used to track the state of the secret:

  • status
  • generated-at
  • regenerated-at
  • regenerated-count

There are also methods that track in-memory changes to the Secret and generate patch strings that can be used to patch the resource.

Author's Checklist

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • Ensure a release milestone is set.
  • MR title and description are up to date, accurate, and descriptive.
  • MR targeting the appropriate branch.
  • MR has a green pipeline on GitLab.com.
  • When ready for review, MR is labeled workflowready for review per the MR workflow.

Expected

  • Test plan indicating conditions for success has been posted and passes.
  • Documentation is created or updated.
  • Tests are added.

Related issues

Edited by Jon Doveston

Merge request reports