Skip to content

Commit

Permalink
Merge pull request #92 from camptocamp/release-name
Browse files Browse the repository at this point in the history
Add release name and some other metadata
  • Loading branch information
sbrunner authored May 3, 2023
2 parents ade325f + 7738b13 commit ab984df
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 5 deletions.
5 changes: 0 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ ci:
skip:
- copyright
- helm-lock
- helmlint
- ripsecrets

repos:
Expand Down Expand Up @@ -70,7 +69,3 @@ repos:
rev: v0.1.5
hooks:
- id: ripsecrets
- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.21
hooks:
- id: helmlint
11 changes: 11 additions & 0 deletions templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- if .Values.metadata }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.fullname" ( dict "root" $ "service" $.Values ) }}
{{- include "common.metadata" ( dict "root" $ "service" $.Values ) | nindent 2 }}
data:
CHART_NAME: {{ .Chart.Name }}
RELEASE_NAME: {{ .Release.Name }}
RELEASE_NAMESPACE: {{ .Release.Namespace }}
{{- end }}
19 changes: 19 additions & 0 deletions tests/expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,22 @@ data:
test: dG90bw==
test2: dG90bzI=
test3: "UW1GemFXTWdKU0Z6S0R4dWFXdytLVHAwYjNSdg=="
---
# Source: secrets/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: custom-secrets
labels:
helm.sh/chart: secrets
app.kubernetes.io/version: "1.0"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: secrets
app.kubernetes.io/instance: custom
app.kubernetes.io/component: main
annotations:
testAnnotation: annotation value
data:
CHART_NAME: secrets
RELEASE_NAME: custom
RELEASE_NAMESPACE: default
Empty file removed tests/mapserver-expected.yaml
Empty file.
3 changes: 3 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ secrets: {}
# type: basicAuth
# username: value
# password: value

# Generate a ConfigMap with CHART_NAME, RELEASE_NAME, RELEASE_NAMESPACE
metadata: true

0 comments on commit ab984df

Please sign in to comment.