Skip to content

Commit eb5aa28

Browse files
committed
fix: set kuberentes_host and port explicitly in cilium config
1 parent ab9e9ab commit eb5aa28

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

charts/cluster-api-runtime-extensions-nutanix/addons/cni/cilium/values-template.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,11 @@ socketLB:
3939
envoy:
4040
image:
4141
useDigest: false
42-
4342
{{- if .EnableKubeProxyReplacement }}
4443
kubeProxyReplacement: true
4544
{{- end }}
46-
47-
{{- if eq $capiProvider "eks" }}
4845
k8sServiceHost: "{{ trimPrefix .Cluster.Spec.ControlPlaneEndpoint.Host "https://" }}"
4946
k8sServicePort: "{{ .Cluster.Spec.ControlPlaneEndpoint.Port }}"
50-
{{- else }}
51-
k8sServiceHost: auto
52-
{{- end }}
53-
5447
{{- if eq $capiProvider "eks" }}
5548
enableIPv4Masquerade: false
5649
eni:

hack/addons/update-cilium-manifests.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ Cluster:
3030
cluster.x-k8s.io/provider: tmpl-capiprovider-tmpl
3131
EOF
3232
# Replace trimPrefix with strings.TrimPrefix to use the in built go function in gomplate.
33-
sed 's/trimPrefix/strings.TrimPrefix/g' \
33+
sed -e 's/trimPrefix/strings.TrimPrefix/g' \
34+
-e '/k8sServiceHost:.*/,/k8sServicePort:/c\
35+
k8sServiceHost: auto' \
3436
"${GIT_REPO_ROOT}/charts/cluster-api-runtime-extensions-nutanix/addons/cni/cilium/values-template.yaml" |
3537
gomplate --context .="${ASSETS_DIR}/gomplate-context.yaml" \
3638
>"${ASSETS_DIR}/helm-values.yaml"

0 commit comments

Comments
 (0)