Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions charts/sn-platform-slim/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
{{/* vim: set filetype=mustache: */}}

{{/*
Resolve busybox image fields with backward compatibility.
Prefer .Values.images.busybox and fall back to deprecated .Values.images.toolset.busybox.
*/}}
{{- define "pulsar.images.busybox.repository" -}}
{{- coalesce .Values.images.busybox.repository (dig "toolset" "busybox" "repository" "" .Values.images) -}}
{{- end -}}

{{- define "pulsar.images.busybox.tag" -}}
{{- coalesce .Values.images.busybox.tag (dig "toolset" "busybox" "tag" "" .Values.images) -}}
{{- end -}}

{{- define "pulsar.images.busybox.pullPolicy" -}}
{{- coalesce .Values.images.busybox.pullPolicy (dig "toolset" "busybox" "pullPolicy" "" .Values.images) -}}
{{- end -}}

{{/*
Resolve kubectl image fields with backward compatibility.
Prefer .Values.images.kubectl and fall back to deprecated .Values.images.toolset.kubectl.
*/}}
{{- define "pulsar.images.kubectl.repository" -}}
{{- coalesce .Values.images.kubectl.repository (dig "toolset" "kubectl" "repository" "" .Values.images) -}}
{{- end -}}

{{- define "pulsar.images.kubectl.tag" -}}
{{- coalesce .Values.images.kubectl.tag (dig "toolset" "kubectl" "tag" "" .Values.images) -}}
{{- end -}}

{{- define "pulsar.images.kubectl.pullPolicy" -}}
{{- coalesce .Values.images.kubectl.pullPolicy (dig "toolset" "kubectl" "pullPolicy" "" .Values.images) -}}
Comment thread
tuteng marked this conversation as resolved.
Outdated
Comment thread
tuteng marked this conversation as resolved.
Outdated
{{- end -}}

