Skip to content

✨ Allow to disable KubeProxy and CoreDNS #12359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions api/bootstrap/kubeadm/v1beta1/kubeadm_types.go
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to add these changes to v1beta1 ? I think it's good way to only add these to v1beta2.

Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ type ClusterConfiguration struct {
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=63
ClusterName string `json:"clusterName,omitempty"`

// Proxy defines the options for the proxy add-on installed in the cluster.
// +optional
Proxy *Proxy `json:"proxy,omitempty"`
}

// ControlPlaneComponent holds settings common to control plane component of the cluster.
Expand Down Expand Up @@ -201,6 +205,17 @@ type APIServer struct {
type DNS struct {
// ImageMeta allows to customize the image used for the DNS component
ImageMeta `json:",inline"`

// Disabled specifies whether to disable this addon in the cluster
// +optional
Disabled *bool `json:"disabled,omitempty"`
}

// Proxy defines the proxy addon that should be used in the cluster
type Proxy struct {
// Disabled specifies whether to disable this addon in the cluster
// +optional
Disabled *bool `json:"disabled,omitempty"`
}

// ImageMeta allows to customize the image used for components that are not
Expand Down
34 changes: 34 additions & 0 deletions api/bootstrap/kubeadm/v1beta1/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 31 additions & 1 deletion api/bootstrap/kubeadm/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions api/bootstrap/kubeadm/v1beta2/kubeadm_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ type ClusterConfiguration struct {
// featureGates enabled by the user.
// +optional
FeatureGates map[string]bool `json:"featureGates,omitempty"`

// Proxy defines the options for the proxy add-on installed in the cluster.
// +optional
Proxy *Proxy `json:"proxy,omitempty"`
}

// ControlPlaneComponent holds settings common to control plane component of the cluster.
Expand Down Expand Up @@ -209,6 +213,17 @@ type APIServer struct {
type DNS struct {
// ImageMeta allows to customize the image used for the DNS component
ImageMeta `json:",inline"`

// Disabled specifies whether to disable this addon in the cluster
// +optional
Disabled *bool `json:"disabled,omitempty"`
}

// Proxy defines the proxy addon that should be used in the cluster
type Proxy struct {
// Disabled specifies whether to disable this addon in the cluster
// +optional
Disabled *bool `json:"disabled,omitempty"`
}

// ImageMeta allows to customize the image used for components that are not
Expand Down
32 changes: 31 additions & 1 deletion api/bootstrap/kubeadm/v1beta2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions bootstrap/kubeadm/types/upstreamv1beta3/conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ func (dst *JoinConfiguration) ConvertFrom(srcRaw conversion.Hub) error {

// Custom conversion from this API, kubeadm v1beta3, to the hub version, CABPK v1beta1.

func Convert_v1beta2_ClusterConfiguration_To_upstreamv1beta3_ClusterConfiguration(in *bootstrapv1.ClusterConfiguration, out *ClusterConfiguration, s apimachineryconversion.Scope) error {
// v1beta3 has no ClusterConfiguration.Proxy
return autoConvert_v1beta2_ClusterConfiguration_To_upstreamv1beta3_ClusterConfiguration(in, out, s)
}

func Convert_v1beta2_DNS_To_upstreamv1beta3_DNS(in *bootstrapv1.DNS, out *DNS, s apimachineryconversion.Scope) error {
// v1beta3 has no ClusterConfiguration.DNS.Disabled
return autoConvert_v1beta2_DNS_To_upstreamv1beta3_DNS(in, out, s)
}

func Convert_upstreamv1beta3_ClusterConfiguration_To_v1beta2_ClusterConfiguration(in *ClusterConfiguration, out *bootstrapv1.ClusterConfiguration, s apimachineryconversion.Scope) error {
return autoConvert_upstreamv1beta3_ClusterConfiguration_To_v1beta2_ClusterConfiguration(in, out, s)
}
Expand Down
Loading