Skip to content

Conversation

benashz
Copy link
Collaborator

@benashz benashz commented May 30, 2024

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

Other fixes:

  • make the component label test more reliable by checking all documents individually.
  • configure a backoff in the pre-delete "pdcc" Job.

Overview of the approach:

  • Extend VSO to support upgrading the CRDs directly
  • Include the CRD manifests in the VSO image
  • Extend the Helm chart to deploy a pre-upgrade hook that invokes the upgrade process

Out of scope:

  • support for rollback/downgrades.
  • removal of obsolete CRDs

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

@benashz benashz force-pushed the VAULT-27560/helm-auto-upgrade-CRDs branch 2 times, most recently from 34c2c70 to 3cf7330 Compare May 30, 2024 17:16
Introduces a pre-upgrade hook that will upgrade/create any of the CRD manifests that are bundled in the vso docker image.

Other fixes:
- make the component label test more reliable by checking all documents individually.
- configure a backoff in the pre-delete "pdcc" Job.
@benashz benashz force-pushed the VAULT-27560/helm-auto-upgrade-CRDs branch 2 times, most recently from a18272c to 425f2bc Compare May 30, 2024 18:00
@benashz benashz force-pushed the VAULT-27560/helm-auto-upgrade-CRDs branch from 425f2bc to 193d7b9 Compare May 30, 2024 18:05
@benashz benashz force-pushed the VAULT-27560/helm-auto-upgrade-CRDs branch from 03fdd08 to 879d271 Compare May 30, 2024 19:00
@benashz benashz marked this pull request as ready for review May 30, 2024 19:11
@benashz benashz requested a review from a team as a code owner May 30, 2024 19:11
@benashz benashz requested review from tvoran and thyton May 30, 2024 19:12
@benashz benashz modified the milestone: v0.8.0 May 30, 2024
@benashz benashz force-pushed the VAULT-27560/helm-auto-upgrade-CRDs branch from 0be91a1 to 988ef72 Compare May 31, 2024 17:37
@benashz benashz force-pushed the VAULT-27560/helm-auto-upgrade-CRDs branch from 988ef72 to 44d097c Compare May 31, 2024 18:05
Copy link
Member

@tvoran tvoran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few minor questions, and I'm wondering if we need to check the Status block on upgrades, but on the whole 👍

@benashz benashz force-pushed the VAULT-27560/helm-auto-upgrade-CRDs branch from f5ec297 to 09c51a7 Compare June 3, 2024 23:01
Tests:
- make expected upgrades dynamic based in coming CRDs
@benashz benashz force-pushed the VAULT-27560/helm-auto-upgrade-CRDs branch from 09c51a7 to d088232 Compare June 3, 2024 23:06
@benashz benashz merged commit b478843 into main Jun 4, 2024
@benashz benashz deleted the VAULT-27560/helm-auto-upgrade-CRDs branch June 4, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants