mirror of
https://github.com/rancher/rke.git
synced 2025-09-02 15:34:36 +00:00
set default ingress network mode for both rancher and rke
Problem: Setting defaults for ingress in parse logic works only for rke standalone but not when rancher calls rke using ClusterUp. Solution: Setting them during the cluster defaults logic
This commit is contained in:
committed by
Sebastiaan van Steenis
parent
24c5854fb8
commit
8c3c618b63
@@ -514,9 +514,6 @@ func parseIngressConfig(clusterFile string, rkeConfig *v3.RancherKubernetesEngin
|
||||
if err := parseIngressExtraVolumeMounts(ingressMap, rkeConfig); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := parseIngressDefaults(ingressMap, rkeConfig); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -601,21 +598,6 @@ func parseIngressExtraVolumeMounts(ingressMap map[string]interface{}, rkeConfig
|
||||
return nil
|
||||
}
|
||||
|
||||
func parseIngressDefaults(ingressMap map[string]interface{}, rkeConfig *v3.RancherKubernetesEngineConfig) error {
|
||||
// Setting up default behaviour so as to not catch out
|
||||
// existing users who use new version of RKE
|
||||
if _, ok := ingressMap["network_mode"]; !ok {
|
||||
rkeConfig.Ingress.NetworkMode = DefaultNetworkMode
|
||||
}
|
||||
if _, ok := ingressMap["http_port"]; !ok {
|
||||
rkeConfig.Ingress.HTTPPort = DefaultHTTPPort
|
||||
}
|
||||
if _, ok := ingressMap["https_port"]; !ok {
|
||||
rkeConfig.Ingress.HTTPSPort = DefaultHTTPSPort
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func parseNodeDrainInput(clusterFile string, rkeConfig *v3.RancherKubernetesEngineConfig) error {
|
||||
// setting some defaults here because for these fields there's no way of differentiating between user provided null value vs golang setting it to null during unmarshal
|
||||
if rkeConfig.UpgradeStrategy == nil || rkeConfig.UpgradeStrategy.DrainInput == nil {
|
||||
|
Reference in New Issue
Block a user