diff --git a/charts/tigera-operator/README.md b/charts/tigera-operator/README.md index 6953eac4a4a..86a28a2f70d 100644 --- a/charts/tigera-operator/README.md +++ b/charts/tigera-operator/README.md @@ -158,4 +158,9 @@ calicoctl: # Configuration for the Calico CSI plugin - setting to None will disable the plugin, default: /var/lib/kubelet kubeletVolumePluginPath: None + +# Optionally configure the host and port used to access the Kubernetes API server. +kubernetesServiceEndpoint: + host: "" + port: "6443" ``` diff --git a/charts/tigera-operator/templates/tigera-operator/01-kubernetes-services-endpoint.yaml b/charts/tigera-operator/templates/tigera-operator/01-kubernetes-services-endpoint.yaml new file mode 100644 index 00000000000..6ad30a52ef2 --- /dev/null +++ b/charts/tigera-operator/templates/tigera-operator/01-kubernetes-services-endpoint.yaml @@ -0,0 +1,10 @@ +{{- if .Values.kubernetesServiceEndpoint.host -}} +kind: ConfigMap +apiVersion: v1 +metadata: + name: kubernetes-services-endpoint + namespace: {{.Release.Namespace}} +data: + KUBERNETES_SERVICE_HOST: {{ .Values.kubernetesServiceEndpoint.host }} + KUBERNETES_SERVICE_PORT: {{ .Values.kubernetesServiceEndpoint.port }} +{{- end }} diff --git a/charts/tigera-operator/values.yaml b/charts/tigera-operator/values.yaml index 566bdb259a3..9ef6a063092 100644 --- a/charts/tigera-operator/values.yaml +++ b/charts/tigera-operator/values.yaml @@ -58,4 +58,9 @@ calicoctl: image: docker.io/calico/ctl tag: master -kubeletVolumePluginPath: /var/lib/kubelet \ No newline at end of file +kubeletVolumePluginPath: /var/lib/kubelet + +# Optionally configure the host and port used to access the Kubernetes API server. +kubernetesServiceEndpoint: + host: "" + port: "6443"