@@ -17,6 +17,12 @@ type GenerateEmbeddedClusterNodeJoinCommandResponse struct {
17
17
Command []string `json:"command"`
18
18
}
19
19
20
+ type Proxy struct {
21
+ HTTPProxy string `json:"httpProxy"`
22
+ HTTPSProxy string `json:"httpsProxy"`
23
+ NoProxy string `json:"noProxy"`
24
+ }
25
+
20
26
type GetEmbeddedClusterNodeJoinCommandResponse struct {
21
27
ClusterID string `json:"clusterID"`
22
28
K0sJoinCommand string `json:"k0sJoinCommand"`
@@ -27,6 +33,7 @@ type GetEmbeddedClusterNodeJoinCommandResponse struct {
27
33
EmbeddedClusterVersion string `json:"embeddedClusterVersion"`
28
34
AirgapRegistryAddress string `json:"airgapRegistryAddress"`
29
35
IsAirgap bool `json:"isAirgap"`
36
+ Proxy * Proxy `json:"proxy,omitempty"`
30
37
}
31
38
32
39
type GenerateEmbeddedClusterNodeJoinCommandRequest struct {
@@ -172,6 +179,18 @@ func (h *Handler) GetEmbeddedClusterNodeJoinCommand(w http.ResponseWriter, r *ht
172
179
airgapRegistryAddress , _ , _ = kotsutil .GetEmbeddedRegistryCreds (clientset )
173
180
}
174
181
182
+ httpProxy := util .HTTPProxy ()
183
+ httpsProxy := util .HTTPSProxy ()
184
+ noProxy := util .NoProxy ()
185
+ var proxy * Proxy
186
+ if httpProxy != "" || httpsProxy != "" || noProxy != "" {
187
+ proxy = & Proxy {
188
+ HTTPProxy : httpProxy ,
189
+ HTTPSProxy : httpsProxy ,
190
+ NoProxy : noProxy ,
191
+ }
192
+ }
193
+
175
194
JSON (w , http .StatusOK , GetEmbeddedClusterNodeJoinCommandResponse {
176
195
ClusterID : install .Spec .ClusterID ,
177
196
K0sJoinCommand : k0sJoinCommand ,
@@ -182,5 +201,6 @@ func (h *Handler) GetEmbeddedClusterNodeJoinCommand(w http.ResponseWriter, r *ht
182
201
EmbeddedClusterVersion : ecVersion ,
183
202
AirgapRegistryAddress : airgapRegistryAddress ,
184
203
IsAirgap : install .Spec .AirGap ,
204
+ Proxy : proxy ,
185
205
})
186
206
}
0 commit comments