Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[common]: Enable mounting of existing cm #147

Merged
merged 4 commits into from
Jan 6, 2025
Merged
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
2 changes: 1 addition & 1 deletion charts/common/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: common
description: "Bedag's common Helm chart to use for creating other Helm charts"
version: 12.1.0
version: 12.2.0
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
Expand Down
2 changes: 1 addition & 1 deletion charts/common/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# common

![Version: 12.1.0](https://img.shields.io/badge/Version-12.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 12.2.0](https://img.shields.io/badge/Version-12.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

Bedag's common Helm chart to use for creating other Helm charts

Expand Down
9 changes: 9 additions & 0 deletions charts/common/templates/_pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,19 @@ volumes:
{{- end }}
{{- else if eq .type "configMap" }}
configMap:
{{- if .items }}
name: {{ .name }}
items:
{{- range .items }}
- key: {{ .key }}
path: {{ .path }}
{{- end }}
{{- else }}
name: {{ template "library.name" $root }}-{{ .name }}
{{- if .defaultMode }}
defaultMode: {{ .defaultMode }}
{{- end }}
{{- end }}
{{- else if eq .type "persistentVolumeClaim" }}
persistentVolumeClaim:
claimName: {{ template "library.name" $root }}-{{ .claimNameSuffix }}
Expand Down
19 changes: 19 additions & 0 deletions charts/common/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,25 @@
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"items": {
"type": "array",
"properties": {
"key": {
"type": "string"
},
"path": {
"type": "string"
}
}
}
},
"required": [
"name",
"type"
Expand Down
7 changes: 6 additions & 1 deletion charts/common/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,14 @@ components:
# volumes is a list of volumes to be created as secret or configMap
volumes: []
# -- name of the volume
# - name: generic-name
# - name: generic-name or existing-cm-name
# -- type can either be "secret", "configMap", "persistentVolumeClaim", "emptyDir", "external" or "csi"
# type: "secret"
# START ONLY FOR CONFIGMAP
# items:
# - key: foo.txt
# path: opt/foo.txt
# END ONLY FOR CONFIGMAP
# START ONLY FOR SECRET or CONFIGMAP
# filePath is optional for specifying a filePath in the helm chart where the file is located.
# filePath: "files/xy.yml"
Expand Down
Loading