mirror of https://github.com/kubernetes/kops.git
Merge pull request #12234 from hierynomus/coredns-affinity-tolerations
Add ability to provide custom CoreDNS tolerations and affinity
This commit is contained in:
commit
8f91247b59
|
|
@ -2059,6 +2059,872 @@ spec:
|
|||
kubeDNS:
|
||||
description: KubeDNSConfig defines the kube dns configuration
|
||||
properties:
|
||||
affinity:
|
||||
description: Affinity is the kube-dns affinity, uses the same
|
||||
syntax as kubectl's affinity
|
||||
properties:
|
||||
nodeAffinity:
|
||||
description: Describes node affinity scheduling rules for
|
||||
the pod.
|
||||
properties:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
description: The scheduler will prefer to schedule pods
|
||||
to nodes that satisfy the affinity expressions specified
|
||||
by this field, but it may choose a node that violates
|
||||
one or more of the expressions. The node that is most
|
||||
preferred is the one with the greatest sum of weights,
|
||||
i.e. for each node that meets all of the scheduling
|
||||
requirements (resource request, requiredDuringScheduling
|
||||
affinity expressions, etc.), compute a sum by iterating
|
||||
through the elements of this field and adding "weight"
|
||||
to the sum if the node matches the corresponding matchExpressions;
|
||||
the node(s) with the highest sum are the most preferred.
|
||||
items:
|
||||
description: An empty preferred scheduling term matches
|
||||
all objects with implicit weight 0 (i.e. it's a no-op).
|
||||
A null preferred scheduling term matches no objects
|
||||
(i.e. is also a no-op).
|
||||
properties:
|
||||
preference:
|
||||
description: A node selector term, associated with
|
||||
the corresponding weight.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: A list of node selector requirements
|
||||
by node's labels.
|
||||
items:
|
||||
description: A node selector requirement is
|
||||
a selector that contains values, a key,
|
||||
and an operator that relates the key and
|
||||
values.
|
||||
properties:
|
||||
key:
|
||||
description: The label key that the selector
|
||||
applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: Represents a key's relationship
|
||||
to a set of values. Valid operators
|
||||
are In, NotIn, Exists, DoesNotExist.
|
||||
Gt, and Lt.
|
||||
type: string
|
||||
values:
|
||||
description: An array of string values.
|
||||
If the operator is In or NotIn, the
|
||||
values array must be non-empty. If the
|
||||
operator is Exists or DoesNotExist,
|
||||
the values array must be empty. If the
|
||||
operator is Gt or Lt, the values array
|
||||
must have a single element, which will
|
||||
be interpreted as an integer. This array
|
||||
is replaced during a strategic merge
|
||||
patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchFields:
|
||||
description: A list of node selector requirements
|
||||
by node's fields.
|
||||
items:
|
||||
description: A node selector requirement is
|
||||
a selector that contains values, a key,
|
||||
and an operator that relates the key and
|
||||
values.
|
||||
properties:
|
||||
key:
|
||||
description: The label key that the selector
|
||||
applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: Represents a key's relationship
|
||||
to a set of values. Valid operators
|
||||
are In, NotIn, Exists, DoesNotExist.
|
||||
Gt, and Lt.
|
||||
type: string
|
||||
values:
|
||||
description: An array of string values.
|
||||
If the operator is In or NotIn, the
|
||||
values array must be non-empty. If the
|
||||
operator is Exists or DoesNotExist,
|
||||
the values array must be empty. If the
|
||||
operator is Gt or Lt, the values array
|
||||
must have a single element, which will
|
||||
be interpreted as an integer. This array
|
||||
is replaced during a strategic merge
|
||||
patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
weight:
|
||||
description: Weight associated with matching the
|
||||
corresponding nodeSelectorTerm, in the range 1-100.
|
||||
format: int32
|
||||
type: integer
|
||||
required:
|
||||
- preference
|
||||
- weight
|
||||
type: object
|
||||
type: array
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
description: If the affinity requirements specified by
|
||||
this field are not met at scheduling time, the pod will
|
||||
not be scheduled onto the node. If the affinity requirements
|
||||
specified by this field cease to be met at some point
|
||||
during pod execution (e.g. due to an update), the system
|
||||
may or may not try to eventually evict the pod from
|
||||
its node.
|
||||
properties:
|
||||
nodeSelectorTerms:
|
||||
description: Required. A list of node selector terms.
|
||||
The terms are ORed.
|
||||
items:
|
||||
description: A null or empty node selector term
|
||||
matches no objects. The requirements of them are
|
||||
ANDed. The TopologySelectorTerm type implements
|
||||
a subset of the NodeSelectorTerm.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: A list of node selector requirements
|
||||
by node's labels.
|
||||
items:
|
||||
description: A node selector requirement is
|
||||
a selector that contains values, a key,
|
||||
and an operator that relates the key and
|
||||
values.
|
||||
properties:
|
||||
key:
|
||||
description: The label key that the selector
|
||||
applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: Represents a key's relationship
|
||||
to a set of values. Valid operators
|
||||
are In, NotIn, Exists, DoesNotExist.
|
||||
Gt, and Lt.
|
||||
type: string
|
||||
values:
|
||||
description: An array of string values.
|
||||
If the operator is In or NotIn, the
|
||||
values array must be non-empty. If the
|
||||
operator is Exists or DoesNotExist,
|
||||
the values array must be empty. If the
|
||||
operator is Gt or Lt, the values array
|
||||
must have a single element, which will
|
||||
be interpreted as an integer. This array
|
||||
is replaced during a strategic merge
|
||||
patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchFields:
|
||||
description: A list of node selector requirements
|
||||
by node's fields.
|
||||
items:
|
||||
description: A node selector requirement is
|
||||
a selector that contains values, a key,
|
||||
and an operator that relates the key and
|
||||
values.
|
||||
properties:
|
||||
key:
|
||||
description: The label key that the selector
|
||||
applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: Represents a key's relationship
|
||||
to a set of values. Valid operators
|
||||
are In, NotIn, Exists, DoesNotExist.
|
||||
Gt, and Lt.
|
||||
type: string
|
||||
values:
|
||||
description: An array of string values.
|
||||
If the operator is In or NotIn, the
|
||||
values array must be non-empty. If the
|
||||
operator is Exists or DoesNotExist,
|
||||
the values array must be empty. If the
|
||||
operator is Gt or Lt, the values array
|
||||
must have a single element, which will
|
||||
be interpreted as an integer. This array
|
||||
is replaced during a strategic merge
|
||||
patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- nodeSelectorTerms
|
||||
type: object
|
||||
type: object
|
||||
podAffinity:
|
||||
description: Describes pod affinity scheduling rules (e.g.
|
||||
co-locate this pod in the same node, zone, etc. as some
|
||||
other pod(s)).
|
||||
properties:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
description: The scheduler will prefer to schedule pods
|
||||
to nodes that satisfy the affinity expressions specified
|
||||
by this field, but it may choose a node that violates
|
||||
one or more of the expressions. The node that is most
|
||||
preferred is the one with the greatest sum of weights,
|
||||
i.e. for each node that meets all of the scheduling
|
||||
requirements (resource request, requiredDuringScheduling
|
||||
affinity expressions, etc.), compute a sum by iterating
|
||||
through the elements of this field and adding "weight"
|
||||
to the sum if the node has pods which matches the corresponding
|
||||
podAffinityTerm; the node(s) with the highest sum are
|
||||
the most preferred.
|
||||
items:
|
||||
description: The weights of all of the matched WeightedPodAffinityTerm
|
||||
fields are added per-node to find the most preferred
|
||||
node(s)
|
||||
properties:
|
||||
podAffinityTerm:
|
||||
description: Required. A pod affinity term, associated
|
||||
with the corresponding weight.
|
||||
properties:
|
||||
labelSelector:
|
||||
description: A label query over a set of resources,
|
||||
in this case pods.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list
|
||||
of label selector requirements. The requirements
|
||||
are ANDed.
|
||||
items:
|
||||
description: A label selector requirement
|
||||
is a selector that contains values,
|
||||
a key, and an operator that relates
|
||||
the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key
|
||||
that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a
|
||||
key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists
|
||||
and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of
|
||||
string values. If the operator is
|
||||
In or NotIn, the values array must
|
||||
be non-empty. If the operator is
|
||||
Exists or DoesNotExist, the values
|
||||
array must be empty. This array
|
||||
is replaced during a strategic merge
|
||||
patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value}
|
||||
pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions,
|
||||
whose key field is "key", the operator
|
||||
is "In", and the values array contains
|
||||
only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
namespaceSelector:
|
||||
description: A label query over the set of namespaces
|
||||
that the term applies to. The term is applied
|
||||
to the union of the namespaces selected by
|
||||
this field and the ones listed in the namespaces
|
||||
field. null selector and null or empty namespaces
|
||||
list means "this pod's namespace". An empty
|
||||
selector ({}) matches all namespaces. This
|
||||
field is beta-level and is only honored when
|
||||
PodAffinityNamespaceSelector feature is enabled.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list
|
||||
of label selector requirements. The requirements
|
||||
are ANDed.
|
||||
items:
|
||||
description: A label selector requirement
|
||||
is a selector that contains values,
|
||||
a key, and an operator that relates
|
||||
the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key
|
||||
that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a
|
||||
key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists
|
||||
and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of
|
||||
string values. If the operator is
|
||||
In or NotIn, the values array must
|
||||
be non-empty. If the operator is
|
||||
Exists or DoesNotExist, the values
|
||||
array must be empty. This array
|
||||
is replaced during a strategic merge
|
||||
patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value}
|
||||
pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions,
|
||||
whose key field is "key", the operator
|
||||
is "In", and the values array contains
|
||||
only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
namespaces:
|
||||
description: namespaces specifies a static list
|
||||
of namespace names that the term applies to.
|
||||
The term is applied to the union of the namespaces
|
||||
listed in this field and the ones selected
|
||||
by namespaceSelector. null or empty namespaces
|
||||
list and null namespaceSelector means "this
|
||||
pod's namespace"
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
topologyKey:
|
||||
description: This pod should be co-located (affinity)
|
||||
or not co-located (anti-affinity) with the
|
||||
pods matching the labelSelector in the specified
|
||||
namespaces, where co-located is defined as
|
||||
running on a node whose value of the label
|
||||
with key topologyKey matches that of any node
|
||||
on which any of the selected pods is running.
|
||||
Empty topologyKey is not allowed.
|
||||
type: string
|
||||
required:
|
||||
- topologyKey
|
||||
type: object
|
||||
weight:
|
||||
description: weight associated with matching the
|
||||
corresponding podAffinityTerm, in the range 1-100.
|
||||
format: int32
|
||||
type: integer
|
||||
required:
|
||||
- podAffinityTerm
|
||||
- weight
|
||||
type: object
|
||||
type: array
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
description: If the affinity requirements specified by
|
||||
this field are not met at scheduling time, the pod will
|
||||
not be scheduled onto the node. If the affinity requirements
|
||||
specified by this field cease to be met at some point
|
||||
during pod execution (e.g. due to a pod label update),
|
||||
the system may or may not try to eventually evict the
|
||||
pod from its node. When there are multiple elements,
|
||||
the lists of nodes corresponding to each podAffinityTerm
|
||||
are intersected, i.e. all terms must be satisfied.
|
||||
items:
|
||||
description: Defines a set of pods (namely those matching
|
||||
the labelSelector relative to the given namespace(s))
|
||||
that this pod should be co-located (affinity) or not
|
||||
co-located (anti-affinity) with, where co-located
|
||||
is defined as running on a node whose value of the
|
||||
label with key <topologyKey> matches that of any node
|
||||
on which a pod of the set of pods is running
|
||||
properties:
|
||||
labelSelector:
|
||||
description: A label query over a set of resources,
|
||||
in this case pods.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label
|
||||
selector requirements. The requirements are
|
||||
ANDed.
|
||||
items:
|
||||
description: A label selector requirement
|
||||
is a selector that contains values, a key,
|
||||
and an operator that relates the key and
|
||||
values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that
|
||||
the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's
|
||||
relationship to a set of values. Valid
|
||||
operators are In, NotIn, Exists and
|
||||
DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string
|
||||
values. If the operator is In or NotIn,
|
||||
the values array must be non-empty.
|
||||
If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This
|
||||
array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value}
|
||||
pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions,
|
||||
whose key field is "key", the operator is
|
||||
"In", and the values array contains only "value".
|
||||
The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
namespaceSelector:
|
||||
description: A label query over the set of namespaces
|
||||
that the term applies to. The term is applied
|
||||
to the union of the namespaces selected by this
|
||||
field and the ones listed in the namespaces field.
|
||||
null selector and null or empty namespaces list
|
||||
means "this pod's namespace". An empty selector
|
||||
({}) matches all namespaces. This field is beta-level
|
||||
and is only honored when PodAffinityNamespaceSelector
|
||||
feature is enabled.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label
|
||||
selector requirements. The requirements are
|
||||
ANDed.
|
||||
items:
|
||||
description: A label selector requirement
|
||||
is a selector that contains values, a key,
|
||||
and an operator that relates the key and
|
||||
values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that
|
||||
the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's
|
||||
relationship to a set of values. Valid
|
||||
operators are In, NotIn, Exists and
|
||||
DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string
|
||||
values. If the operator is In or NotIn,
|
||||
the values array must be non-empty.
|
||||
If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This
|
||||
array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value}
|
||||
pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions,
|
||||
whose key field is "key", the operator is
|
||||
"In", and the values array contains only "value".
|
||||
The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
namespaces:
|
||||
description: namespaces specifies a static list
|
||||
of namespace names that the term applies to. The
|
||||
term is applied to the union of the namespaces
|
||||
listed in this field and the ones selected by
|
||||
namespaceSelector. null or empty namespaces list
|
||||
and null namespaceSelector means "this pod's namespace"
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
topologyKey:
|
||||
description: This pod should be co-located (affinity)
|
||||
or not co-located (anti-affinity) with the pods
|
||||
matching the labelSelector in the specified namespaces,
|
||||
where co-located is defined as running on a node
|
||||
whose value of the label with key topologyKey
|
||||
matches that of any node on which any of the selected
|
||||
pods is running. Empty topologyKey is not allowed.
|
||||
type: string
|
||||
required:
|
||||
- topologyKey
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
podAntiAffinity:
|
||||
description: Describes pod anti-affinity scheduling rules
|
||||
(e.g. avoid putting this pod in the same node, zone, etc.
|
||||
as some other pod(s)).
|
||||
properties:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
description: The scheduler will prefer to schedule pods
|
||||
to nodes that satisfy the anti-affinity expressions
|
||||
specified by this field, but it may choose a node that
|
||||
violates one or more of the expressions. The node that
|
||||
is most preferred is the one with the greatest sum of
|
||||
weights, i.e. for each node that meets all of the scheduling
|
||||
requirements (resource request, requiredDuringScheduling
|
||||
anti-affinity expressions, etc.), compute a sum by iterating
|
||||
through the elements of this field and adding "weight"
|
||||
to the sum if the node has pods which matches the corresponding
|
||||
podAffinityTerm; the node(s) with the highest sum are
|
||||
the most preferred.
|
||||
items:
|
||||
description: The weights of all of the matched WeightedPodAffinityTerm
|
||||
fields are added per-node to find the most preferred
|
||||
node(s)
|
||||
properties:
|
||||
podAffinityTerm:
|
||||
description: Required. A pod affinity term, associated
|
||||
with the corresponding weight.
|
||||
properties:
|
||||
labelSelector:
|
||||
description: A label query over a set of resources,
|
||||
in this case pods.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list
|
||||
of label selector requirements. The requirements
|
||||
are ANDed.
|
||||
items:
|
||||
description: A label selector requirement
|
||||
is a selector that contains values,
|
||||
a key, and an operator that relates
|
||||
the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key
|
||||
that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a
|
||||
key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists
|
||||
and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of
|
||||
string values. If the operator is
|
||||
In or NotIn, the values array must
|
||||
be non-empty. If the operator is
|
||||
Exists or DoesNotExist, the values
|
||||
array must be empty. This array
|
||||
is replaced during a strategic merge
|
||||
patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value}
|
||||
pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions,
|
||||
whose key field is "key", the operator
|
||||
is "In", and the values array contains
|
||||
only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
namespaceSelector:
|
||||
description: A label query over the set of namespaces
|
||||
that the term applies to. The term is applied
|
||||
to the union of the namespaces selected by
|
||||
this field and the ones listed in the namespaces
|
||||
field. null selector and null or empty namespaces
|
||||
list means "this pod's namespace". An empty
|
||||
selector ({}) matches all namespaces. This
|
||||
field is beta-level and is only honored when
|
||||
PodAffinityNamespaceSelector feature is enabled.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list
|
||||
of label selector requirements. The requirements
|
||||
are ANDed.
|
||||
items:
|
||||
description: A label selector requirement
|
||||
is a selector that contains values,
|
||||
a key, and an operator that relates
|
||||
the key and values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key
|
||||
that the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a
|
||||
key's relationship to a set of values.
|
||||
Valid operators are In, NotIn, Exists
|
||||
and DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of
|
||||
string values. If the operator is
|
||||
In or NotIn, the values array must
|
||||
be non-empty. If the operator is
|
||||
Exists or DoesNotExist, the values
|
||||
array must be empty. This array
|
||||
is replaced during a strategic merge
|
||||
patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value}
|
||||
pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions,
|
||||
whose key field is "key", the operator
|
||||
is "In", and the values array contains
|
||||
only "value". The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
namespaces:
|
||||
description: namespaces specifies a static list
|
||||
of namespace names that the term applies to.
|
||||
The term is applied to the union of the namespaces
|
||||
listed in this field and the ones selected
|
||||
by namespaceSelector. null or empty namespaces
|
||||
list and null namespaceSelector means "this
|
||||
pod's namespace"
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
topologyKey:
|
||||
description: This pod should be co-located (affinity)
|
||||
or not co-located (anti-affinity) with the
|
||||
pods matching the labelSelector in the specified
|
||||
namespaces, where co-located is defined as
|
||||
running on a node whose value of the label
|
||||
with key topologyKey matches that of any node
|
||||
on which any of the selected pods is running.
|
||||
Empty topologyKey is not allowed.
|
||||
type: string
|
||||
required:
|
||||
- topologyKey
|
||||
type: object
|
||||
weight:
|
||||
description: weight associated with matching the
|
||||
corresponding podAffinityTerm, in the range 1-100.
|
||||
format: int32
|
||||
type: integer
|
||||
required:
|
||||
- podAffinityTerm
|
||||
- weight
|
||||
type: object
|
||||
type: array
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
description: If the anti-affinity requirements specified
|
||||
by this field are not met at scheduling time, the pod
|
||||
will not be scheduled onto the node. If the anti-affinity
|
||||
requirements specified by this field cease to be met
|
||||
at some point during pod execution (e.g. due to a pod
|
||||
label update), the system may or may not try to eventually
|
||||
evict the pod from its node. When there are multiple
|
||||
elements, the lists of nodes corresponding to each podAffinityTerm
|
||||
are intersected, i.e. all terms must be satisfied.
|
||||
items:
|
||||
description: Defines a set of pods (namely those matching
|
||||
the labelSelector relative to the given namespace(s))
|
||||
that this pod should be co-located (affinity) or not
|
||||
co-located (anti-affinity) with, where co-located
|
||||
is defined as running on a node whose value of the
|
||||
label with key <topologyKey> matches that of any node
|
||||
on which a pod of the set of pods is running
|
||||
properties:
|
||||
labelSelector:
|
||||
description: A label query over a set of resources,
|
||||
in this case pods.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label
|
||||
selector requirements. The requirements are
|
||||
ANDed.
|
||||
items:
|
||||
description: A label selector requirement
|
||||
is a selector that contains values, a key,
|
||||
and an operator that relates the key and
|
||||
values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that
|
||||
the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's
|
||||
relationship to a set of values. Valid
|
||||
operators are In, NotIn, Exists and
|
||||
DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string
|
||||
values. If the operator is In or NotIn,
|
||||
the values array must be non-empty.
|
||||
If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This
|
||||
array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value}
|
||||
pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions,
|
||||
whose key field is "key", the operator is
|
||||
"In", and the values array contains only "value".
|
||||
The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
namespaceSelector:
|
||||
description: A label query over the set of namespaces
|
||||
that the term applies to. The term is applied
|
||||
to the union of the namespaces selected by this
|
||||
field and the ones listed in the namespaces field.
|
||||
null selector and null or empty namespaces list
|
||||
means "this pod's namespace". An empty selector
|
||||
({}) matches all namespaces. This field is beta-level
|
||||
and is only honored when PodAffinityNamespaceSelector
|
||||
feature is enabled.
|
||||
properties:
|
||||
matchExpressions:
|
||||
description: matchExpressions is a list of label
|
||||
selector requirements. The requirements are
|
||||
ANDed.
|
||||
items:
|
||||
description: A label selector requirement
|
||||
is a selector that contains values, a key,
|
||||
and an operator that relates the key and
|
||||
values.
|
||||
properties:
|
||||
key:
|
||||
description: key is the label key that
|
||||
the selector applies to.
|
||||
type: string
|
||||
operator:
|
||||
description: operator represents a key's
|
||||
relationship to a set of values. Valid
|
||||
operators are In, NotIn, Exists and
|
||||
DoesNotExist.
|
||||
type: string
|
||||
values:
|
||||
description: values is an array of string
|
||||
values. If the operator is In or NotIn,
|
||||
the values array must be non-empty.
|
||||
If the operator is Exists or DoesNotExist,
|
||||
the values array must be empty. This
|
||||
array is replaced during a strategic
|
||||
merge patch.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- key
|
||||
- operator
|
||||
type: object
|
||||
type: array
|
||||
matchLabels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: matchLabels is a map of {key,value}
|
||||
pairs. A single {key,value} in the matchLabels
|
||||
map is equivalent to an element of matchExpressions,
|
||||
whose key field is "key", the operator is
|
||||
"In", and the values array contains only "value".
|
||||
The requirements are ANDed.
|
||||
type: object
|
||||
type: object
|
||||
namespaces:
|
||||
description: namespaces specifies a static list
|
||||
of namespace names that the term applies to. The
|
||||
term is applied to the union of the namespaces
|
||||
listed in this field and the ones selected by
|
||||
namespaceSelector. null or empty namespaces list
|
||||
and null namespaceSelector means "this pod's namespace"
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
topologyKey:
|
||||
description: This pod should be co-located (affinity)
|
||||
or not co-located (anti-affinity) with the pods
|
||||
matching the labelSelector in the specified namespaces,
|
||||
where co-located is defined as running on a node
|
||||
whose value of the label with key topologyKey
|
||||
matches that of any node on which any of the selected
|
||||
pods is running. Empty topologyKey is not allowed.
|
||||
type: string
|
||||
required:
|
||||
- topologyKey
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
cacheMaxConcurrent:
|
||||
description: CacheMaxConcurrent is the maximum number of concurrent
|
||||
queries for dnsmasq
|
||||
|
|
@ -2166,6 +3032,48 @@ spec:
|
|||
type: array
|
||||
description: StubDomains redirects a domains to another DNS service
|
||||
type: object
|
||||
tolerations:
|
||||
description: "Tolerations\tare tolerations to apply to the kube-dns
|
||||
deployment"
|
||||
items:
|
||||
description: The pod this Toleration is attached to tolerates
|
||||
any taint that matches the triple <key,value,effect> using
|
||||
the matching operator <operator>.
|
||||
properties:
|
||||
effect:
|
||||
description: Effect indicates the taint effect to match.
|
||||
Empty means match all taint effects. When specified, allowed
|
||||
values are NoSchedule, PreferNoSchedule and NoExecute.
|
||||
type: string
|
||||
key:
|
||||
description: Key is the taint key that the toleration applies
|
||||
to. Empty means match all taint keys. If the key is empty,
|
||||
operator must be Exists; this combination means to match
|
||||
all values and all keys.
|
||||
type: string
|
||||
operator:
|
||||
description: Operator represents a key's relationship to
|
||||
the value. Valid operators are Exists and Equal. Defaults
|
||||
to Equal. Exists is equivalent to wildcard for value,
|
||||
so that a pod can tolerate all taints of a particular
|
||||
category.
|
||||
type: string
|
||||
tolerationSeconds:
|
||||
description: TolerationSeconds represents the period of
|
||||
time the toleration (which must be of effect NoExecute,
|
||||
otherwise this field is ignored) tolerates the taint.
|
||||
By default, it is not set, which means tolerate the taint
|
||||
forever (do not evict). Zero and negative values will
|
||||
be treated as 0 (evict immediately) by the system.
|
||||
format: int64
|
||||
type: integer
|
||||
value:
|
||||
description: Value is the taint value the toleration matches
|
||||
to. If the operator is Exists, the value should be empty,
|
||||
otherwise just a regular string.
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
upstreamNameservers:
|
||||
description: UpstreamNameservers sets the upstream nameservers
|
||||
for queries not on the cluster domain
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ go_library(
|
|||
"//util/pkg/architectures:go_default_library",
|
||||
"//util/pkg/vfs:go_default_library",
|
||||
"//vendor/github.com/blang/semver/v4:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ package kops
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
|
|
@ -471,6 +472,10 @@ type KubeDNSConfig struct {
|
|||
CacheMaxSize int `json:"cacheMaxSize,omitempty"`
|
||||
// CacheMaxConcurrent is the maximum number of concurrent queries for dnsmasq
|
||||
CacheMaxConcurrent int `json:"cacheMaxConcurrent,omitempty"`
|
||||
// Tolerations are tolerations to apply to the kube-dns deployment
|
||||
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
|
||||
// Affinity is the kube-dns affinity, uses the same syntax as kubectl's affinity
|
||||
Affinity *corev1.Affinity `json:"affinity,omitempty"`
|
||||
// CoreDNSImage is used to override the default image used for CoreDNS
|
||||
CoreDNSImage string `json:"coreDNSImage,omitempty"`
|
||||
// CPAImage is used to override the default image used for Cluster Proportional Autoscaler
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ go_library(
|
|||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//pkg/apis/kops:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ limitations under the License.
|
|||
package v1alpha2
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
|
|
@ -472,6 +473,10 @@ type KubeDNSConfig struct {
|
|||
CacheMaxSize int `json:"cacheMaxSize,omitempty"`
|
||||
// CacheMaxConcurrent is the maximum number of concurrent queries for dnsmasq
|
||||
CacheMaxConcurrent int `json:"cacheMaxConcurrent,omitempty"`
|
||||
// Tolerations are tolerations to apply to the kube-dns deployment
|
||||
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
|
||||
// Affinity is the kube-dns affinity, uses the same syntax as kubectl's affinity
|
||||
Affinity *corev1.Affinity `json:"affinity,omitempty"`
|
||||
// CoreDNSImage is used to override the default image used for CoreDNS
|
||||
CoreDNSImage string `json:"coreDNSImage,omitempty"`
|
||||
// CPAImage is used to override the default image used for Cluster Proportional Autoscaler
|
||||
|
|
|
|||
|
|
@ -5040,6 +5040,8 @@ func Convert_kops_KubeControllerManagerConfig_To_v1alpha2_KubeControllerManagerC
|
|||
func autoConvert_v1alpha2_KubeDNSConfig_To_kops_KubeDNSConfig(in *KubeDNSConfig, out *kops.KubeDNSConfig, s conversion.Scope) error {
|
||||
out.CacheMaxSize = in.CacheMaxSize
|
||||
out.CacheMaxConcurrent = in.CacheMaxConcurrent
|
||||
out.Tolerations = in.Tolerations
|
||||
out.Affinity = in.Affinity
|
||||
out.CoreDNSImage = in.CoreDNSImage
|
||||
out.CPAImage = in.CPAImage
|
||||
out.Domain = in.Domain
|
||||
|
|
@ -5073,6 +5075,8 @@ func Convert_v1alpha2_KubeDNSConfig_To_kops_KubeDNSConfig(in *KubeDNSConfig, out
|
|||
func autoConvert_kops_KubeDNSConfig_To_v1alpha2_KubeDNSConfig(in *kops.KubeDNSConfig, out *KubeDNSConfig, s conversion.Scope) error {
|
||||
out.CacheMaxSize = in.CacheMaxSize
|
||||
out.CacheMaxConcurrent = in.CacheMaxConcurrent
|
||||
out.Tolerations = in.Tolerations
|
||||
out.Affinity = in.Affinity
|
||||
out.CoreDNSImage = in.CoreDNSImage
|
||||
out.CPAImage = in.CPAImage
|
||||
out.Domain = in.Domain
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ limitations under the License.
|
|||
package v1alpha2
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
intstr "k8s.io/apimachinery/pkg/util/intstr"
|
||||
|
|
@ -3084,6 +3085,18 @@ func (in *KubeControllerManagerConfig) DeepCopy() *KubeControllerManagerConfig {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *KubeDNSConfig) DeepCopyInto(out *KubeDNSConfig) {
|
||||
*out = *in
|
||||
if in.Tolerations != nil {
|
||||
in, out := &in.Tolerations, &out.Tolerations
|
||||
*out = make([]corev1.Toleration, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.Affinity != nil {
|
||||
in, out := &in.Affinity, &out.Affinity
|
||||
*out = new(corev1.Affinity)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.StubDomains != nil {
|
||||
in, out := &in.StubDomains, &out.StubDomains
|
||||
*out = make(map[string][]string, len(*in))
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ limitations under the License.
|
|||
package kops
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
intstr "k8s.io/apimachinery/pkg/util/intstr"
|
||||
|
|
@ -3250,6 +3251,18 @@ func (in *KubeControllerManagerConfig) DeepCopy() *KubeControllerManagerConfig {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *KubeDNSConfig) DeepCopyInto(out *KubeDNSConfig) {
|
||||
*out = *in
|
||||
if in.Tolerations != nil {
|
||||
in, out := &in.Tolerations, &out.Tolerations
|
||||
*out = make([]corev1.Toleration, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.Affinity != nil {
|
||||
in, out := &in.Affinity, &out.Affinity
|
||||
*out = new(corev1.Affinity)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.StubDomains != nil {
|
||||
in, out := &in.StubDomains, &out.StubDomains
|
||||
*out = make(map[string][]string, len(*in))
|
||||
|
|
|
|||
|
|
@ -117,11 +117,18 @@ spec:
|
|||
priorityClassName: system-cluster-critical
|
||||
serviceAccountName: coredns
|
||||
tolerations:
|
||||
{{- if KubeDNS.Tolerations }}
|
||||
{{ ToYAML .KubeDNS.Tolerations | indent 8 }}
|
||||
{{- else }}
|
||||
- key: "CriticalAddonsOnly"
|
||||
operator: "Exists"
|
||||
{{- end }}
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
affinity:
|
||||
{{- if .KubeDNS.Affinity }}
|
||||
{{ ToYAML .KubeDNS.Affinity | indent 8 }}
|
||||
{{- else }}
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 100
|
||||
|
|
@ -132,6 +139,7 @@ spec:
|
|||
operator: In
|
||||
values: ["kube-dns"]
|
||||
topologyKey: kubernetes.io/hostname
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: coredns
|
||||
image: {{ if KubeDNS.CoreDNSImage }}{{ KubeDNS.CoreDNSImage }}{{ else }}k8s.gcr.io/coredns/coredns:v1.8.4{{ end }}
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ go_library(
|
|||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library",
|
||||
"//vendor/k8s.io/klog/v2:go_default_library",
|
||||
"//vendor/sigs.k8s.io/yaml:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ func TestBootstrapChannelBuilder_BuildTasks(t *testing.T) {
|
|||
runChannelBuilderTest(t, "metrics-server/insecure-1.19", []string{"metrics-server.addons.k8s.io-k8s-1.11"})
|
||||
runChannelBuilderTest(t, "metrics-server/secure-1.18", []string{"metrics-server.addons.k8s.io-k8s-1.11"})
|
||||
runChannelBuilderTest(t, "metrics-server/secure-1.19", []string{"metrics-server.addons.k8s.io-k8s-1.11"})
|
||||
runChannelBuilderTest(t, "coredns", []string{"coredns.addons.k8s.io-k8s-1.12"})
|
||||
}
|
||||
|
||||
func TestBootstrapChannelBuilder_ServiceAccountIAM(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ import (
|
|||
"k8s.io/kops/upup/pkg/fi/cloudup/awsup"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/gce"
|
||||
"k8s.io/kops/util/pkg/env"
|
||||
"sigs.k8s.io/yaml"
|
||||
)
|
||||
|
||||
// TemplateFunctions provides a collection of methods used throughout the templates
|
||||
|
|
@ -73,6 +74,7 @@ func (tf *TemplateFunctions) AddTo(dest template.FuncMap, secretStore fi.SecretS
|
|||
dest["EtcdScheme"] = tf.EtcdScheme
|
||||
dest["SharedVPC"] = tf.SharedVPC
|
||||
dest["ToJSON"] = tf.ToJSON
|
||||
dest["ToYAML"] = tf.ToYAML
|
||||
dest["UseBootstrapTokens"] = tf.UseBootstrapTokens
|
||||
dest["UseEtcdTLS"] = tf.UseEtcdTLS
|
||||
// Remember that we may be on a different arch from the target. Hard-code for now.
|
||||
|
|
@ -268,6 +270,16 @@ func (tf *TemplateFunctions) ToJSON(data interface{}) string {
|
|||
return string(encoded)
|
||||
}
|
||||
|
||||
// ToYAML returns a yaml representation of the struct or on error an empty string
|
||||
func (tf *TemplateFunctions) ToYAML(data interface{}) string {
|
||||
encoded, err := yaml.Marshal(data)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return string(encoded)
|
||||
}
|
||||
|
||||
// EtcdScheme parses and grabs the protocol to the etcd cluster
|
||||
func (tf *TemplateFunctions) EtcdScheme() string {
|
||||
if tf.UseEtcdTLS() {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,64 @@
|
|||
apiVersion: kops.k8s.io/v1alpha2
|
||||
kind: Cluster
|
||||
metadata:
|
||||
creationTimestamp: "2016-12-10T22:42:27Z"
|
||||
name: minimal.example.com
|
||||
spec:
|
||||
kubernetesApiAccess:
|
||||
- 0.0.0.0/0
|
||||
channel: stable
|
||||
cloudProvider: aws
|
||||
configBase: memfs://clusters.example.com/minimal.example.com
|
||||
etcdClusters:
|
||||
- etcdMembers:
|
||||
- instanceGroup: master-us-test-1a
|
||||
name: master-us-test-1a
|
||||
name: main
|
||||
- etcdMembers:
|
||||
- instanceGroup: master-us-test-1a
|
||||
name: master-us-test-1a
|
||||
name: events
|
||||
iam: {}
|
||||
kubernetesVersion: v1.20.0
|
||||
kubeDNS:
|
||||
provider: CoreDNS
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
operator: Exists
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kops.k8s.io/instancegroup
|
||||
operator: In
|
||||
values:
|
||||
- master
|
||||
- ondemand-nodes
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- podAffinityTerm:
|
||||
labelSelector:
|
||||
matchExpressions:
|
||||
- key: k8s-app
|
||||
operator: In
|
||||
values:
|
||||
- kube-dns
|
||||
topologyKey: kubernetes.io/hostname
|
||||
weight: 100
|
||||
masterInternalName: api.internal.minimal.example.com
|
||||
masterPublicName: api.minimal.example.com
|
||||
networkCIDR: 172.20.0.0/16
|
||||
networking:
|
||||
cni: {}
|
||||
nonMasqueradeCIDR: 100.64.0.0/10
|
||||
sshAccess:
|
||||
- 0.0.0.0/0
|
||||
topology:
|
||||
masters: public
|
||||
nodes: public
|
||||
subnets:
|
||||
- cidr: 172.20.32.0/19
|
||||
name: us-test-1a
|
||||
type: Public
|
||||
zone: us-test-1a
|
||||
|
|
@ -0,0 +1,392 @@
|
|||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
addon.kops.k8s.io/name: coredns.addons.k8s.io
|
||||
app.kubernetes.io/managed-by: kops
|
||||
k8s-addon: coredns.addons.k8s.io
|
||||
kubernetes.io/cluster-service: "true"
|
||||
name: coredns
|
||||
namespace: kube-system
|
||||
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
addon.kops.k8s.io/name: coredns.addons.k8s.io
|
||||
app.kubernetes.io/managed-by: kops
|
||||
k8s-addon: coredns.addons.k8s.io
|
||||
kubernetes.io/bootstrapping: rbac-defaults
|
||||
name: system:coredns
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- endpoints
|
||||
- services
|
||||
- pods
|
||||
- namespaces
|
||||
verbs:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- discovery.k8s.io
|
||||
resources:
|
||||
- endpointslices
|
||||
verbs:
|
||||
- list
|
||||
- watch
|
||||
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
annotations:
|
||||
rbac.authorization.kubernetes.io/autoupdate: "true"
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
addon.kops.k8s.io/name: coredns.addons.k8s.io
|
||||
app.kubernetes.io/managed-by: kops
|
||||
k8s-addon: coredns.addons.k8s.io
|
||||
kubernetes.io/bootstrapping: rbac-defaults
|
||||
name: system:coredns
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: system:coredns
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: coredns
|
||||
namespace: kube-system
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
data:
|
||||
Corefile: |-
|
||||
.:53 {
|
||||
errors
|
||||
health {
|
||||
lameduck 5s
|
||||
}
|
||||
ready
|
||||
kubernetes cluster.local. in-addr.arpa ip6.arpa {
|
||||
pods insecure
|
||||
fallthrough in-addr.arpa ip6.arpa
|
||||
ttl 30
|
||||
}
|
||||
prometheus :9153
|
||||
forward . /etc/resolv.conf {
|
||||
max_concurrent 1000
|
||||
}
|
||||
cache 30
|
||||
loop
|
||||
reload
|
||||
loadbalance
|
||||
}
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
addon.kops.k8s.io/name: coredns.addons.k8s.io
|
||||
addonmanager.kubernetes.io/mode: EnsureExists
|
||||
app.kubernetes.io/managed-by: kops
|
||||
k8s-addon: coredns.addons.k8s.io
|
||||
name: coredns
|
||||
namespace: kube-system
|
||||
|
||||
---
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
addon.kops.k8s.io/name: coredns.addons.k8s.io
|
||||
app.kubernetes.io/managed-by: kops
|
||||
k8s-addon: coredns.addons.k8s.io
|
||||
k8s-app: kube-dns
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: CoreDNS
|
||||
name: coredns
|
||||
namespace: kube-system
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: kube-dns
|
||||
strategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 10%
|
||||
maxUnavailable: 1
|
||||
type: RollingUpdate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: kube-dns
|
||||
spec:
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kops.k8s.io/instancegroup
|
||||
operator: In
|
||||
values:
|
||||
- master
|
||||
- ondemand-nodes
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- podAffinityTerm:
|
||||
labelSelector:
|
||||
matchExpressions:
|
||||
- key: k8s-app
|
||||
operator: In
|
||||
values:
|
||||
- kube-dns
|
||||
topologyKey: kubernetes.io/hostname
|
||||
weight: 100
|
||||
containers:
|
||||
- args:
|
||||
- -conf
|
||||
- /etc/coredns/Corefile
|
||||
image: k8s.gcr.io/coredns/coredns:v1.8.4
|
||||
imagePullPolicy: IfNotPresent
|
||||
livenessProbe:
|
||||
failureThreshold: 5
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8080
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 60
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 5
|
||||
name: coredns
|
||||
ports:
|
||||
- containerPort: 53
|
||||
name: dns
|
||||
protocol: UDP
|
||||
- containerPort: 53
|
||||
name: dns-tcp
|
||||
protocol: TCP
|
||||
- containerPort: 9153
|
||||
name: metrics
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /ready
|
||||
port: 8181
|
||||
scheme: HTTP
|
||||
resources:
|
||||
limits:
|
||||
memory: 170Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 70Mi
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
add:
|
||||
- NET_BIND_SERVICE
|
||||
drop:
|
||||
- all
|
||||
readOnlyRootFilesystem: true
|
||||
volumeMounts:
|
||||
- mountPath: /etc/coredns
|
||||
name: config-volume
|
||||
readOnly: true
|
||||
dnsPolicy: Default
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
priorityClassName: system-cluster-critical
|
||||
serviceAccountName: coredns
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
operator: Exists
|
||||
volumes:
|
||||
- configMap:
|
||||
items:
|
||||
- key: Corefile
|
||||
path: Corefile
|
||||
name: coredns
|
||||
name: config-volume
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
prometheus.io/port: "9153"
|
||||
prometheus.io/scrape: "true"
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
addon.kops.k8s.io/name: coredns.addons.k8s.io
|
||||
app.kubernetes.io/managed-by: kops
|
||||
k8s-addon: coredns.addons.k8s.io
|
||||
k8s-app: kube-dns
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: CoreDNS
|
||||
name: kube-dns
|
||||
namespace: kube-system
|
||||
resourceVersion: "0"
|
||||
spec:
|
||||
clusterIP: 100.64.0.10
|
||||
ports:
|
||||
- name: dns
|
||||
port: 53
|
||||
protocol: UDP
|
||||
- name: dns-tcp
|
||||
port: 53
|
||||
protocol: TCP
|
||||
- name: metrics
|
||||
port: 9153
|
||||
protocol: TCP
|
||||
selector:
|
||||
k8s-app: kube-dns
|
||||
|
||||
---
|
||||
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
addon.kops.k8s.io/name: coredns.addons.k8s.io
|
||||
app.kubernetes.io/managed-by: kops
|
||||
k8s-addon: coredns.addons.k8s.io
|
||||
name: kube-dns
|
||||
namespace: kube-system
|
||||
spec:
|
||||
minAvailable: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: kube-dns
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
addon.kops.k8s.io/name: coredns.addons.k8s.io
|
||||
app.kubernetes.io/managed-by: kops
|
||||
k8s-addon: coredns.addons.k8s.io
|
||||
name: coredns-autoscaler
|
||||
namespace: kube-system
|
||||
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
addon.kops.k8s.io/name: coredns.addons.k8s.io
|
||||
app.kubernetes.io/managed-by: kops
|
||||
k8s-addon: coredns.addons.k8s.io
|
||||
name: coredns-autoscaler
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes
|
||||
verbs:
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- replicationcontrollers/scale
|
||||
verbs:
|
||||
- get
|
||||
- update
|
||||
- apiGroups:
|
||||
- extensions
|
||||
- apps
|
||||
resources:
|
||||
- deployments/scale
|
||||
- replicasets/scale
|
||||
verbs:
|
||||
- get
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- create
|
||||
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
addon.kops.k8s.io/name: coredns.addons.k8s.io
|
||||
app.kubernetes.io/managed-by: kops
|
||||
k8s-addon: coredns.addons.k8s.io
|
||||
name: coredns-autoscaler
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: coredns-autoscaler
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: coredns-autoscaler
|
||||
namespace: kube-system
|
||||
|
||||
---
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
addon.kops.k8s.io/name: coredns.addons.k8s.io
|
||||
app.kubernetes.io/managed-by: kops
|
||||
k8s-addon: coredns.addons.k8s.io
|
||||
k8s-app: coredns-autoscaler
|
||||
kubernetes.io/cluster-service: "true"
|
||||
name: coredns-autoscaler
|
||||
namespace: kube-system
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: coredns-autoscaler
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
scheduler.alpha.kubernetes.io/critical-pod: ""
|
||||
labels:
|
||||
k8s-app: coredns-autoscaler
|
||||
spec:
|
||||
containers:
|
||||
- command:
|
||||
- /cluster-proportional-autoscaler
|
||||
- --namespace=kube-system
|
||||
- --configmap=coredns-autoscaler
|
||||
- --target=Deployment/coredns
|
||||
- --default-params={"linear":{"coresPerReplica":256,"nodesPerReplica":16,"preventSinglePointFailure":true}}
|
||||
- --logtostderr=true
|
||||
- --v=2
|
||||
image: k8s.gcr.io/cpa/cluster-proportional-autoscaler:1.8.4
|
||||
name: autoscaler
|
||||
resources:
|
||||
requests:
|
||||
cpu: 20m
|
||||
memory: 10Mi
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
priorityClassName: system-cluster-critical
|
||||
serviceAccountName: coredns-autoscaler
|
||||
tolerations:
|
||||
- key: CriticalAddonsOnly
|
||||
operator: Exists
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
kind: Addons
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: bootstrap
|
||||
spec:
|
||||
addons:
|
||||
- id: k8s-1.16
|
||||
manifest: kops-controller.addons.k8s.io/k8s-1.16.yaml
|
||||
manifestHash: 46120dbd8151e5dffad79c48273eb910ff42fa4e05f40f76a39d554d77497f6d
|
||||
name: kops-controller.addons.k8s.io
|
||||
needsRollingUpdate: control-plane
|
||||
selector:
|
||||
k8s-addon: kops-controller.addons.k8s.io
|
||||
- manifest: core.addons.k8s.io/v1.4.0.yaml
|
||||
manifestHash: 18233793a8442224d052e44891e737c67ccfb4e051e95216392319653f4cb0e5
|
||||
name: core.addons.k8s.io
|
||||
selector:
|
||||
k8s-addon: core.addons.k8s.io
|
||||
- id: k8s-1.12
|
||||
manifest: coredns.addons.k8s.io/k8s-1.12.yaml
|
||||
manifestHash: 4a905db12ef6bcd8b94a27064d40502e8d4e2bfd86978e1d9c8833a5cc592967
|
||||
name: coredns.addons.k8s.io
|
||||
selector:
|
||||
k8s-addon: coredns.addons.k8s.io
|
||||
- id: k8s-1.9
|
||||
manifest: kubelet-api.rbac.addons.k8s.io/k8s-1.9.yaml
|
||||
manifestHash: 01c120e887bd98d82ef57983ad58a0b22bc85efb48108092a24c4b82e4c9ea81
|
||||
name: kubelet-api.rbac.addons.k8s.io
|
||||
selector:
|
||||
k8s-addon: kubelet-api.rbac.addons.k8s.io
|
||||
- manifest: limit-range.addons.k8s.io/v1.5.0.yaml
|
||||
manifestHash: 2d55c3bc5e354e84a3730a65b42f39aba630a59dc8d32b30859fcce3d3178bc2
|
||||
name: limit-range.addons.k8s.io
|
||||
selector:
|
||||
k8s-addon: limit-range.addons.k8s.io
|
||||
- id: k8s-1.12
|
||||
manifest: dns-controller.addons.k8s.io/k8s-1.12.yaml
|
||||
manifestHash: 08d576cf7e30936c5a077d9d8439f1a7a1245e737722faa477eb734e87b292aa
|
||||
name: dns-controller.addons.k8s.io
|
||||
selector:
|
||||
k8s-addon: dns-controller.addons.k8s.io
|
||||
- id: v1.15.0
|
||||
manifest: storage-aws.addons.k8s.io/v1.15.0.yaml
|
||||
manifestHash: 065ae832ddac8d0931e9992d6a76f43a33a36975a38003b34f4c5d86a7d42780
|
||||
name: storage-aws.addons.k8s.io
|
||||
selector:
|
||||
k8s-addon: storage-aws.addons.k8s.io
|
||||
Loading…
Reference in New Issue