Migrating from Helm-Managed CRDs

Here's a step-by-step process to migrate from Helm-managed CRDs to self-managed CRDs for Humio Operator:

  1. First, backup your current CRDs:

    shell
    kubectl get crds -o yaml | grep -A1 "name: humio" > humio-crds-backup.yaml
  2. Extract the current CRDs:

    shell
    # Get the CRDs from the Helm chart
    helm pull humio-operator/humio-operator --untar
    cd humio-operator/crds
  3. Apply the CRDs manually:

    shell
    kubectl apply -f .
  4. Update your Helm installation:

    shell
    # Update the Helm release to skip CRDs
    helm upgrade humio-operator humio-operator/humio-operator --skip-crds

You can now verify your installation with some important safety checks:

  1. Verify existing resources:

    shell
    kubectl get humioclusters
    kubectl get humioexternalclusters
    kubectl get humioactions
    kubectl get humioaggregatealerts
    kubectl get humioalerts
    ...
  2. Verify the Humio Operator CRDs remain after the upgrade:

    shell
    kubectl get crds | grep humio

Some best practices include:

  • Perform the migration during a maintenance window

  • Have a rollback plan ready

  • Document the new CRD management process

  • Update CI/CD pipelines to manage CRDs separately

It's important to note the following points:

  • Existing Humio resources will not be affected

  • Future Helm upgrades won't modify CRDs

  • You'll need to manually manage CRD updates going forward