Files
fission-src/charts/fission-all/templates/analytics/post-upgrade-job.yaml
T
Sanket SudakeandGitHub 38ec6528e3 Duplicate Job names in helm chart templates (#3150)
Fixes #3127

Update job names in helm chart templates to avoid conflicts.

* Change the `metadata.name` field in `charts/fission-all/templates/analytics/post-install-job.yaml` to `{{ template "fullname" . }}-{{ .Chart.Version }}-post-install`.
* Change the `metadata.name` field in `charts/fission-all/templates/analytics/post-upgrade-job.yaml` to `{{ template "fullname" . }}-{{ .Chart.Version }}-post-upgrade`.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/fission/fission/issues/3127?shareId=XXXX-XXXX-XXXX-XXXX).
2025-01-22 18:12:14 +05:30

51 lines
1.8 KiB
YAML

{{- if .Values.analytics }}
apiVersion: batch/v1
kind: Job
metadata:
name: {{ template "fullname" . }}-{{ .Chart.Version }}-post-upgrade
labels:
# The "release" convention makes it easy to tie a release to all of the
# Kubernetes resources that were created as part of that release.
release: {{ .Release.Name }}
# This makes it easy to audit chart usage.
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
app: {{ template "name" . }}
annotations:
# This is what defines this resource as a hook. Without this line, the
# job is considered part of the release.
"helm.sh/hook": post-upgrade
"helm.sh/hook-delete-policy": hook-succeeded
spec:
template:
metadata:
name: {{ template "fullname" . }}
labels:
release: {{ .Release.Name }}
app: {{ template "name" . }}
annotations:
{{- if .Values.enableIstio }}
"sidecar.istio.io/inject": "false"
{{- end }}
spec:
restartPolicy: Never
containers:
- name: post-upgrade-job
image: {{ include "reporterImage" . | quote }}
imagePullPolicy: {{ .Values.pullPolicy }}
command: [ "/reporter" ]
args: ["event", "-c", "fission-use", "-a", "helm-post-upgrade", "-l", "{{ .Chart.Name }}-{{ .Chart.Version }}"]
env:
- name: GA_TRACKING_ID
value: "{{ .Values.gaTrackingID }}"
{{- if .Values.terminationMessagePath }}
terminationMessagePath: {{ .Values.terminationMessagePath }}
{{- end }}
{{- if .Values.terminationMessagePolicy }}
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}