Skip to content

Commit

Permalink
Merge pull request #118 from adberger/master
Browse files Browse the repository at this point in the history
[common]: Make pullSecret configurable
  • Loading branch information
adberger authored Oct 27, 2023
2 parents 7327135 + 455a32b commit c51a6aa
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 7 deletions.
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: 10.7.0
version: 10.8.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: 10.7.0](https://img.shields.io/badge/Version-10.7.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 10.8.0](https://img.shields.io/badge/Version-10.8.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
6 changes: 5 additions & 1 deletion charts/common/templates/_pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,15 @@ tolerations:
{{- if $root.Values.secrets }}
{{- if $root.Values.secrets.data }}
{{- if $root.Values.secrets.data.registry }}
{{- if $root.Values.secrets.data.registry.pullSecret }}
{{- if $root.Values.secrets.data.registry.pullSecret.enabled }}
imagePullSecrets:
{{- if $root.Values.secrets.data.registry.pullSecret.name }}
- name: {{ $root.Values.secrets.data.registry.pullSecret.name }}
{{- else }}
- name: {{ template "library.name" $root }}-registry-pull-secret
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end -}}
14 changes: 13 additions & 1 deletion charts/common/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,19 @@
],
"properties": {
"pullSecret": {
"type": "boolean"
"type": "object",
"required": [
"enabled"
],
"properties": {
"enabled": {
"type": "boolean",
"default": false
},
"name": {
"type": "string"
}
}
}
}
}
Expand Down
10 changes: 7 additions & 3 deletions charts/common/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@ defaultTag: latest
# timezone to set as environment variable 'TZ' in each pod. Comment out for using default ("Europe/Zurich")
# timezone: "Europe/Zurich"

# secrets contains the pullSecret for the container registry to pull images. Set to 'true' to use a pullSecret.
# The secret name consists of the 'library.name' variable and the suffix '-registry-pull-secret'.
# secrets contains the pullSecret for the container registry to pull images. Set 'enabled' to 'true' to use a pullSecret.
# The secret name consists of the 'library.name' variable and the suffix '-registry-pull-secret' if 'name' is not specified.
secrets:
data:
registry:
pullSecret: false
pullSecret:
# enabled activates the imagePullSecrets in the pod spec
enabled: false
# name is optional to override the default name, if omitted uses '{{ template "library.name" $root }}-registry-pull-secret'
# name: example-foo

# start common.networkpolicy
# -- networkpolicy restricts all access between the pods. To configure allowed connections, go to components.*.networkpolicy.podSelector
Expand Down

0 comments on commit c51a6aa

Please sign in to comment.