mirror of https://github.com/kubernetes/kops.git
Merge pull request #15605 from johngmyers/ipv6-karpenter
Fix Karpenter failure to start on IPv6 clusters
This commit is contained in:
commit
41a0073cbc
|
|
@ -14,7 +14,7 @@ spec:
|
||||||
version: 9.99.0
|
version: 9.99.0
|
||||||
- id: k8s-1.12
|
- id: k8s-1.12
|
||||||
manifest: coredns.addons.k8s.io/k8s-1.12.yaml
|
manifest: coredns.addons.k8s.io/k8s-1.12.yaml
|
||||||
manifestHash: d2bbb7cbee5835c3891fe80fbacf8963508359ef9159f8480325ce9a7174f14a
|
manifestHash: 8834e41010ae2fb8a533107c4a32cf068ac161359956e7a52921b2a07ad8ebf5
|
||||||
name: coredns.addons.k8s.io
|
name: coredns.addons.k8s.io
|
||||||
selector:
|
selector:
|
||||||
k8s-addon: coredns.addons.k8s.io
|
k8s-addon: coredns.addons.k8s.io
|
||||||
|
|
@ -69,7 +69,7 @@ spec:
|
||||||
version: 9.99.0
|
version: 9.99.0
|
||||||
- id: k8s-1.19
|
- id: k8s-1.19
|
||||||
manifest: karpenter.sh/k8s-1.19.yaml
|
manifest: karpenter.sh/k8s-1.19.yaml
|
||||||
manifestHash: f59d4c21751b3fc33c84e664fb41199b8efb58cc5976ade6e937abc109cb612b
|
manifestHash: aab89cad4f4a52b8620f581548694a6fc096bdbd1a297310beda01b57d3550ae
|
||||||
name: karpenter.sh
|
name: karpenter.sh
|
||||||
prune:
|
prune:
|
||||||
kinds:
|
kinds:
|
||||||
|
|
|
||||||
|
|
@ -188,6 +188,10 @@ spec:
|
||||||
tolerations:
|
tolerations:
|
||||||
- key: CriticalAddonsOnly
|
- key: CriticalAddonsOnly
|
||||||
operator: Exists
|
operator: Exists
|
||||||
|
- key: node-role.kubernetes.io/master
|
||||||
|
operator: Exists
|
||||||
|
- key: node-role.kubernetes.io/control-plane
|
||||||
|
operator: Exists
|
||||||
topologySpreadConstraints:
|
topologySpreadConstraints:
|
||||||
- labelSelector:
|
- labelSelector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
|
|
|
||||||
|
|
@ -1752,7 +1752,7 @@ spec:
|
||||||
- mountPath: /var/run/secrets/amazonaws.com/
|
- mountPath: /var/run/secrets/amazonaws.com/
|
||||||
name: token-amazonaws-com
|
name: token-amazonaws-com
|
||||||
readOnly: true
|
readOnly: true
|
||||||
dnsPolicy: Default
|
dnsPolicy: ClusterFirst
|
||||||
priorityClassName: system-cluster-critical
|
priorityClassName: system-cluster-critical
|
||||||
securityContext:
|
securityContext:
|
||||||
fsGroup: 1000
|
fsGroup: 1000
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,12 @@ spec:
|
||||||
- key: "CriticalAddonsOnly"
|
- key: "CriticalAddonsOnly"
|
||||||
operator: "Exists"
|
operator: "Exists"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if KarpenterEnabled }}
|
||||||
|
- key: node-role.kubernetes.io/master
|
||||||
|
operator: Exists
|
||||||
|
- key: node-role.kubernetes.io/control-plane
|
||||||
|
operator: Exists
|
||||||
|
{{- end }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
kubernetes.io/os: linux
|
kubernetes.io/os: linux
|
||||||
{{- if .KubeDNS.Affinity }}
|
{{- if .KubeDNS.Affinity }}
|
||||||
|
|
|
||||||
|
|
@ -1478,7 +1478,8 @@ spec:
|
||||||
securityContext:
|
securityContext:
|
||||||
fsGroup: 1000
|
fsGroup: 1000
|
||||||
priorityClassName: "system-cluster-critical"
|
priorityClassName: "system-cluster-critical"
|
||||||
dnsPolicy: Default
|
# Must use ClusterFirst on IPv6 clusters in order to get DNS64
|
||||||
|
dnsPolicy: ClusterFirst
|
||||||
containers:
|
containers:
|
||||||
- name: controller
|
- name: controller
|
||||||
image: public.ecr.aws/karpenter/controller:v0.28.1
|
image: public.ecr.aws/karpenter/controller:v0.28.1
|
||||||
|
|
|
||||||
|
|
@ -1226,7 +1226,7 @@ func (b *BootstrapChannelBuilder) buildAddons(c *fi.CloudupModelBuilderContext)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if b.Cluster.Spec.Karpenter != nil && fi.ValueOf(&b.Cluster.Spec.Karpenter.Enabled) {
|
if b.Cluster.Spec.Karpenter != nil && b.Cluster.Spec.Karpenter.Enabled {
|
||||||
key := "karpenter.sh"
|
key := "karpenter.sh"
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -381,6 +381,9 @@ func (tf *TemplateFunctions) AddTo(dest template.FuncMap, secretStore fi.SecretS
|
||||||
return nodeup.UsesInstanceIDForNodeName(tf.Cluster)
|
return nodeup.UsesInstanceIDForNodeName(tf.Cluster)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dest["KarpenterEnabled"] = func() bool {
|
||||||
|
return cluster.Spec.Karpenter != nil && cluster.Spec.Karpenter.Enabled
|
||||||
|
}
|
||||||
dest["KarpenterInstanceTypes"] = func(ig kops.InstanceGroupSpec) ([]string, error) {
|
dest["KarpenterInstanceTypes"] = func(ig kops.InstanceGroupSpec) ([]string, error) {
|
||||||
return karpenterInstanceTypes(tf.cloud.(awsup.AWSCloud), ig)
|
return karpenterInstanceTypes(tf.cloud.(awsup.AWSCloud), ig)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue