Skip to content

Commit

Permalink
Merge pull request #2 from kool-dev/annotations
Browse files Browse the repository at this point in the history
Adding Support to Annotations | generic 1.1.0
  • Loading branch information
dbpolito authored Oct 2, 2020
2 parents 518126a + 85a2e2f commit 46bb714
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/generic/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: v2
name: generic
description: Generic Chart
version: 1.0.1
version: 1.1.0
3 changes: 3 additions & 0 deletions charts/generic/templates/configMaps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ metadata:
name: "{{ $fullName }}-{{ .name | default "default" }}"
{{- end }}
labels: {{ $labels | nindent 4 }}
{{- with .annotations }}
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
data:
{{- range $key, $value := .data }}
{{ $key }}: {{ $value }}
Expand Down
3 changes: 3 additions & 0 deletions charts/generic/templates/cronjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ metadata:
name: "{{ $fullName }}-{{ $cronjob.name | default $cronjobName }}"
{{- end }}
labels: {{ include "generic.labels" $ | nindent 4 }}
{{- with .annotations }}
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with $cronjob.concurrencyPolicy }}
concurrencyPolicy: {{ . }}
Expand Down
3 changes: 3 additions & 0 deletions charts/generic/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ kind: Deployment
metadata:
name: {{ $fullName }}
labels: {{ include "generic.labels" . | nindent 4 }}
{{- with .annotations }}
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
Expand Down
3 changes: 3 additions & 0 deletions charts/generic/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ kind: HorizontalPodAutoscaler
metadata:
name: {{ include "generic.fullname" . }}
labels: {{ include "generic.labels" . | nindent 4 }}
{{- with .annotations }}
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
spec:
scaleTargetRef:
apiVersion: apps/v1
Expand Down
3 changes: 3 additions & 0 deletions charts/generic/templates/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ metadata:
{{- end }}
labels: {{ include "generic.labels" $ | nindent 4 }}
annotations:
{{- with .annotations }}
{{ toYaml . | indent 4 }}
{{- end }}
{{- with $job.hook }}
"helm.sh/hook": {{ . }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions charts/generic/templates/pvcs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ metadata:
name: "{{ $fullName }}-{{ .name | default "default" }}"
{{- end }}
labels: {{ $labels | nindent 4 }}
{{- with .annotations }}
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .className }}
storageClassName: {{ .className }}
Expand Down
3 changes: 3 additions & 0 deletions charts/generic/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ metadata:
name: "{{ $fullName }}-{{ .name | default "default" }}"
{{- end }}
labels: {{ $labels | nindent 4 }}
{{- with .annotations }}
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
type: Opaque
data:
{{- range $key, $value := $secret.data }}
Expand Down
3 changes: 3 additions & 0 deletions charts/generic/templates/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ metadata:
name: "{{ $fullName }}-{{ $serviceName | default "default" }}"
{{- end }}
labels: {{ $labels | nindent 4 }}
{{- with .annotations }}
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ $service.type }}
ports:
Expand Down

0 comments on commit 46bb714

Please sign in to comment.