From 85b8385f354a1a61a41df1b181825a0bb9379c85 Mon Sep 17 00:00:00 2001 From: vardhaman22 Date: Thu, 22 Aug 2024 20:20:02 +0530 Subject: [PATCH] added streaming server addr configuration for cri-dockerd --- cluster/plan.go | 6 +++++- types/rke_types.go | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cluster/plan.go b/cluster/plan.go index 5f0fbbedc..f6656cbe8 100644 --- a/cluster/plan.go +++ b/cluster/plan.go @@ -66,6 +66,8 @@ const ( KubeletCRIDockerdNameEnv = "RKE_KUBELET_CRIDOCKERD" KubeletDualStackNameEnv = "RKE_KUBELET_CRIDOCKERD_DUALSTACK" + StreamServerAddressEnv = "STREAM_SERVER_ADDRESS" + StreamServerPortEnv = "STREAM_SERVER_PORT" ) var ( @@ -617,7 +619,9 @@ func (c *Cluster) BuildKubeletProcess(host *hosts.Host, serviceOptions v3.Kubern if c.IsCRIDockerdEnabled() { Env = append(Env, // Enable running cri-dockerd - fmt.Sprintf("%s=%s", KubeletCRIDockerdNameEnv, "true")) + fmt.Sprintf("%s=%s", KubeletCRIDockerdNameEnv, "true"), + fmt.Sprintf("%s=%s", StreamServerAddressEnv, c.StreamServerAddress), + fmt.Sprintf("%s=%s", StreamServerPortEnv, c.StreamServerPort)) if c.multipleCIDRsConfigured() { Env = append(Env, // Enable cri-dockerd flag for dual-stack diff --git a/types/rke_types.go b/types/rke_types.go index 75adbaaa1..c02e71ae5 100644 --- a/types/rke_types.go +++ b/types/rke_types.go @@ -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 + StreamServerAddress string `yaml:"stream_server_address" json:"streamServerAddress,omitempty"` + // Stream Server Port for cri-dockerd + StreamServerPort string `yaml:"stream_server_port" json:"streamServerPort,omitempty"` } func (r *RancherKubernetesEngineConfig) ObjClusterName() string {