Skip to content

Commit 62e4137

Browse files
committed
add accessConfig to v1beta1 type as well
1 parent e2353cd commit 62e4137

File tree

5 files changed

+95
-1
lines changed

5 files changed

+95
-1
lines changed

config/crd/bases/controlplane.cluster.x-k8s.io_awsmanagedcontrolplanes.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,21 @@ spec:
6767
description: AWSManagedControlPlaneSpec defines the desired state of an
6868
Amazon EKS Cluster.
6969
properties:
70+
accessConfig:
71+
description: AccessConfig specifies the access configuration information
72+
for the cluster
73+
properties:
74+
authenticationMode:
75+
default: CONFIG_MAP
76+
description: |-
77+
AuthenticationMode specifies the desired authentication mode for the cluster
78+
Defaults to CONFIG_MAP
79+
enum:
80+
- CONFIG_MAP
81+
- API
82+
- API_AND_CONFIG_MAP
83+
type: string
84+
type: object
7085
additionalTags:
7186
additionalProperties:
7287
type: string

controlplane/eks/api/v1beta1/awsmanagedcontrolplane_types.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ type AWSManagedControlPlaneSpec struct { //nolint: maligned
165165
// +optional
166166
OIDCIdentityProviderConfig *OIDCIdentityProviderConfig `json:"oidcIdentityProviderConfig,omitempty"`
167167

168+
// AccessConfig specifies the access configuration information for the cluster
169+
// +optional
170+
AccessConfig *AccessConfig `json:"accessConfig,omitempty"`
171+
168172
// DisableVPCCNI indicates that the Amazon VPC CNI should be disabled. With EKS clusters the
169173
// Amazon VPC CNI is automatically installed into the cluster. For clusters where you want
170174
// to use an alternate CNI this option provides a way to specify that the Amazon VPC CNI
@@ -212,6 +216,15 @@ type EndpointAccess struct {
212216
Private *bool `json:"private,omitempty"`
213217
}
214218

219+
// AccessConfig represents the access configuration information for the cluster
220+
type AccessConfig struct {
221+
// AuthenticationMode specifies the desired authentication mode for the cluster
222+
// Defaults to CONFIG_MAP
223+
// +kubebuilder:default=CONFIG_MAP
224+
// +kubebuilder:validation:Enum=CONFIG_MAP;API;API_AND_CONFIG_MAP
225+
AuthenticationMode EKSAuthenticationMode `json:"authenticationMode,omitempty"`
226+
}
227+
215228
// EncryptionConfig specifies the encryption configuration for the EKS clsuter.
216229
type EncryptionConfig struct {
217230
// Provider specifies the ARN or alias of the CMK (in AWS KMS)

controlplane/eks/api/v1beta1/types.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,21 @@ var (
7979
EKSTokenMethodAWSCli = EKSTokenMethod("aws-cli")
8080
)
8181

82+
// EKSAuthenticationMode defines the authentication mode for the cluster
83+
type EKSAuthenticationMode string
84+
85+
var (
86+
// EKSAuthenticationModeConfigMap indicates that only `aws-auth` ConfigMap will be used for authentication
87+
EKSAuthenticationModeConfigMap = EKSAuthenticationMode("CONFIG_MAP")
88+
89+
// EKSAuthenticationModeAPI indicates that only AWS Access Entries will be used for authentication
90+
EKSAuthenticationModeAPI = EKSAuthenticationMode("API")
91+
92+
// EKSAuthenticationModeAPIAndConfigMap indicates that both `aws-auth` ConfigMap and AWS Access Entries will
93+
// be used for authentication
94+
EKSAuthenticationModeAPIAndConfigMap = EKSAuthenticationMode("API_AND_CONFIG_MAP")
95+
)
96+
8297
var (
8398
// DefaultEKSControlPlaneRole is the name of the default IAM role to use for the EKS control plane
8499
// if no other role is supplied in the spec and if iam role creation is not enabled. The default

controlplane/eks/api/v1beta1/zz_generated.conversion.go

Lines changed: 32 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controlplane/eks/api/v1beta1/zz_generated.deepcopy.go

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)