Skip to content

Commit a40e13b

Browse files
authored
fix: Add capability to skip crd installation during helm install (#625)
Signed-off-by: Esten Rye <esten.rye@ryezone.com>
1 parent 918a697 commit a40e13b

File tree

5 files changed

+9
-15
lines changed

5 files changed

+9
-15
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ config/rendered/release.yaml
22
.tar.gz
33
config/manager/manager.yaml
44
config/manager/kustomization.yaml
5+
readme-generator-for-helm
56
tmpcrd.yaml
67
schemas
78
.vscode

Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ set-helm-overlay:
245245
${eval KUSTOMIZE_OVERLAY = HELM}
246246

247247
helm-package: set-helm-overlay generate release-manifests helm
248+
mkdir -p chart/open-feature-operator/templates/crds
249+
mv chart/open-feature-operator/templates/*customresourcedefinition* chart/open-feature-operator/templates/crds
248250
$(HELM) package --version $(CHART_VERSION) chart/open-feature-operator
249251
mkdir -p charts && mv open-feature-operator-*.tgz charts
250252
$(HELM) repo index --url https://open-feature.github.io/open-feature-operator/charts charts
+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# ignore generated templates
22
templates/*.yaml
3+
templates/crds/*.yaml
34
# templates/namespace.yaml is not generated, it's a special case
45
!templates/namespace.yaml

chart/open-feature-operator/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ The command removes all the Kubernetes components associated with the chart and
137137
| `controllerManager.kubeRbacProxy.resources.requests.cpu` | Sets cpu resource requests for kube-rbac-proxy. | `5m` |
138138
| `controllerManager.kubeRbacProxy.resources.requests.memory` | Sets memory resource requests for kube-rbac-proxy. | `64Mi` |
139139
| `controllerManager.manager.image.repository` | Sets the image for the operator. | `ghcr.io/open-feature/open-feature-operator` |
140-
| `controllerManager.manager.image.tag` | Sets the version tag for the operator. | `v0.5.3` |
140+
| `controllerManager.manager.image.tag` | Sets the version tag for the operator. | `v0.5.4` |
141141
| `controllerManager.manager.resources.limits.cpu` | Sets cpu resource limits for operator. | `500m` |
142142
| `controllerManager.manager.resources.limits.memory` | Sets memory resource limits for operator. | `128Mi` |
143143
| `controllerManager.manager.resources.requests.cpu` | Sets cpu resource requests for operator. | `10m` |

docs/installation.md

+4-14
Original file line numberDiff line numberDiff line change
@@ -40,26 +40,16 @@ If you are upgrading OFO to `v0.5.3` or lower, `flagd-proxy` (if present) won't
4040
CRDs are not upgraded automatically with helm (https://helm.sh/docs/chart_best_practices/custom_resource_definitions/).
4141
OpenFeature Operator's CRDs are templated, and can be updated apart from the operator itself by using helm's template functionality and piping the output to `kubectl`:
4242

43-
```console
44-
helm template openfeature/open-feature-operator -s templates/{CRD} | kubectl apply -f -
45-
```
46-
47-
For the `featureflags.core.openfeature.dev` CRD:
43+
To install the CRDs:
4844

4945
```sh
50-
helm template openfeature/open-feature-operator -s templates/apiextensions.k8s.io_v1_customresourcedefinition_featureflags.core.openfeature.dev.yaml | kubectl apply -f -
51-
```
52-
53-
For the `featureflagsources.core.openfeature.dev` CRD:
54-
55-
```sh
56-
helm template openfeature/open-feature-operator -s templates/apiextensions.k8s.io_v1_customresourcedefinition_featureflagsources.core.openfeature.dev.yaml | kubectl apply -f -
46+
helm template openfeature/open-feature-operator -s "templates/crds/*.yaml" | kubectl apply -f -
5747
```
5848

5949
Keep in mind, you can set values as usual during this process:
6050

61-
```console
62-
helm template openfeature/open-feature-operator -s templates/{CRD} --set defaultNamespace=myns | kubectl apply -f -
51+
```sh
52+
helm template openfeature/open-feature-operator -s "templates/crds/*.yaml" --set defaultNamespace=myns | kubectl apply -f -
6353
```
6454

6555
### Uninstall

0 commit comments

Comments
 (0)