mirror of https://github.com/kubernetes/kops.git
Merge pull request #10435 from hakman/default-coredns-1.20
Delay defaulting to CoreDNS to k8s v1.20
This commit is contained in:
commit
4f565eaf54
|
|
@ -610,7 +610,7 @@ Note that as of Kubernetes 1.8.0 kube-scheduler does not reload its configuratio
|
||||||
|
|
||||||
This block contains configurations for [CoreDNS](https://coredns.io/).
|
This block contains configurations for [CoreDNS](https://coredns.io/).
|
||||||
|
|
||||||
For Kubernetes version >= 1.18, `CoreDNS` will be installed as the default DNS server.
|
For Kubernetes version >= 1.20, `CoreDNS` will be installed as the default DNS server.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
spec:
|
spec:
|
||||||
|
|
|
||||||
|
|
@ -263,12 +263,12 @@ func (b *BootstrapChannelBuilder) buildAddons(c *fi.ModelBuilderContext) (*chann
|
||||||
|
|
||||||
kubeDNS := b.Cluster.Spec.KubeDNS
|
kubeDNS := b.Cluster.Spec.KubeDNS
|
||||||
|
|
||||||
// This checks if the Kubernetes version is greater than or equal to 1.19
|
// This checks if the Kubernetes version is greater than or equal to 1.20
|
||||||
// and makes the default DNS server as CoreDNS if the DNS provider is not specified
|
// and makes the default DNS server as CoreDNS if the DNS provider is not specified
|
||||||
// and the Kubernetes version is >=1.19
|
// and the Kubernetes version is >=1.19
|
||||||
if kubeDNS.Provider == "" {
|
if kubeDNS.Provider == "" {
|
||||||
kubeDNS.Provider = "KubeDNS"
|
kubeDNS.Provider = "KubeDNS"
|
||||||
if b.Cluster.IsKubernetesGTE("1.19") {
|
if b.Cluster.IsKubernetesGTE("1.20") {
|
||||||
kubeDNS.Provider = "CoreDNS"
|
kubeDNS.Provider = "CoreDNS"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -538,15 +538,20 @@ func (tf *TemplateFunctions) OpenStackCCMTag() string {
|
||||||
func (tf *TemplateFunctions) AWSCCMTag() (string, error) {
|
func (tf *TemplateFunctions) AWSCCMTag() (string, error) {
|
||||||
var tag string
|
var tag string
|
||||||
parsed, err := util.ParseKubernetesVersion(tf.Cluster.Spec.KubernetesVersion)
|
parsed, err := util.ParseKubernetesVersion(tf.Cluster.Spec.KubernetesVersion)
|
||||||
|
|
||||||
// Update when we have stable releases
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("failed to parse Kubernetes version from cluster spec: %q", err)
|
return "", fmt.Errorf("failed to parse Kubernetes version from cluster spec: %q", err)
|
||||||
} else if parsed.Minor == 18 {
|
|
||||||
tag = "v1.18.0-alpha.1"
|
|
||||||
} else if parsed.Minor == 19 {
|
|
||||||
tag = "v1.19.0-alpha.1"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update when we have stable releases
|
||||||
|
switch parsed.Minor {
|
||||||
|
case 18:
|
||||||
|
tag = "v1.18.0-alpha.1"
|
||||||
|
case 19:
|
||||||
|
tag = "v1.19.0-alpha.1"
|
||||||
|
default:
|
||||||
|
tag = "latest"
|
||||||
|
}
|
||||||
|
|
||||||
return tag, nil
|
return tag, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ spec:
|
||||||
- --v=2
|
- --v=2
|
||||||
- --cloud-provider=aws
|
- --cloud-provider=aws
|
||||||
- --use-service-account-credentials=true
|
- --use-service-account-credentials=true
|
||||||
image: gcr.io/k8s-staging-provider-aws/cloud-controller-manager:v1.19.0-alpha.1
|
image: gcr.io/k8s-staging-provider-aws/cloud-controller-manager:latest
|
||||||
name: aws-cloud-controller-manager
|
name: aws-cloud-controller-manager
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
|
|
@ -166,4 +166,3 @@ subjects:
|
||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
name: cloud-controller-manager
|
name: cloud-controller-manager
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ spec:
|
||||||
cloudControllerManager:
|
cloudControllerManager:
|
||||||
cloudProvider: aws
|
cloudProvider: aws
|
||||||
iam: {}
|
iam: {}
|
||||||
kubernetesVersion: v1.19.2
|
kubernetesVersion: v1.20.0
|
||||||
masterInternalName: api.internal.minimal.example.com
|
masterInternalName: api.internal.minimal.example.com
|
||||||
masterPublicName: api.minimal.example.com
|
masterPublicName: api.minimal.example.com
|
||||||
additionalSans:
|
additionalSans:
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ spec:
|
||||||
- id: k8s-1.18
|
- id: k8s-1.18
|
||||||
kubernetesVersion: '>=1.18.0'
|
kubernetesVersion: '>=1.18.0'
|
||||||
manifest: aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml
|
manifest: aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml
|
||||||
manifestHash: 3edf9b4350921e900c7ad6793b7a39ad4b49d0be
|
manifestHash: 8a158e20cd289197a1378cf6cc95d1f81a2f5278
|
||||||
name: aws-cloud-controller.addons.k8s.io
|
name: aws-cloud-controller.addons.k8s.io
|
||||||
selector:
|
selector:
|
||||||
k8s-addon: aws-cloud-controller.addons.k8s.io
|
k8s-addon: aws-cloud-controller.addons.k8s.io
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ spec:
|
||||||
name: master-us-test-1a
|
name: master-us-test-1a
|
||||||
name: events
|
name: events
|
||||||
iam: {}
|
iam: {}
|
||||||
kubernetesVersion: v1.19.2
|
kubernetesVersion: v1.20.0
|
||||||
masterInternalName: api.internal.minimal.example.com
|
masterInternalName: api.internal.minimal.example.com
|
||||||
masterPublicName: api.minimal.example.com
|
masterPublicName: api.minimal.example.com
|
||||||
additionalSans:
|
additionalSans:
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ spec:
|
||||||
name: master-us-test-1a
|
name: master-us-test-1a
|
||||||
name: events
|
name: events
|
||||||
iam: {}
|
iam: {}
|
||||||
kubernetesVersion: v1.19.2
|
kubernetesVersion: v1.20.0
|
||||||
masterInternalName: api.internal.minimal.example.com
|
masterInternalName: api.internal.minimal.example.com
|
||||||
masterPublicName: api.minimal.example.com
|
masterPublicName: api.minimal.example.com
|
||||||
additionalSans:
|
additionalSans:
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ spec:
|
||||||
name: master-us-test-1a
|
name: master-us-test-1a
|
||||||
name: events
|
name: events
|
||||||
iam: {}
|
iam: {}
|
||||||
kubernetesVersion: v1.19.0
|
kubernetesVersion: v1.20.0
|
||||||
masterInternalName: api.internal.minimal.example.com
|
masterInternalName: api.internal.minimal.example.com
|
||||||
masterPublicName: api.minimal.example.com
|
masterPublicName: api.minimal.example.com
|
||||||
networkCIDR: 172.20.0.0/16
|
networkCIDR: 172.20.0.0/16
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue