Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(manifests): Separate the crds from the operator manifests #237

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

omar-mohamed-khallaf
Copy link

Trying to install the operator with flux kustomization pointing to the manifest directory results in error relating to crds being duplicated.

This commit separates the different manifests in different directories so they don't get combined.

Trying to install the operator with flux kustomization pointing to the
manifest directory results in error relating to crds being duplicated.

Signed-off-by: Omar Mohamed <[email protected]>
@Smana
Copy link

Smana commented Oct 6, 2024

That is indeed a good idea. I'm using Flux and I want to install the CRDs in a distinct step.

@omar-mohamed-khallaf
Copy link
Author

omar-mohamed-khallaf commented Oct 6, 2024

I think this might help you, or at least that's how I did it:

---
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
  name: dragonfly-operator
  namespace: storage-system
spec:
  interval: 168h
  url: https://github.com/dragonflydb/dragonfly-operator.git
  ref:
    branch: main
  ignore: |
    # exclude all
    /*
    # include charts directory
    !/charts/
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: dragonfly-operator
  namespace: storage-system
spec:
  interval: 1h
  chart:
    spec:
      chart: charts/dragonfly-operator
      sourceRef:
        kind: GitRepository
        name: dragonfly-operator
        namespace: storage-system

@Smana
Copy link

Smana commented Oct 6, 2024

thank you @omar-mohamed-khallaf , however you don't really separate the crds from the helm chart here?
Actually I want to use dragonfly as the k/v solution for my repo here, and I always deploy the crds first.
Maybe I can use the ignore statement anyway... I'm gonna give it a try

@omar-mohamed-khallaf
Copy link
Author

Yes, the crds are installed with the chart.

If it's necessary you may use Post Renderers to omit other resources at the step of installing crds.

Then use the chart again to install previously omitted resources at the appropriate step.

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.

3 participants