Open omar-mohamed-khallaf opened 3 months ago
That is indeed a good idea. I'm using Flux and I want to install the CRDs in a distinct step.
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
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
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.
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.