From 579473126daf1d872224822916306cc27a32fd25 Mon Sep 17 00:00:00 2001 From: Denis Policastro Date: Thu, 8 Aug 2024 10:37:32 -0300 Subject: [PATCH] fix: service account and pod annotations (#141) --- charts/zenrock-mpc/Chart.yaml | 2 +- charts/zenrock-mpc/README.md | 2 +- charts/zenrock-mpc/templates/_helpers.tpl | 7 ------- charts/zenrock-mpc/templates/deployment.yaml | 7 ++++--- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/charts/zenrock-mpc/Chart.yaml b/charts/zenrock-mpc/Chart.yaml index 1d51b0c5..6289894c 100644 --- a/charts/zenrock-mpc/Chart.yaml +++ b/charts/zenrock-mpc/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 +version: 0.1.1 maintainers: - name: 0xDones diff --git a/charts/zenrock-mpc/README.md b/charts/zenrock-mpc/README.md index f68197f2..97673cda 100644 --- a/charts/zenrock-mpc/README.md +++ b/charts/zenrock-mpc/README.md @@ -1,6 +1,6 @@ # zenrock-mpc -![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) A Helm chart for Kubernetes diff --git a/charts/zenrock-mpc/templates/_helpers.tpl b/charts/zenrock-mpc/templates/_helpers.tpl index 994fecd9..a18e1507 100644 --- a/charts/zenrock-mpc/templates/_helpers.tpl +++ b/charts/zenrock-mpc/templates/_helpers.tpl @@ -62,10 +62,3 @@ Create the name of the service account to use {{- default "default" .Values.serviceAccount.name }} {{- end }} {{- end }} - -{{/* -Some changes for upgrade docker image without any changes in helm -*/}} -{{- define "zenrock-mpc.annotations" -}} -releaseTime: {{ dateInZone "2006-01-02 15:04:05Z" (now) "UTC"| quote }} -{{- end }} diff --git a/charts/zenrock-mpc/templates/deployment.yaml b/charts/zenrock-mpc/templates/deployment.yaml index c8f40fbf..8793601b 100644 --- a/charts/zenrock-mpc/templates/deployment.yaml +++ b/charts/zenrock-mpc/templates/deployment.yaml @@ -24,11 +24,10 @@ spec: {{- include "zenrock-mpc.selectorLabels" . | nindent 6 }} template: metadata: + {{- with .Values.podAnnotations }} annotations: - {{- include "zenrock-mpc.annotations" . | nindent 8 }} - {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} - {{- end }} + {{- end }} labels: {{- include "zenrock-mpc.selectorLabels" . | nindent 8 }} {{- if .Values.commonLabels }} @@ -41,6 +40,8 @@ spec: {{- end }} {{- if .Values.serviceAccount.name }} serviceAccountName: {{ .Values.serviceAccount.name }} + {{- else }} + serviceAccountName: {{ include "zenrock-mpc.fullname" . }} {{- end }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }}