mirror of https://github.com/kubernetes/kops.git
Merge pull request #16001 from hakman/clluster-packages
Add support for installing additional packages at cluster level
This commit is contained in:
commit
8a63ba4def
|
|
@ -5611,6 +5611,11 @@ spec:
|
||||||
to false.
|
to false.
|
||||||
type: boolean
|
type: boolean
|
||||||
type: object
|
type: object
|
||||||
|
packages:
|
||||||
|
description: Packages specifies additional packages to be installed.
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
type: array
|
||||||
podCIDR:
|
podCIDR:
|
||||||
description: PodCIDR is the CIDR from which we allocate IPs for pods
|
description: PodCIDR is the CIDR from which we allocate IPs for pods
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,8 @@ type ClusterSpec struct {
|
||||||
CloudConfig *CloudConfiguration `json:"cloudConfig,omitempty"`
|
CloudConfig *CloudConfiguration `json:"cloudConfig,omitempty"`
|
||||||
ExternalDNS *ExternalDNSConfig `json:"externalDNS,omitempty"`
|
ExternalDNS *ExternalDNSConfig `json:"externalDNS,omitempty"`
|
||||||
NTP *NTPConfig `json:"ntp,omitempty"`
|
NTP *NTPConfig `json:"ntp,omitempty"`
|
||||||
|
// Packages specifies additional packages to be installed.
|
||||||
|
Packages []string `json:"packages,omitempty"`
|
||||||
|
|
||||||
// NodeProblemDetector determines the node problem detector configuration.
|
// NodeProblemDetector determines the node problem detector configuration.
|
||||||
NodeProblemDetector *NodeProblemDetectorConfig `json:"nodeProblemDetector,omitempty"`
|
NodeProblemDetector *NodeProblemDetectorConfig `json:"nodeProblemDetector,omitempty"`
|
||||||
|
|
|
||||||
|
|
@ -186,6 +186,8 @@ type ClusterSpec struct {
|
||||||
CloudConfig *CloudConfiguration `json:"cloudConfig,omitempty"`
|
CloudConfig *CloudConfiguration `json:"cloudConfig,omitempty"`
|
||||||
ExternalDNS *ExternalDNSConfig `json:"externalDns,omitempty"`
|
ExternalDNS *ExternalDNSConfig `json:"externalDns,omitempty"`
|
||||||
NTP *NTPConfig `json:"ntp,omitempty"`
|
NTP *NTPConfig `json:"ntp,omitempty"`
|
||||||
|
// Packages specifies additional packages to be installed.
|
||||||
|
Packages []string `json:"packages,omitempty"`
|
||||||
|
|
||||||
// NodeTerminationHandler determines the cluster autoscaler configuration.
|
// NodeTerminationHandler determines the cluster autoscaler configuration.
|
||||||
// +k8s:conversion-gen=false
|
// +k8s:conversion-gen=false
|
||||||
|
|
|
||||||
|
|
@ -2593,6 +2593,7 @@ func autoConvert_v1alpha2_ClusterSpec_To_kops_ClusterSpec(in *ClusterSpec, out *
|
||||||
} else {
|
} else {
|
||||||
out.NTP = nil
|
out.NTP = nil
|
||||||
}
|
}
|
||||||
|
out.Packages = in.Packages
|
||||||
// INFO: in.NodeTerminationHandler opted out of conversion generation
|
// INFO: in.NodeTerminationHandler opted out of conversion generation
|
||||||
if in.NodeProblemDetector != nil {
|
if in.NodeProblemDetector != nil {
|
||||||
in, out := &in.NodeProblemDetector, &out.NodeProblemDetector
|
in, out := &in.NodeProblemDetector, &out.NodeProblemDetector
|
||||||
|
|
@ -2932,6 +2933,7 @@ func autoConvert_kops_ClusterSpec_To_v1alpha2_ClusterSpec(in *kops.ClusterSpec,
|
||||||
} else {
|
} else {
|
||||||
out.NTP = nil
|
out.NTP = nil
|
||||||
}
|
}
|
||||||
|
out.Packages = in.Packages
|
||||||
if in.NodeProblemDetector != nil {
|
if in.NodeProblemDetector != nil {
|
||||||
in, out := &in.NodeProblemDetector, &out.NodeProblemDetector
|
in, out := &in.NodeProblemDetector, &out.NodeProblemDetector
|
||||||
*out = new(NodeProblemDetectorConfig)
|
*out = new(NodeProblemDetectorConfig)
|
||||||
|
|
|
||||||
|
|
@ -1239,6 +1239,11 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) {
|
||||||
*out = new(NTPConfig)
|
*out = new(NTPConfig)
|
||||||
(*in).DeepCopyInto(*out)
|
(*in).DeepCopyInto(*out)
|
||||||
}
|
}
|
||||||
|
if in.Packages != nil {
|
||||||
|
in, out := &in.Packages, &out.Packages
|
||||||
|
*out = make([]string, len(*in))
|
||||||
|
copy(*out, *in)
|
||||||
|
}
|
||||||
if in.NodeTerminationHandler != nil {
|
if in.NodeTerminationHandler != nil {
|
||||||
in, out := &in.NodeTerminationHandler, &out.NodeTerminationHandler
|
in, out := &in.NodeTerminationHandler, &out.NodeTerminationHandler
|
||||||
*out = new(NodeTerminationHandlerSpec)
|
*out = new(NodeTerminationHandlerSpec)
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,8 @@ type ClusterSpec struct {
|
||||||
CloudConfig *CloudConfiguration `json:"cloudConfig,omitempty"`
|
CloudConfig *CloudConfiguration `json:"cloudConfig,omitempty"`
|
||||||
ExternalDNS *ExternalDNSConfig `json:"externalDNS,omitempty"`
|
ExternalDNS *ExternalDNSConfig `json:"externalDNS,omitempty"`
|
||||||
NTP *NTPConfig `json:"ntp,omitempty"`
|
NTP *NTPConfig `json:"ntp,omitempty"`
|
||||||
|
// Packages specifies additional packages to be installed.
|
||||||
|
Packages []string `json:"packages,omitempty"`
|
||||||
|
|
||||||
// NodeProblemDetector determines the node problem detector configuration.
|
// NodeProblemDetector determines the node problem detector configuration.
|
||||||
NodeProblemDetector *NodeProblemDetectorConfig `json:"nodeProblemDetector,omitempty"`
|
NodeProblemDetector *NodeProblemDetectorConfig `json:"nodeProblemDetector,omitempty"`
|
||||||
|
|
|
||||||
|
|
@ -2823,6 +2823,7 @@ func autoConvert_v1alpha3_ClusterSpec_To_kops_ClusterSpec(in *ClusterSpec, out *
|
||||||
} else {
|
} else {
|
||||||
out.NTP = nil
|
out.NTP = nil
|
||||||
}
|
}
|
||||||
|
out.Packages = in.Packages
|
||||||
if in.NodeProblemDetector != nil {
|
if in.NodeProblemDetector != nil {
|
||||||
in, out := &in.NodeProblemDetector, &out.NodeProblemDetector
|
in, out := &in.NodeProblemDetector, &out.NodeProblemDetector
|
||||||
*out = new(kops.NodeProblemDetectorConfig)
|
*out = new(kops.NodeProblemDetectorConfig)
|
||||||
|
|
@ -3156,6 +3157,7 @@ func autoConvert_kops_ClusterSpec_To_v1alpha3_ClusterSpec(in *kops.ClusterSpec,
|
||||||
} else {
|
} else {
|
||||||
out.NTP = nil
|
out.NTP = nil
|
||||||
}
|
}
|
||||||
|
out.Packages = in.Packages
|
||||||
if in.NodeProblemDetector != nil {
|
if in.NodeProblemDetector != nil {
|
||||||
in, out := &in.NodeProblemDetector, &out.NodeProblemDetector
|
in, out := &in.NodeProblemDetector, &out.NodeProblemDetector
|
||||||
*out = new(NodeProblemDetectorConfig)
|
*out = new(NodeProblemDetectorConfig)
|
||||||
|
|
|
||||||
|
|
@ -1164,6 +1164,11 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) {
|
||||||
*out = new(NTPConfig)
|
*out = new(NTPConfig)
|
||||||
(*in).DeepCopyInto(*out)
|
(*in).DeepCopyInto(*out)
|
||||||
}
|
}
|
||||||
|
if in.Packages != nil {
|
||||||
|
in, out := &in.Packages, &out.Packages
|
||||||
|
*out = make([]string, len(*in))
|
||||||
|
copy(*out, *in)
|
||||||
|
}
|
||||||
if in.NodeProblemDetector != nil {
|
if in.NodeProblemDetector != nil {
|
||||||
in, out := &in.NodeProblemDetector, &out.NodeProblemDetector
|
in, out := &in.NodeProblemDetector, &out.NodeProblemDetector
|
||||||
*out = new(NodeProblemDetectorConfig)
|
*out = new(NodeProblemDetectorConfig)
|
||||||
|
|
|
||||||
|
|
@ -1261,6 +1261,11 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) {
|
||||||
*out = new(NTPConfig)
|
*out = new(NTPConfig)
|
||||||
(*in).DeepCopyInto(*out)
|
(*in).DeepCopyInto(*out)
|
||||||
}
|
}
|
||||||
|
if in.Packages != nil {
|
||||||
|
in, out := &in.Packages, &out.Packages
|
||||||
|
*out = make([]string, len(*in))
|
||||||
|
copy(*out, *in)
|
||||||
|
}
|
||||||
if in.NodeProblemDetector != nil {
|
if in.NodeProblemDetector != nil {
|
||||||
in, out := &in.NodeProblemDetector, &out.NodeProblemDetector
|
in, out := &in.NodeProblemDetector, &out.NodeProblemDetector
|
||||||
*out = new(NodeProblemDetectorConfig)
|
*out = new(NodeProblemDetectorConfig)
|
||||||
|
|
|
||||||
|
|
@ -1531,9 +1531,8 @@ func (n *nodeUpConfigBuilder) BuildConfig(ig *kops.InstanceGroup, apiserverAddit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ig.Spec.Packages != nil {
|
config.Packages = append(config.Packages, cluster.Spec.Packages...)
|
||||||
config.Packages = ig.Spec.Packages
|
config.Packages = append(config.Packages, ig.Spec.Packages...)
|
||||||
}
|
|
||||||
|
|
||||||
return config, bootConfig, nil
|
return config, bootConfig, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue