Skip to content

Commit

Permalink
Removed the namespace in Helm template (#1806)
Browse files Browse the repository at this point in the history
Co-authored-by: Vincent Hou <shou73@bloomberg.net>
  • Loading branch information
knative-prow-robot and houshengbo authored May 22, 2024
1 parent d123204 commit e9cbef6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hack/generate-helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,15 @@ mkdir -p ${TARGET_DIR}/templates
# Generate the template based on the yaml files under config
echo "" > ${TARGET_DIR}/templates/operator.yaml
for filename in config/*.yaml; do
if [[ $filename == *namespace.yaml ]]; then
continue
fi
cat $filename >> ${TARGET_DIR}/templates/operator.yaml
echo -e "\n---" >> ${TARGET_DIR}/templates/operator.yaml
done

# Replace the namespace and images with the helm parameters
sed -i.bak 's/namespace: knative-operator/namespace: "{{ .Release.Namespace }}"/g' ${TARGET_DIR}/templates/operator.yaml
sed -i.bak 's/image: ko:\/\/knative.dev\/operator\/cmd\/operator/image: "{{ .Values.knative_operator.knative_operator.image }}:{{ .Values.knative_operator.knative_operator.tag }}"/g' ${TARGET_DIR}/templates/operator.yaml
sed -i.bak 's/image: ko:\/\/knative.dev\/operator\/cmd\/webhook/image: "{{ .Values.knative_operator.operator_webhook.image }}:{{ .Values.knative_operator.operator_webhook.tag }}"/g' ${TARGET_DIR}/templates/operator.yaml
sed -i.bak 's/operator.knative.dev\/release: devel/operator.knative.dev\/release: "v{{ .Chart.Version }}"/g' ${TARGET_DIR}/templates/operator.yaml
Expand Down

0 comments on commit e9cbef6

Please sign in to comment.