Skip to content

Commit

Permalink
chore: generate operator from helm template
Browse files Browse the repository at this point in the history
Signed-off-by: Abhinandan Purkait <[email protected]>
  • Loading branch information
Abhinandan-Purkait committed Jul 26, 2024
1 parent 279bc1a commit 5b13ad9
Show file tree
Hide file tree
Showing 5 changed files with 1,717 additions and 961 deletions.
2 changes: 1 addition & 1 deletion buildscripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ done
# Done!
echo
echo "==> Results:"
ls -hl bin/"${PNAME}"/
ls -hl bin/"${PNAME}"/
4 changes: 2 additions & 2 deletions buildscripts/generate-manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ HELM_CHART_DIR="$ROOT_DIR/deploy/helm/charts/"
CRD_CHART_TEMPLATE_DIR="$HELM_CHART_DIR/charts/crds/templates"
CONTROLLER_GEN=$(which controller-gen)
RELEASE_NAME="openebs"
RELEASE_NAMESPACE="openebs"
RELEASE_NAMESPACE="kube-system"

if [ "$CONTROLLER_GEN" = "" ]; then
echo "ERROR: failed to get controller-gen, Please run make bootstrap to install it";
Expand All @@ -32,4 +32,4 @@ for FILE in "$DEPLOY_YAML_DIR"/zfs.openebs.io_*; do
awk 'BEGIN { print "{{- if .Values.zfsLocalPv.enabled -}}" } { print } END { if (NR > 0) print "{{- end -}}" }' "$TARGET_FILE" > "$TARGET_FILE.tmp" && mv "$TARGET_FILE.tmp" "$TARGET_FILE"
done

helm template $RELEASE_NAME $HELM_CHART_DIR -n $RELEASE_NAME > $DEPLOY_YAML_DIR/../zfs-operator.yaml
helm template $RELEASE_NAME $HELM_CHART_DIR -n $RELEASE_NAMESPACE --set analytics.installerType="zfs-operator" > $DEPLOY_YAML_DIR/../zfs-operator.yaml
2 changes: 1 addition & 1 deletion deploy/helm/charts/templates/zfs-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ spec:
fieldRef:
fieldPath: metadata.namespace
- name: OPENEBS_IO_INSTALLER_TYPE
value: "zfs-localpv-helm"
value: "{{ .Values.analytics.installerType }}"
- name: OPENEBS_IO_ENABLE_ANALYTICS
value: "{{ .Values.analytics.enabled }}"
args :
Expand Down
1 change: 1 addition & 0 deletions deploy/helm/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ serviceAccount:

analytics:
enabled: true
installerType: "zfs-localpv-helm"
zfs:
# If you use a non-standard path to the zfs binary, specify it here
# bin: /run/current-system/sw/bin/zfs
Expand Down
Loading

0 comments on commit 5b13ad9

Please sign in to comment.