Skip to content
Merged
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
28 changes: 23 additions & 5 deletions api/v1alpha1/clusterconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ type AWSClusterConfigSpec struct {
KubeadmClusterConfigSpec `json:",inline"`
GenericClusterConfigSpec `json:",inline"`

// KubeProxy defines the configuration for kube-proxy.
// +kubebuilder:validation:Optional
KubeProxy *KubeProxy `json:"kubeProxy,omitempty"`

// +kubebuilder:validation:Optional
Addons *AWSAddons `json:"addons,omitempty"`

Expand Down Expand Up @@ -121,6 +125,10 @@ type DockerClusterConfigSpec struct {
KubeadmClusterConfigSpec `json:",inline"`
GenericClusterConfigSpec `json:",inline"`

// KubeProxy defines the configuration for kube-proxy.
// +kubebuilder:validation:Optional
KubeProxy *KubeProxy `json:"kubeProxy,omitempty"`

// +kubebuilder:validation:Optional
Addons *DockerAddons `json:"addons,omitempty"`

Expand Down Expand Up @@ -164,6 +172,10 @@ type NutanixClusterConfigSpec struct {
KubeadmClusterConfigSpec `json:",inline"`
GenericClusterConfigSpec `json:",inline"`

// KubeProxy defines the configuration for kube-proxy.
// +kubebuilder:validation:Optional
KubeProxy *KubeProxy `json:"kubeProxy,omitempty"`

// +kubebuilder:validation:Optional
Addons *NutanixAddons `json:"addons,omitempty"`

Expand Down Expand Up @@ -206,6 +218,10 @@ type EKSClusterConfigSpec struct {

GenericClusterConfigSpec `json:",inline"`

// KubeProxy defines the configuration for kube-proxy.
// +kubebuilder:validation:Optional
KubeProxy *KubeProxy `json:"kubeProxy,omitempty"`

// +kubebuilder:validation:Optional
Addons *AWSAddons `json:"addons,omitempty"`
}
Expand Down Expand Up @@ -243,10 +259,6 @@ type KubeadmClusterConfigSpec struct {
// +kubebuilder:validation:Optional
DNS *DNS `json:"dns,omitempty"`

// KubeProxy defines the configuration for kube-proxy.
// +kubebuilder:validation:Optional
KubeProxy *KubeProxy `json:"kubeProxy,omitempty"`

// MaxParallelImagePullsPerNode defines the maximum number of parallel image pulls performed by each kubelet.
// If not set, the default value of 1 will be used.
// If set to 0, the maximum number of parallel image pulls will be unlimited.
Expand Down Expand Up @@ -425,14 +437,20 @@ const (
// KubeProxyModeNFTables indicates that kube-proxy should be installed in nftables
// mode.
KubeProxyModeNFTables KubeProxyMode = "nftables"
// KubeProxyModeDisabled indicates that kube-proxy should be disabled.
KubeProxyModeDisabled KubeProxyMode = "disabled"
)

// KubeProxy defines the configuration for kube-proxy.
// This struct is shared across all providers, but EKS only supports the disabled mode.
// The CRD is updated manually to reflect this.
type KubeProxy struct {
// Mode specifies the mode for kube-proxy:
// - iptables means that kube-proxy is installed in iptables mode.
// - nftables means that kube-proxy is installed in nftables mode.
// - disabled means that kube-proxy is disabled.
// +kubebuilder:validation:Optional
// +kubebuilder:validation:Enum=iptables;nftables
// +kubebuilder:validation:Enum=iptables;nftables;disabled
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value cannot be changed after cluster creation"
Mode KubeProxyMode `json:"mode,omitempty"`
}
Expand Down
2 changes: 2 additions & 0 deletions api/v1alpha1/crds/caren.nutanix.com_awsclusterconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -716,9 +716,11 @@ spec:
Mode specifies the mode for kube-proxy:
- iptables means that kube-proxy is installed in iptables mode.
- nftables means that kube-proxy is installed in nftables mode.
- disabled means that kube-proxy is disabled.
enum:
- iptables
- nftables
- disabled
type: string
x-kubernetes-validations:
- message: Value cannot be changed after cluster creation
Expand Down
2 changes: 2 additions & 0 deletions api/v1alpha1/crds/caren.nutanix.com_dockerclusterconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,11 @@ spec:
Mode specifies the mode for kube-proxy:
- iptables means that kube-proxy is installed in iptables mode.
- nftables means that kube-proxy is installed in nftables mode.
- disabled means that kube-proxy is disabled.
enum:
- iptables
- nftables
- disabled
type: string
x-kubernetes-validations:
- message: Value cannot be changed after cluster creation
Expand Down
Loading
Loading