Skip to content

Commit

Permalink
ci: fix release-please issues with helm (#508)
Browse files Browse the repository at this point in the history
- two unecessary labels were added to the kubernetes manifests, these
  labels are helm specific/have a helm specific value.
- The image version in the rendered manifests did not update in the
  release-please PR, causing the manifests check to fail.
  • Loading branch information
apricote authored Sep 28, 2023
1 parent c39b138 commit 8af636d
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 28 deletions.
4 changes: 2 additions & 2 deletions chart/.snapshots/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ spec:
limits: {}
requests: {}
- name: hcloud-csi-driver
image: docker.io/hetznercloud/hcloud-csi-driver:v2.4.0
image: docker.io/hetznercloud/hcloud-csi-driver:v2.4.0 # x-release-please-version
imagePullPolicy: IfNotPresent
command: [/bin/hcloud-csi-driver-node]
volumeMounts:
Expand Down Expand Up @@ -309,7 +309,7 @@ spec:
name: socket-dir

- name: hcloud-csi-driver
image: docker.io/hetznercloud/hcloud-csi-driver:v2.4.0
image: docker.io/hetznercloud/hcloud-csi-driver:v2.4.0 # x-release-please-version
imagePullPolicy: IfNotPresent
command: [/bin/hcloud-csi-driver-controller]
env:
Expand Down
4 changes: 2 additions & 2 deletions chart/.snapshots/example-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ spec:
cpu: 10m
memory: 20Mi
- name: hcloud-csi-driver
image: docker.io/hetznercloud/hcloud-csi-driver:v2.4.0
image: docker.io/hetznercloud/hcloud-csi-driver:v2.4.0 # x-release-please-version
imagePullPolicy: IfNotPresent
command: [/bin/hcloud-csi-driver-node]
volumeMounts:
Expand Down Expand Up @@ -420,7 +420,7 @@ spec:
name: socket-dir

- name: hcloud-csi-driver
image: docker.io/hetznercloud/hcloud-csi-driver:v2.4.0
image: docker.io/hetznercloud/hcloud-csi-driver:v2.4.0 # x-release-please-version
imagePullPolicy: IfNotPresent
command: [/bin/hcloud-csi-driver-controller]
env:
Expand Down
4 changes: 2 additions & 2 deletions chart/.snapshots/full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ spec:
cpu: 12m
memory: 22Mi
- name: hcloud-csi-driver
image: docker.io/hetznercloud/hcloud-csi-driver:v2.4.0
image: docker.io/hetznercloud/hcloud-csi-driver:v2.4.0 # x-release-please-version
imagePullPolicy: Always
command: [/bin/hcloud-csi-driver-node]
volumeMounts:
Expand Down Expand Up @@ -547,7 +547,7 @@ spec:
name: socket-dir

- name: hcloud-csi-driver
image: docker.io/hetznercloud/hcloud-csi-driver:v2.4.0
image: docker.io/hetznercloud/hcloud-csi-driver:v2.4.0 # x-release-please-version
imagePullPolicy: Always
command: [/bin/hcloud-csi-driver-controller]
env:
Expand Down
2 changes: 1 addition & 1 deletion chart/templates/controller/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ spec:
name: socket-dir

- name: hcloud-csi-driver
image: {{ tpl .Values.controller.image.hcloudCSIDriver.name . }}
image: {{ tpl .Values.controller.image.hcloudCSIDriver.name . }} # x-release-please-version
imagePullPolicy: {{ .Values.controller.image.hcloudCSIDriver.pullPolicy }}
command: [/bin/hcloud-csi-driver-controller]
env:
Expand Down
2 changes: 1 addition & 1 deletion chart/templates/node/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ spec:
resources: {{- toYaml .Values.node.resources.livenessProbe | nindent 12 }}
{{- end }}
- name: hcloud-csi-driver
image: {{ tpl .Values.node.image.hcloudCSIDriver.name . }}
image: {{ tpl .Values.node.image.hcloudCSIDriver.name . }} # x-release-please-version
imagePullPolicy: {{ .Values.node.image.hcloudCSIDriver.pullPolicy }}
command: [/bin/hcloud-csi-driver-node]
volumeMounts:
Expand Down
22 changes: 2 additions & 20 deletions deploy/kubernetes/hcloud-csi.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions hack/update-deployment-yamls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
set -ueo pipefail

# Template the chart with pre-built values to get the legacy deployment files
# Also remove labels that are Helm specific
helm template hcloud-csi chart \
--namespace kube-system \
--set metrics.enabled=true \
--set controller.matchLabelsOverride.app=hcloud-csi-controller \
--set controller.podLabels.app=hcloud-csi-controller \
--set node.matchLabelsOverride.app=hcloud-csi \
--set node.podLabels.app=hcloud-csi \
| grep -v helm.sh/chart \
| grep -v app.kubernetes.io/managed-by \
> deploy/kubernetes/hcloud-csi.yml

0 comments on commit 8af636d

Please sign in to comment.