Skip to content

Commit

Permalink
Merge pull request #3658 from vardhaman22/add-stream-server-addr-opti…
Browse files Browse the repository at this point in the history
…ons-in-kubelet

added streaming server addr configuration for cri-dockerd
  • Loading branch information
vardhaman22 authored Aug 30, 2024
2 parents 6722ca3 + 39cff36 commit fe58518
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
15 changes: 13 additions & 2 deletions cluster/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ const (

EncryptionProviderConfigArgument = "encryption-provider-config"

KubeletCRIDockerdNameEnv = "RKE_KUBELET_CRIDOCKERD"
KubeletDualStackNameEnv = "RKE_KUBELET_CRIDOCKERD_DUALSTACK"
KubeletCRIDockerdNameEnv = "RKE_KUBELET_CRIDOCKERD"
KubeletDualStackNameEnv = "RKE_KUBELET_CRIDOCKERD_DUALSTACK"
CRIDockerdStreamServerAddressEnv = "CRIDOCKERD_STREAM_SERVER_ADDRESS"
CRIDockerdStreamServerPortEnv = "CRIDOCKERD_STREAM_SERVER_PORT"
)

var (
Expand Down Expand Up @@ -618,6 +620,15 @@ func (c *Cluster) BuildKubeletProcess(host *hosts.Host, serviceOptions v3.Kubern
Env = append(Env,
// Enable running cri-dockerd
fmt.Sprintf("%s=%s", KubeletCRIDockerdNameEnv, "true"))

if c.CRIDockerdStreamServerAddress != "" {
Env = append(Env, fmt.Sprintf("%s=%s", CRIDockerdStreamServerAddressEnv, c.CRIDockerdStreamServerAddress))
}

if c.CRIDockerdStreamServerPort != "" {
Env = append(Env, fmt.Sprintf("%s=%s", CRIDockerdStreamServerPortEnv, c.CRIDockerdStreamServerPort))
}

if c.multipleCIDRsConfigured() {
Env = append(Env,
// Enable cri-dockerd flag for dual-stack
Expand Down
4 changes: 4 additions & 0 deletions types/rke_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ type RancherKubernetesEngineConfig struct {
DNS *DNSConfig `yaml:"dns" json:"dns,omitempty"`
// Upgrade Strategy for the cluster
UpgradeStrategy *NodeUpgradeStrategy `yaml:"upgrade_strategy,omitempty" json:"upgradeStrategy,omitempty"`
// Stream Server Address for cri-dockerd
CRIDockerdStreamServerAddress string `yaml:"cri_dockerd_stream_server_address" json:"criDockerdStreamServerAddress,omitempty"`
// Stream Server Port for cri-dockerd
CRIDockerdStreamServerPort string `yaml:"cri_dockerd_stream_server_port" json:"criDockerdStreamServerPort,omitempty"`
}

func (r *RancherKubernetesEngineConfig) ObjClusterName() string {
Expand Down

0 comments on commit fe58518

Please sign in to comment.