Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
kubelet Helm chart: add support for setting --cloud-provider flag
Browse files Browse the repository at this point in the history
Using CCM on Kubernetes requires --cloud-provider to be set to
"external".

This commit enables this customization. Default value remains empty
string, so no flag will be set for compatibility with other platforms.

Refs #548

Signed-off-by: knrt10 <[email protected]>
  • Loading branch information
knrt10 committed Nov 23, 2020
1 parent ccd4125 commit a50ca11
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
3 changes: 3 additions & 0 deletions assets/charts/control-plane/kubelet/templates/kubelet-ds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ spec:
--authorization-mode=Webhook \
--client-ca-file=/etc/kubernetes/ca.crt \
--cluster_dns={{ .Values.clusterDNS }} \
{{- if .Values.cloudProvider }}
--cloud-provider={{ .Values.cloudProvider }} \
{{- end }}
--cluster_domain={{ .Values.clusterDomain }} \
--cni-conf-dir=/etc/cni/net.d \
--config=/etc/kubernetes/kubelet.config \
Expand Down
1 change: 1 addition & 0 deletions assets/charts/control-plane/kubelet/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ image: quay.io/poseidon/kubelet:v1.19.3
clusterDNS: 10.0.0.10
clusterDomain: cluster.local
enableTLSBootstrap: true
cloudProvider:
1 change: 1 addition & 0 deletions assets/terraform-modules/bootkube/assets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ locals {
cluster_dns_service_ip = cidrhost(var.service_cidr, 10)
cluster_domain_suffix = var.cluster_domain_suffix
enable_tls_bootstrap = var.enable_tls_bootstrap
cloud_provider = var.cloud_provider
})

kubeconfig_kubelet_content = templatefile("${path.module}/resources/kubeconfig-kubelet", {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ image: ${kubelet_image}
clusterDNS: ${cluster_dns_service_ip}
clusterDomain: ${cluster_domain_suffix}
enableTLSBootstrap: ${enable_tls_bootstrap}
cloudProvider: ${cloud_provider}
Loading

0 comments on commit a50ca11

Please sign in to comment.