Skip to content

Commit

Permalink
rename flag
Browse files Browse the repository at this point in the history
  • Loading branch information
prezha committed Dec 14, 2021
1 parent a2d2789 commit 7fa4ce0
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion deploy/addons/ingress/ingress-deploy.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ metadata:
namespace: ingress-nginx
spec:
type: NodePort
{{- if and (eq .IngressAPIVersion "v1") (not .LegacyKubernetesVersion)}}
{{- if and (eq .IngressAPIVersion "v1") (not .PreOneTwentyKubernetes)}}
ipFamilyPolicy: SingleStack
ipFamilies:
- IPv4
Expand Down
54 changes: 27 additions & 27 deletions pkg/minikube/assets/addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -790,33 +790,33 @@ func GenerateTemplateData(addon *Addon, cfg config.KubernetesConfig, netInfo Net
}

opts := struct {
LegacyKubernetesVersion bool
Arch string
ExoticArch string
ImageRepository string
LoadBalancerStartIP string
LoadBalancerEndIP string
CustomIngressCert string
IngressAPIVersion string
ContainerRuntime string
Images map[string]string
Registries map[string]string
CustomRegistries map[string]string
NetworkInfo map[string]string
PreOneTwentyKubernetes bool
Arch string
ExoticArch string
ImageRepository string
LoadBalancerStartIP string
LoadBalancerEndIP string
CustomIngressCert string
IngressAPIVersion string
ContainerRuntime string
Images map[string]string
Registries map[string]string
CustomRegistries map[string]string
NetworkInfo map[string]string
}{
LegacyKubernetesVersion: false,
Arch: a,
ExoticArch: ea,
ImageRepository: cfg.ImageRepository,
LoadBalancerStartIP: cfg.LoadBalancerStartIP,
LoadBalancerEndIP: cfg.LoadBalancerEndIP,
CustomIngressCert: cfg.CustomIngressCert,
IngressAPIVersion: "v1", // api version for ingress (eg, "v1beta1"; defaults to "v1" for k8s 1.19+)
ContainerRuntime: cfg.ContainerRuntime,
Images: images,
Registries: addon.Registries,
CustomRegistries: customRegistries,
NetworkInfo: make(map[string]string),
PreOneTwentyKubernetes: false,
Arch: a,
ExoticArch: ea,
ImageRepository: cfg.ImageRepository,
LoadBalancerStartIP: cfg.LoadBalancerStartIP,
LoadBalancerEndIP: cfg.LoadBalancerEndIP,
CustomIngressCert: cfg.CustomIngressCert,
IngressAPIVersion: "v1", // api version for ingress (eg, "v1beta1"; defaults to "v1" for k8s 1.19+)
ContainerRuntime: cfg.ContainerRuntime,
Images: images,
Registries: addon.Registries,
CustomRegistries: customRegistries,
NetworkInfo: make(map[string]string),
}
if opts.ImageRepository != "" && !strings.HasSuffix(opts.ImageRepository, "/") {
opts.ImageRepository += "/"
Expand All @@ -835,7 +835,7 @@ func GenerateTemplateData(addon *Addon, cfg config.KubernetesConfig, netInfo Net
opts.IngressAPIVersion = "v1beta1"
}
if semver.MustParseRange("<1.20.0")(v) {
opts.LegacyKubernetesVersion = true
opts.PreOneTwentyKubernetes = true
}

// Network info for generating template
Expand Down

0 comments on commit 7fa4ce0

Please sign in to comment.