From d7177b91195bc598a7cc1973ebbdf0ad1b02287c Mon Sep 17 00:00:00 2001 From: Petr McAllister Date: Sun, 22 Nov 2026 13:35:34 -0700 Subject: [PATCH] pass api address to atelet so renamed or relocated installs register workers Signed-off-by: Petr McAllister --- charts/substrate-atelet/templates/atelet.yaml | 4 ++++ charts/substrate/templates/atelet.yaml | 4 ++++ charts/substrate/tests/control_plane_test.yaml | 12 ++++++++++++ 3 files changed, 20 insertions(+) diff --git a/charts/substrate-atelet/templates/atelet.yaml b/charts/substrate-atelet/templates/atelet.yaml index c8374bbf94..826528de27 100644 --- a/charts/substrate-atelet/templates/atelet.yaml +++ b/charts/substrate-atelet/templates/atelet.yaml @@ -215,6 +215,10 @@ spec: - --client-ca-certs=/run/podidentity.podcert.ate.dev/trust-bundle.pem - '--herder-allowed-spiffe-id=spiffe://cluster.local/ns/{{ .Release.Namespace }}/sa/{{ include "substrate.fullname" (list "ate-api-server" .) }}' - --ateapi-ca-file=/run/servicedns.podcert.ate.dev/trust-bundle.pem + # atelet defaults to api.ate-system.svc; pass the chart-resolved Service + # so a renamed or relocated install dials its own API. + - "--ateapi-address=k8s:///{{ include "substrate.fullname" (list "api" .) }}.{{ .Release.Namespace }}.svc:443" + - "--ateapi-server-name={{ include "substrate.fullname" (list "api" .) }}.{{ .Release.Namespace }}.svc" {{- with .Values.atelet.extraArgs }} {{ toYaml . | indent 8 }} {{- end }} diff --git a/charts/substrate/templates/atelet.yaml b/charts/substrate/templates/atelet.yaml index e8c3ecad3b..108d2635cb 100644 --- a/charts/substrate/templates/atelet.yaml +++ b/charts/substrate/templates/atelet.yaml @@ -216,6 +216,10 @@ spec: - --client-ca-certs=/run/podidentity.podcert.ate.dev/trust-bundle.pem - '--herder-allowed-spiffe-id=spiffe://cluster.local/ns/{{ .Release.Namespace }}/sa/{{ include "substrate.fullname" (list "ate-api-server" .) }}' - --ateapi-ca-file=/run/servicedns.podcert.ate.dev/trust-bundle.pem + # atelet defaults to api.ate-system.svc; pass the chart-resolved Service + # so a renamed or relocated install dials its own API. + - "--ateapi-address=k8s:///{{ include "substrate.fullname" (list "api" .) }}.{{ .Release.Namespace }}.svc:443" + - "--ateapi-server-name={{ include "substrate.fullname" (list "api" .) }}.{{ .Release.Namespace }}.svc" {{- with .Values.atelet.extraArgs }} {{ toYaml . | indent 8 }} {{- end }} diff --git a/charts/substrate/tests/control_plane_test.yaml b/charts/substrate/tests/control_plane_test.yaml index 47c7cb12da..44d59ad204 100644 --- a/charts/substrate/tests/control_plane_test.yaml +++ b/charts/substrate/tests/control_plane_test.yaml @@ -116,6 +116,18 @@ tests: key: cloud.google.com/compute-class operator: Exists effect: NoSchedule +- it: points atelet at the release's API Service + template: atelet.yaml + documentSelector: + path: kind + value: DaemonSet + asserts: + - contains: + path: spec.template.spec.containers[0].args + content: --ateapi-address=k8s:///custom-api.custom-system.svc:443 + - contains: + path: spec.template.spec.containers[0].args + content: --ateapi-server-name=custom-api.custom-system.svc - it: schedules atelet on every node by default template: atelet.yaml documentSelector: