Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
26 changes: 26 additions & 0 deletions step-certificates/examples/extra-objects/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
podExtraAnnotations:
prometheus.io/path: /metrics
prometheus.io/port: "9100"
prometheus.io/scrape: "true"

extraObjects:
- |
apiVersion: monitoring.googleapis.com/v1
kind: PodMonitoring
metadata:
name: {{ .Release.Name }}-podmonitoring
spec:
selector:
matchLabels:
app.kubernetes.io/name: {{ include "step-certificates.name" . }}
endpoints:
- port: 9090
path: /metrics
interval: 30s
targetLabels:
metadata:
- container
- pod
- node
- top_level_controller_name
- top_level_controller_type
11 changes: 11 additions & 0 deletions step-certificates/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ Create CA DNS
{{- end -}}
{{- end -}}

{{/*
Renders a complete tree, including values that contains template.
*/}}
{{- define "step-certificates.render" -}}
{{- if typeIs "string" .value }}
{{- tpl .value .context }}
{{ else }}
{{- tpl (.value | toYaml) .context }}
{{- end }}
{{- end -}}

{{/*
Linked CA variables
*/}}
Expand Down
5 changes: 4 additions & 1 deletion step-certificates/templates/ca.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ spec:
{{- with .Values.podExtraLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.inject.enabled }}
annotations:
{{- with .Values.podExtraAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.inject.enabled }}
checksum/config: {{ include (print $.Template.BasePath "/configmaps.yaml") . | sha256sum }}
checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
{{- end }}
Expand Down
4 changes: 4 additions & 0 deletions step-certificates/templates/extraobjects.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{- range .Values.extraObjects }}
---
{{ include "step-certificates.render" (dict "value" . "context" $) }}
{{- end }}
6 changes: 6 additions & 0 deletions step-certificates/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ bootstrap:
# Extra labels
podExtraLabels: {}

# Extra annotations
podExtraAnnotations: {}

# Extra objects to deploy
extraObjects: []

# inject contains values to be injected into config maps and secrets
inject:
enabled: false
Expand Down