Added template annotations

This commit is contained in:
2023-11-08 09:38:09 +01:00
parent fb87d34c96
commit dc6b288dc9
10 changed files with 24 additions and 7 deletions
+3 -5
View File
@@ -2,7 +2,7 @@ apiVersion: v2
name: template name: template
description: A Helm library chart containing common templates, keeping application templates short description: A Helm library chart containing common templates, keeping application templates short
type: library type: library
version: 0.2.3 version: 0.2.4
maintainers: maintainers:
- name: Jim Martens - name: Jim Martens
url: https://2martens.de url: https://2martens.de
@@ -10,10 +10,8 @@ sources:
- https://git.2martens.de/2martens/cloud-configuration - https://git.2martens.de/2martens/cloud-configuration
annotations: annotations:
artifacthub.io/changes: | artifacthub.io/changes: |
- kind: fixed - kind: added
description: Reverted path to secret for vault description: Added "template.annotations"
- kind: fixed
description: Changed namespace for vault secrets app to release namespace
artifacthub.io/signKey: | artifacthub.io/signKey: |
fingerprint: F0F153B65BAD467201D7544E47393ABD1F96B7C8 fingerprint: F0F153B65BAD467201D7544E47393ABD1F96B7C8
url: https://mafiasi.de/pks/key/47393ABD1F96B7C8.asc url: https://mafiasi.de/pks/key/47393ABD1F96B7C8.asc
+3
View File
@@ -5,6 +5,8 @@ metadata:
name: {{ include "template.fullname" . }} name: {{ include "template.fullname" . }}
labels: labels:
{{- include "template.labels" . | nindent 4 }} {{- include "template.labels" . | nindent 4 }}
annotations:
{{- include "template.annotations" . | nindent 4 }}
spec: spec:
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
{{- if not .Values.autoscaling.enabled }} {{- if not .Values.autoscaling.enabled }}
@@ -24,6 +26,7 @@ spec:
{{- with .Values.podAnnotations }} {{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
{{- include "template.annotations" . | nindent 8 }}
labels: labels:
{{- include "template.selectorLabels" . | nindent 8 }} {{- include "template.selectorLabels" . | nindent 8 }}
spec: spec:
+4
View File
@@ -41,6 +41,10 @@ app.kubernetes.io/version: {{ .Values.image.tag | default .Chart.AppVersion | qu
{{- end }} {{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }} {{- end }}
{{- define "template.annotations" -}}
meta.helm.sh/release-name: {{ .Release.Name }}
meta.helm.sh/release-namespace: {{ .Release.Namespace }}
{{- end }}
{{/* {{/*
Selector labels Selector labels
+2
View File
@@ -6,6 +6,8 @@ metadata:
name: {{ include "template.fullname" . }} name: {{ include "template.fullname" . }}
labels: labels:
{{- include "template.labels" . | nindent 4 }} {{- include "template.labels" . | nindent 4 }}
annotations:
{{- include "template.annotations" . | nindent 4 }}
spec: spec:
scaleTargetRef: scaleTargetRef:
apiVersion: apps/v1 apiVersion: apps/v1
+2 -1
View File
@@ -8,10 +8,11 @@ metadata:
name: {{ $fullName }} name: {{ $fullName }}
labels: labels:
{{- include "template.labels" . | nindent 4 }} {{- include "template.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations: annotations:
{{- with .Values.ingress.annotations }}
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
{{- include "template.annotations" . | nindent 4 }}
spec: spec:
{{- if .Values.ingress.className }} {{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className }} ingressClassName: {{ .Values.ingress.className }}
+2
View File
@@ -8,6 +8,8 @@ metadata:
labels: labels:
{{- include "template.labels" . | nindent 4 }} {{- include "template.labels" . | nindent 4 }}
release: {{ .Values.prometheus.releaseName | quote | default "prometheus" }} release: {{ .Values.prometheus.releaseName | quote | default "prometheus" }}
annotations:
{{- include "template.annotations" . | nindent 4 }}
spec: spec:
podMetricsEndpoints: podMetricsEndpoints:
- port: "{{ .Values.application.actuatorPort }}" - port: "{{ .Values.application.actuatorPort }}"
+2
View File
@@ -6,6 +6,8 @@ metadata:
name: {{ include "template.fullname" . }} name: {{ include "template.fullname" . }}
labels: labels:
{{- include "template.labels" . | nindent 4 }} {{- include "template.labels" . | nindent 4 }}
annotations:
{{- include "template.annotations" . | nindent 4 }}
data: data:
{{- range $key, $value := .Values.secrets }} {{- range $key, $value := .Values.secrets }}
{{ $key }}: {{ $value | b64enc }} {{ $key }}: {{ $value | b64enc }}
+2
View File
@@ -5,6 +5,8 @@ metadata:
name: {{ include "template.fullname" . }} name: {{ include "template.fullname" . }}
labels: labels:
{{- include "template.labels" . | nindent 4 }} {{- include "template.labels" . | nindent 4 }}
annotations:
{{- include "template.annotations" . | nindent 4 }}
spec: spec:
type: {{ .Values.service.type }} type: {{ .Values.service.type }}
ports: ports:
+2 -1
View File
@@ -6,9 +6,10 @@ metadata:
name: {{ include "template.serviceAccountName" . }} name: {{ include "template.serviceAccountName" . }}
labels: labels:
{{- include "template.labels" . | nindent 4 }} {{- include "template.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations: annotations:
{{- with .Values.serviceAccount.annotations }}
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
{{- include "template.annotations" . | nindent 4 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
@@ -7,6 +7,8 @@ metadata:
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
{{- include "template.labels" . | nindent 4 }} {{- include "template.labels" . | nindent 4 }}
annotations:
{{- include "template.annotations" . | nindent 4 }}
spec: spec:
appName: {{ .Values.vault.applicationName }} appName: {{ .Values.vault.applicationName }}
hcpAuthRef: {{ .Values.vault.operatorNamespace | default "vault-secrets-operator-system" }}/hcp-auth hcpAuthRef: {{ .Values.vault.operatorNamespace | default "vault-secrets-operator-system" }}/hcp-auth