Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
Andrei Kvapil
5b6dc934d8
fix(kubernetes): remove patch-containerd secret lookup
The patch-containerd mechanism copied the secret from cozy-system
into each tenant namespace and then looked it up during template
rendering. This is no longer needed.

Remove the copy-patch-containerd.yaml template and the corresponding
lookup block in cluster.yaml.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2026-04-10 00:48:22 +02:00
Andrei Kvapil
6d949de7c1
fix(kubernetes): merge duplicate files key in KubeadmConfigTemplate
The containerd registry certs were added as a separate `files` key
in the KubeadmConfigTemplate spec, which caused a YAML unmarshal
error during post-render: "mapping key 'files' already defined".

Move the containerd certs entries into the existing `files` list
to produce valid YAML.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2026-04-10 00:38:40 +02:00
2 changed files with 0 additions and 25 deletions

View file

@ -227,18 +227,6 @@ spec:
- ["LABEL=ephemeral", "/ephemeral"]
- ["/ephemeral/kubelet", "/var/lib/kubelet", "none", "bind,nofail"]
- ["/ephemeral/containerd", "/var/lib/containerd", "none", "bind,nofail"]
{{- $sec := lookup "v1" "Secret" $.Release.Namespace (printf "%s-patch-containerd" $.Release.Name) }}
{{- if $sec }}
files:
{{- range $key, $_ := $sec.data }}
- path: /etc/containerd/certs.d/{{ trimSuffix ".toml" $key }}/hosts.toml
contentFrom:
secret:
name: {{ $.Release.Name }}-patch-containerd
key: {{ $key }}
permissions: "0400"
{{- end }}
{{- end }}
preKubeadmCommands:
- KUBELET_VERSION={{ include "kubernetes.versionMap" $}} /usr/bin/update-k8s.sh || true
- sed -i 's|root:x:|root::|' /etc/passwd

View file

@ -1,13 +0,0 @@
{{- $sourceSecret := lookup "v1" "Secret" "cozy-system" "patch-containerd" }}
{{- if $sourceSecret }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-patch-containerd
namespace: {{ .Release.Namespace }}
type: {{ $sourceSecret.type }}
data:
{{- range $key, $value := $sourceSecret.data }}
{{ printf "%s: %s" $key ($value | quote) | indent 2 }}
{{- end }}
{{- end }}