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

Allow specifying dns_alt_names for puppetdb #234

Merged
merged 4 commits into from
Jun 21, 2024
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: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ This file documents all notable changes to Puppet Server Helm Chart. The release
numbering uses [semantic versioning](http://semver.org).

NOTE: The change log until version `v0.2.4` is auto-generated.
## [v9.5.2](https://github.com/puppetlabs/puppetserver-helm-chart/tree/v9.5.2) (2024-06-18)
- Fix: #233 - Allow puppetdb.fqdns.alternateServerNames to be configured

## [v9.5.1](https://github.com/puppetlabs/puppetserver-helm-chart/tree/v9.5.1) (2024-05-09)
- Fix: #228 - fixed check for puppet certs in a multimaster setup
Expand Down
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: puppetserver
version: 9.5.1
version: 9.5.2
appVersion: 7.17.0
description: Puppet automates the delivery and operation of software.
keywords: ["puppet", "puppetserver", "automation", "iac", "infrastructure", "cm", "ci", "cd"]
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ The following table lists the configurable parameters of the Puppetserver chart
| `puppetdb.extraEnv` | puppetdb additional container env vars |``|
| `puppetdb.extraEnvSecret` | puppetdb additional container env vars from pre-existing secret |``|
| `puppetdb.extraLabels` | puppetdb additional labels |``|
| `puppetdb.fqdns.alternateServerNames` | puppetdb alternate fqdns |``|
| `puppetdb.service.type` | define `spec.type` for the puppetdb service |`ClusterIP`|
| `puppetdb.service.annotations` | puppetdb service annotations |``|
| `puppetdb.service.labels` | puppetdb service labels |``|
Expand Down Expand Up @@ -598,3 +599,4 @@ kill %[job_numbers_above]
* [Ben Feld](https://github.com/rootshellz), Contributor
* [Julien Godin](https://github.com/JGodin-C2C), Contributor
* [Diego Abelenda](https://github.com/dabelenda), Contributor
* [Johann Agnarsson](https://github.com/johannagnarsson), Contributor
11 changes: 11 additions & 0 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,17 @@ If release name contains chart name it will be used as a full name.
{{ template "puppetserver.fullname" . }}-puppetdb
{{- end -}}

{{/*
Define puppetdb alternate SAN
*/}}
{{- define "puppetdb.san" -}}
{{- $san := printf "puppetdb,%s" ( include "puppetdb.fullname" . ) -}}
{{- if .Values.puppetdb.fqdns.alternateServerNames -}}
{{- $san = print $san "," .Values.puppetdb.fqdns.alternateServerNames -}}
{{- end -}}
{{- printf "%s" $san -}}
{{- end -}}

{{/*
Define puppetdb service Account name
*/}}
Expand Down
2 changes: 1 addition & 1 deletion templates/puppetdb-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ spec:
- name: PUPPETSERVER_PORT
value: "{{ template "puppetserver.puppetserver-masters.port" . }}"
- name: DNS_ALT_NAMES
value: {{ template "puppetdb.fullname" . }}
value: {{ template "puppetdb.san" . }}
{{- if not (hasKey .Values.puppetdb.extraEnv "PUPPETDB_POSTGRES_HOSTNAME") }}
- name: PUPPETDB_POSTGRES_HOSTNAME
value: "{{ include "postgresql.hostname" . }}"
Expand Down
2 changes: 1 addition & 1 deletion tests/__snapshot__/jmx-servicemonitor_test.yaml.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ manifest should match snapshot:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: puppetserver
app.kubernetes.io/version: 7.17.0
helm.sh/chart: puppetserver-9.5.1
helm.sh/chart: puppetserver-9.5.2
release: kube-prometheus-stack
name: puppetserver-jmx
namespace: puppet
Expand Down
2 changes: 1 addition & 1 deletion tests/__snapshot__/puppetdb-pvc_test.yaml.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ manifest should match snapshot:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: puppetserver
app.kubernetes.io/version: 7.17.0
helm.sh/chart: puppetserver-9.5.1
helm.sh/chart: puppetserver-9.5.2
name: puppetserver-puppetdb-claim
spec:
accessModes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ manifest should match snapshot:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: puppetserver
app.kubernetes.io/version: 7.17.0
helm.sh/chart: puppetserver-9.5.1
helm.sh/chart: puppetserver-9.5.2
release: kube-prometheus-stack
name: puppetserver-puppetdb
namespace: puppet
Expand Down
2 changes: 1 addition & 1 deletion tests/__snapshot__/puppetdb.networkpolicy_test.yaml.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ manifest should match snapshot:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: puppetserver
app.kubernetes.io/version: 7.17.0
helm.sh/chart: puppetserver-9.5.1
helm.sh/chart: puppetserver-9.5.2
name: puppetserver-puppetdb
spec:
egress:
Expand Down
2 changes: 1 addition & 1 deletion tests/__snapshot__/puppetserver-ca-pvc_test.yaml.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ manifest should match snapshot:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: puppetserver
app.kubernetes.io/version: 7.17.0
helm.sh/chart: puppetserver-9.5.1
helm.sh/chart: puppetserver-9.5.2
name: puppetserver-ca-claim
spec:
accessModes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ manifest should match snapshot:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: puppetserver
app.kubernetes.io/version: 7.17.0
helm.sh/chart: puppetserver-9.5.1
helm.sh/chart: puppetserver-9.5.2
name: puppetserver-puppetserver-compiler
spec:
replicas: 1
Expand All @@ -31,7 +31,7 @@ manifest should match snapshot:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: puppetserver
app.kubernetes.io/version: 7.17.0
helm.sh/chart: puppetserver-9.5.1
helm.sh/chart: puppetserver-9.5.2
spec:
containers:
- env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ manifest should match snapshot:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: puppetserver
app.kubernetes.io/version: 7.17.0
helm.sh/chart: puppetserver-9.5.1
helm.sh/chart: puppetserver-9.5.2
name: puppetserver-puppetserver-compilers
spec:
egress:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ manifest should match snapshot:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: puppetserver
app.kubernetes.io/version: 7.17.0
helm.sh/chart: puppetserver-9.5.1
helm.sh/chart: puppetserver-9.5.2
name: puppetserver-compilers
spec:
maxUnavailable: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ manifest should match snapshot:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: puppetserver
app.kubernetes.io/version: 7.17.0
helm.sh/chart: puppetserver-9.5.1
helm.sh/chart: puppetserver-9.5.2
name: puppetserver-puppetserver-compiler
spec:
podManagementPolicy: OrderedReady
Expand All @@ -32,7 +32,7 @@ manifest should match snapshot:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: puppetserver
app.kubernetes.io/version: 7.17.0
helm.sh/chart: puppetserver-9.5.1
helm.sh/chart: puppetserver-9.5.2
spec:
containers:
- env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ manifest should match snapshot:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: puppetserver
app.kubernetes.io/version: 7.17.0
helm.sh/chart: puppetserver-9.5.1
helm.sh/chart: puppetserver-9.5.2
name: puppetserver-puppetserver
spec:
egress:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ manifest should match snapshot:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: puppetserver
app.kubernetes.io/version: 7.17.0
helm.sh/chart: puppetserver-9.5.1
helm.sh/chart: puppetserver-9.5.2
name: puppetserver-masters
spec:
maxUnavailable: 2
Expand Down
2 changes: 1 addition & 1 deletion tests/__snapshot__/puppetserver-pvc_test.yaml.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ manifest should match snapshot:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: puppetserver
app.kubernetes.io/version: 7.17.0
helm.sh/chart: puppetserver-9.5.1
helm.sh/chart: puppetserver-9.5.2
name: puppetserver-puppet-claim
spec:
accessModes:
Expand Down
5 changes: 5 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,11 @@ puppetdb:
psp:
create: false
annotations:
## Additional fully qualified domain names (FQDN's) to add
## to the PuppetDB certificates.
fqdns:
alternateServerNames: "" # Comma-separated


## PostgreSQL Sub-Chart Configuration
## Please check: https://github.com/bitnami/charts/tree/master/bitnami/postgresql
Expand Down
Loading