Skip to content

Commit c84e382

Browse files
Techassisbernauer
andcommitted
chore: Remove CRD deployment by Helm
All CRDs are now maintained (created and patched) by the operator. They are no longer deplyoed by Helm and as such are removed from the Helm Chart templates. A YAML file is still checked in (extra/crds.yaml) to ensure diffs are visible and tracked by Git. Co-authored-by: Sebastian Bernauer <sebastian.bernauer@stackable.tech>
1 parent b73a094 commit c84e382

File tree

3 files changed

+893
-410
lines changed

3 files changed

+893
-410
lines changed

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ compile-chart: version crds config
105105

106106
chart-clean:
107107
rm -rf "deploy/helm/${OPERATOR_NAME}/configs"
108-
rm -rf "deploy/helm/${OPERATOR_NAME}/crds"
109108

110109
version:
111110
cat "deploy/helm/${OPERATOR_NAME}/Chart.yaml" | yq ".version = \"${VERSION}\" | .appVersion = \"${VERSION}\"" > "deploy/helm/${OPERATOR_NAME}/Chart.yaml.new"
@@ -117,9 +116,11 @@ config:
117116
cp -r deploy/config-spec/* "deploy/helm/${OPERATOR_NAME}/configs";\
118117
fi
119118

119+
# We generate a crds.yaml, so that the effect of code changes are visible.
120+
# The operator will take care of the CRD rollout itself.
120121
crds:
121-
mkdir -p deploy/helm/"${OPERATOR_NAME}"/crds
122-
cargo run --bin stackable-"${OPERATOR_NAME}" -- crd | yq eval '.metadata.annotations["helm.sh/resource-policy"]="keep"' - > "deploy/helm/${OPERATOR_NAME}/crds/crds.yaml"
122+
mkdir -p extra
123+
cargo run --bin stackable-"${OPERATOR_NAME}" -- crd > extra/crds.yaml
123124

124125
chart-lint: compile-chart
125126
docker run -it -v $(shell pwd):/build/helm-charts -w /build/helm-charts quay.io/helmpack/chart-testing:v3.5.0 ct lint --config deploy/helm/ct.yaml

0 commit comments

Comments
 (0)