{{/*
pulsar home
*/}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ spec:
emptyDir: {}
initContainers:
- name: "kubectl"
image: "{{ .Values.images.toolset.kubectl.repository }}:{{ .Values.images.toolset.kubectl.tag }}"
imagePullPolicy: {{ .Values.images.toolset.kubectl.pullPolicy }}
image: "{{ include "pulsar.images.kubectl.repository" . }}:{{ include "pulsar.images.kubectl.tag" . }}"
imagePullPolicy: {{ include "pulsar.images.kubectl.pullPolicy" . }}
command: ["cp", "/opt/bitnami/kubectl/bin/kubectl", "/tmp/binaries"]
{{- if .Values.toolset.resources }}
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ spec:
{{- end }}
{{- if .Values.toolset.installBusybox }}
- name: busybox
image: "{{ .Values.images.toolset.busybox.repository }}:{{ .Values.images.toolset.busybox.tag }}"
imagePullPolicy: {{ .Values.images.toolset.busybox.pullPolicy }}
image: "{{ include "pulsar.images.busybox.repository" . }}:{{ include "pulsar.images.busybox.tag" . }}"
imagePullPolicy: {{ include "pulsar.images.busybox.pullPolicy" . }}
{{- if .Values.toolset.resources }}
resources:
{{ toYaml .Values.toolset.resources | indent 10 }}
Expand Down Expand Up @@ -192,4 +192,4 @@ spec:
{{- if .Values.toolset.serviceAccount.use }}
serviceAccountName: {{ include "pulsar.toolset.serviceAccount" . }}
{{- end }}
{{- end }}
{{- end }}
10 changes: 10 additions & 0 deletions charts/sn-platform-slim/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,24 @@ images:
repository: streamnative/sn-platform-slim
tag: "3.3.3.3"
pullPolicy: IfNotPresent
# deprecated: use images.busybox instead
busybox:
repository: busybox
tag: "1.36.1-uclibc"
pullPolicy: IfNotPresent
# deprecated: use images.kubectl instead
kubectl:
repository: docker-proxy.streamnative.io/bitnamilegacy/kubectl
tag: "1.28.3"
pullPolicy: IfNotPresent
busybox:
repository: busybox
tag: "1.36.1-uclibc"
pullPolicy: IfNotPresent
kubectl:
repository: docker-proxy.streamnative.io/bitnamilegacy/kubectl
tag: "1.28.3"
pullPolicy: IfNotPresent
Comment thread
tuteng marked this conversation as resolved.
Outdated
prometheus:
repository: quay.io/prometheus/prometheus
tag: "v2.43.0"
Expand Down
32 changes: 32 additions & 0 deletions charts/sn-platform/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
{{/* vim: set filetype=mustache: */}}

{{/*
Resolve busybox image fields with backward compatibility.
Prefer .Values.images.busybox and fall back to deprecated .Values.images.toolset.busybox.
*/}}
{{- define "pulsar.images.busybox.repository" -}}
{{- coalesce .Values.images.busybox.repository (dig "toolset" "busybox" "repository" "" .Values.images) -}}
Comment thread
tuteng marked this conversation as resolved.
Outdated
{{- end -}}

{{- define "pulsar.images.busybox.tag" -}}
{{- coalesce .Values.images.busybox.tag (dig "toolset" "busybox" "tag" "" .Values.images) -}}
{{- end -}}

{{- define "pulsar.images.busybox.pullPolicy" -}}
{{- coalesce .Values.images.busybox.pullPolicy (dig "toolset" "busybox" "pullPolicy" "" .Values.images) -}}
{{- end -}}

{{/*
Resolve kubectl image fields with backward compatibility.
Prefer .Values.images.kubectl and fall back to deprecated .Values.images.toolset.kubectl.
*/}}
{{- define "pulsar.images.kubectl.repository" -}}
{{- coalesce .Values.images.kubectl.repository (dig "toolset" "kubectl" "repository" "" .Values.images) -}}
{{- end -}}

{{- define "pulsar.images.kubectl.tag" -}}
{{- coalesce .Values.images.kubectl.tag (dig "toolset" "kubectl" "tag" "" .Values.images) -}}
{{- end -}}

{{- define "pulsar.images.kubectl.pullPolicy" -}}
{{- coalesce .Values.images.kubectl.pullPolicy (dig "toolset" "kubectl" "pullPolicy" "" .Values.images) -}}
Comment thread
tuteng marked this conversation as resolved.
Outdated
Comment thread
tuteng marked this conversation as resolved.
Outdated
{{- end -}}

{{/*
pulsar home
*/}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ spec:
emptyDir: {}
initContainers:
- name: "kubectl"
image: "{{ .Values.images.toolset.kubectl.repository }}:{{ .Values.images.toolset.kubectl.tag }}"
imagePullPolicy: {{ .Values.images.toolset.kubectl.pullPolicy }}
image: "{{ include "pulsar.images.kubectl.repository" . }}:{{ include "pulsar.images.kubectl.tag" . }}"
imagePullPolicy: {{ include "pulsar.images.kubectl.pullPolicy" . }}
command: ["cp", "/opt/bitnami/kubectl/bin/kubectl", "/tmp/binaries"]
{{- if .Values.toolset.resources }}
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ spec:
{{- end }}
{{- if .Values.toolset.installBusybox }}
- name: busybox
image: "{{ .Values.images.toolset.busybox.repository }}:{{ .Values.images.toolset.busybox.tag }}"
imagePullPolicy: {{ .Values.images.toolset.busybox.pullPolicy }}
image: "{{ include "pulsar.images.busybox.repository" . }}:{{ include "pulsar.images.busybox.tag" . }}"
imagePullPolicy: {{ include "pulsar.images.busybox.pullPolicy" . }}
{{- if .Values.toolset.resources }}
resources:
{{ toYaml .Values.toolset.resources | indent 10 }}
Expand Down
10 changes: 10 additions & 0 deletions charts/sn-platform/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,24 @@ images:
repository: bitnami/kafka
tag: "3.5.1"
pullPolicy: IfNotPresent
# deprecated: use images.busybox instead
busybox:
repository: busybox
tag: "1.36.1-uclibc"
pullPolicy: IfNotPresent
# deprecated: use images.kubectl instead
kubectl:
repository: docker-proxy.streamnative.io/bitnamilegacy/kubectl
tag: "1.28.3"
pullPolicy: IfNotPresent
busybox:
repository: busybox
tag: "1.36.1-uclibc"
pullPolicy: IfNotPresent
kubectl:
repository: docker-proxy.streamnative.io/bitnamilegacy/kubectl
tag: "1.28.3"
pullPolicy: IfNotPresent
Comment thread
tuteng marked this conversation as resolved.
Outdated
prometheus:
repository: quay.io/prometheus/prometheus
tag: "v2.43.0"
Expand Down
Loading