Skip to content

Commit

Permalink
fix: Use HELM 3 best practices for CRDs
Browse files Browse the repository at this point in the history
Current logic uses helm2 style conditions for CRDs which may or may not be installed prior to use when included in a subchart or as part of CD. Simply removing the if condition from the CRD sync step in the make file allows the helm3 supported method of opt out ``--skip-crds``

Signed-off-by: Ryan Faircloth <[email protected]>
  • Loading branch information
ryanfaircloth committed Jul 12, 2022
1 parent 2403ac5 commit 4371671
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,7 @@ all: generate check build
generate:
$(CONTROLLER_GEN) object paths="./..."
make manifests
# sync crd generated to helm-chart
echo '{{- if .Values.crd.create }}' > charts/zookeeper-operator/templates/zookeeper.pravega.io_zookeeperclusters_crd.yaml
cat config/crd/bases/zookeeper.pravega.io_zookeeperclusters.yaml >> charts/zookeeper-operator/templates/zookeeper.pravega.io_zookeeperclusters_crd.yaml
echo '{{- end }}' >> charts/zookeeper-operator/templates/zookeeper.pravega.io_zookeeperclusters_crd.yaml
cp -f config/crd/bases/zookeeper.pravega.io_zookeeperclusters.yaml charts/zookeeper-operator/templates/zookeeper.pravega.io_zookeeperclusters_crd.yaml


build: test build-go build-image
Expand Down
1 change: 1 addition & 0 deletions charts/zookeeper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ where:
- **[RELEASE_NAME]** is the release name for the zookeeper chart.
- **[CLUSTER_NAME]** is the name of the zookeeper cluster so created. (If [RELEASE_NAME] contains the string `zookeeper`, `[CLUSTER_NAME] = [RELEASE_NAME]`, else `[CLUSTER_NAME] = [RELEASE_NAME]-zookeeper`. The [CLUSTER_NAME] can however be overridden by providing `--set fullnameOverride=[CLUSTER_NAME]` along with the helm install command)
- **[VERSION]** can be any stable release version for zookeeper from 0.2.8 onwards.
- `--skip-crds` may be used to ommit CRDs when seperatly installed and the current user context does not have required privlidges to install [best practices](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#method-1-let-helm-do-it-for-you)

This command deploys zookeeper on the Kubernetes cluster in its default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.

Expand Down

0 comments on commit 4371671

Please sign in to comment.