Skip to content

Commit

Permalink
Add env to Helm Chart deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Mueller committed Sep 13, 2023
1 parent 721dfe2 commit ae0c085
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ ifeq (,$(shell which opm 2>/dev/null))
set -e ;\
mkdir -p $(dir $(OPM)) ;\
OS=$(shell go env GOOS) && ARCH=$(shell go env GOARCH) && \
curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v1.15.1/$${OS}-$${ARCH}-opm ;\
curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v1.23.2/$${OS}-$${ARCH}-opm ;\
chmod +x $(OPM) ;\
}
else
Expand Down
6 changes: 4 additions & 2 deletions config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- manager.yaml

Expand All @@ -8,8 +11,7 @@ configMapGenerator:
- files:
- controller_manager_config.yaml
name: manager-config
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

images:
- name: controller
newName: ghcr.io/grafana-operator/grafana-operator
Expand Down
4 changes: 4 additions & 0 deletions deploy/helm/grafana-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
{{- if .Values.env.grafanaImage }}
- name: RELATED_IMAGE_GRAFANA
value: {{ .Values.env.grafanaImage }}
{{- end }}
- name: WATCH_NAMESPACE
{{- if and .Values.namespaceScope (eq .Values.watchNamespaces "") }}
value: {{ .Release.Namespace }}
Expand Down
4 changes: 4 additions & 0 deletions deploy/helm/grafana-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ image:
# -- image pull secrets
imagePullSecrets: []

env:
# -- grafana image, e.g. docker.io/grafana/grafana:9.1.6
grafanaImage: ""

nameOverride: ""
fullnameOverride: ""

Expand Down

0 comments on commit ae0c085

Please sign in to comment.