hashicorp / vault-secrets-operator

The Vault Secrets Operator (VSO) allows Pods to consume Vault secrets natively from Kubernetes Secrets.
https://hashicorp.com
Other
471 stars 102 forks source link

Helm: add support for auto upgrading CRDs #789

Closed benashz closed 5 months ago

benashz commented 5 months ago

Introduces a pre-upgrade hook that will upgrade/create any of the CRD manifests that are bundled in the vso docker image.

Other fixes:

Overview of the approach:

Out of scope:

Update to the Helm values:

# Configure the behaviour of Helm hooks.
hooks:
  # Resources common to all hooks.
  resources:
    limits:
      cpu: 500m
      memory: 128Mi
    requests:
      cpu: 10m
      memory: 64Mi
  # Configure the Helm pre-upgrade hook that handles custom resource definition (CRD) upgrades.
  upgradeCRDs:
    # Set to true to automatically upgrade the CRDs.
    # Disabling this will require manual intervention to upgrade the CRDs, so it is recommended to
    # always leave it enabled.
    # @type: boolean
    enabled: true

    # Limit the number of retries for the CRD upgrade.
    # @type: integer
    backoffLimit:  5

    # Set the timeout for the CRD upgrade. The operation should typically take less than 5s
    # to complete.
    # @type: string
    executionTimeout: 30s