Skip to content

Commit

Permalink
Fix permission issue and template issues (#216)
Browse files Browse the repository at this point in the history
* These changes will fix the puppetdb-preinit container from failing as it tries to run as non-root by default, as well as fix broken reference to the puppetmaster-preinit configma

* Remove trailing whitespace

* Updating changelog and chart as well

* Update CHANGELOG.md

* Update snapshot files

---------

Co-authored-by: Miroslav Hadzhiev <[email protected]>
  • Loading branch information
johannagnarsson and Xtigyro authored Apr 9, 2024
1 parent 2665f83 commit 0dbe378
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 16 deletions.
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.3.2](https://github.com/puppetlabs/puppetserver-helm-chart/tree/v9.3.2) (2024-04-08)
- Fix: Fixes bug in puppet-preinstall template when puppetserver.preGeneratedCertsJob is enabled.

## [v9.3.1](https://github.com/puppetlabs/puppetserver-helm-chart/tree/v9.3.1) (2024-04-03)
- Fix: Fixes bug when viaHttps.customCa is not provided
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.3.1
version: 9.3.2
appVersion: 7.13.0
description: Puppet automates the delivery and operation of software.
keywords: ["puppet", "puppetserver", "automation", "iac", "infrastructure", "cm", "ci", "cd"]
Expand Down
6 changes: 5 additions & 1 deletion templates/puppet-preInstall.job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,11 @@ spec:
mountPath: /crl
{{- end }}
{{- end }}
{{- if .Values.global.runAsNonRoot }}
securityContext:
runAsUser: {{ .Values.global.securityContext.runAsUser }}
runAsGroup: {{ .Values.global.securityContext.runAsGroup }}
{{- end }}
{{- if .Values.puppetdb.enabled }}
- name: copy-ro-puppetdb-certs
image: "{{.Values.puppetdb.image}}:{{.Values.puppetdb.tag}}"
Expand Down Expand Up @@ -223,9 +225,11 @@ spec:
mountPath: /crl
{{- end }}
{{- end }}
{{- if .Values.global.runAsNonRoot }}
securityContext:
runAsUser: {{ .Values.global.securityContext.runAsUser }}
runAsGroup: {{ .Values.global.securityContext.runAsGroup }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.global.runAsNonRoot }}
Expand Down Expand Up @@ -373,7 +377,7 @@ spec:
- name: puppetserver-certs
{{- if not .Values.singleCA.enabled }}
configMap:
name: "{{ template "puppetserver.fullname" . }}-puppetserver-preinstall"
name: "{{ template "puppetserver.fullname" . }}-preinstall"
{{- else }}
secret:
secretName: {{ .Values.singleCA.certificates.existingSecret.puppetserver }}
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.13.0
helm.sh/chart: puppetserver-9.3.1
helm.sh/chart: puppetserver-9.3.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.13.0
helm.sh/chart: puppetserver-9.3.1
helm.sh/chart: puppetserver-9.3.2
name: puppetserver-puppetdb-claim
spec:
accessModes:
Expand Down
2 changes: 1 addition & 1 deletion tests/__snapshot__/puppetdb-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.13.0
helm.sh/chart: puppetserver-9.3.1
helm.sh/chart: puppetserver-9.3.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.13.0
helm.sh/chart: puppetserver-9.3.1
helm.sh/chart: puppetserver-9.3.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.13.0
helm.sh/chart: puppetserver-9.3.1
helm.sh/chart: puppetserver-9.3.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.13.0
helm.sh/chart: puppetserver-9.3.1
helm.sh/chart: puppetserver-9.3.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.13.0
helm.sh/chart: puppetserver-9.3.1
helm.sh/chart: puppetserver-9.3.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.13.0
helm.sh/chart: puppetserver-9.3.1
helm.sh/chart: puppetserver-9.3.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.13.0
helm.sh/chart: puppetserver-9.3.1
helm.sh/chart: puppetserver-9.3.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.13.0
helm.sh/chart: puppetserver-9.3.1
helm.sh/chart: puppetserver-9.3.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.13.0
helm.sh/chart: puppetserver-9.3.1
helm.sh/chart: puppetserver-9.3.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.13.0
helm.sh/chart: puppetserver-9.3.1
helm.sh/chart: puppetserver-9.3.2
name: puppetserver-puppetserver
spec:
egress:
Expand Down
2 changes: 1 addition & 1 deletion tests/__snapshot__/puppetserver-masters.pdb_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.13.0
helm.sh/chart: puppetserver-9.3.1
helm.sh/chart: puppetserver-9.3.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.13.0
helm.sh/chart: puppetserver-9.3.1
helm.sh/chart: puppetserver-9.3.2
name: puppetserver-puppet-claim
spec:
accessModes:
Expand Down

0 comments on commit 0dbe378

Please sign in to comment.