update api for eks support

This commit is contained in:
kkb0318
2024-07-26 20:12:02 +09:00
parent 29fe5b773f
commit 5ffb448ecd
4 changed files with 59 additions and 9 deletions
+18 -3
View File
@@ -33,17 +33,32 @@ type IRSASetupSpec struct {
// +required // +required
Cleanup bool `json:"cleanup"` Cleanup bool `json:"cleanup"`
// Mode (Optional, Future Feature) Defines how the controller will operate once this feature is enabled. // Mode specifies the operation mode of the controller.
// Currently unused. Planned values: // Possible values:
// - "selfhosted": For self-managed Kubernetes clusters. // - "selfhosted": For self-managed Kubernetes clusters.
// - "eks": For Amazon EKS environments. // - "eks": For Amazon EKS environments.
Mode string `json:"mode,omitempty"` // Default: "selfhosted"
Mode SetupMode `json:"mode,omitempty"`
// Discovery configures the IdP Discovery process, essential for setting up IRSA by locating // Discovery configures the IdP Discovery process, essential for setting up IRSA by locating
// the OIDC provider information. // the OIDC provider information.
// Only applicable when Mode is "selfhosted".
Discovery Discovery `json:"discovery"` Discovery Discovery `json:"discovery"`
// IamOIDCProvider configures IAM OIDC IamOIDCProvider Name
// Only applicable when Mode is "eks".
IamOIDCProvider string `json:"provider,omitempty"`
} }
// +kubebuilder:default=selfhosted
// +kubebuilder:validation:Enum=selfhosted;eks
type SetupMode string
const (
ModeSelfhosted = SetupMode("selfhosted")
ModeEks = SetupMode("eks")
)
// Discovery holds the configuration for IdP Discovery, which is crucial for locating // Discovery holds the configuration for IdP Discovery, which is crucial for locating
// the OIDC provider in a self-hosted environment. // the OIDC provider in a self-hosted environment.
type Discovery struct { type Discovery struct {
+12 -2
View File
@@ -52,6 +52,7 @@ spec:
description: |- description: |-
Discovery configures the IdP Discovery process, essential for setting up IRSA by locating Discovery configures the IdP Discovery process, essential for setting up IRSA by locating
the OIDC provider information. the OIDC provider information.
Only applicable when Mode is "selfhosted".
properties: properties:
s3: s3:
description: S3 specifies the AWS S3 bucket details where the description: S3 specifies the AWS S3 bucket details where the
@@ -72,10 +73,19 @@ spec:
type: object type: object
mode: mode:
description: |- description: |-
Mode (Optional, Future Feature) Defines how the controller will operate once this feature is enabled. Mode specifies the operation mode of the controller.
Currently unused. Planned values: Possible values:
- "selfhosted": For self-managed Kubernetes clusters. - "selfhosted": For self-managed Kubernetes clusters.
- "eks": For Amazon EKS environments. - "eks": For Amazon EKS environments.
Default: "selfhosted"
enum:
- selfhosted
- eks
type: string
provider:
description: |-
IamOIDCProvider configures IAM OIDC IamOIDCProvider Name
Only applicable when Mode is "eks".
type: string type: string
required: required:
- cleanup - cleanup
@@ -53,6 +53,7 @@ spec:
description: |- description: |-
Discovery configures the IdP Discovery process, essential for setting up IRSA by locating Discovery configures the IdP Discovery process, essential for setting up IRSA by locating
the OIDC provider information. the OIDC provider information.
Only applicable when Mode is "selfhosted".
properties: properties:
s3: s3:
description: S3 specifies the AWS S3 bucket details where the description: S3 specifies the AWS S3 bucket details where the
@@ -73,10 +74,19 @@ spec:
type: object type: object
mode: mode:
description: |- description: |-
Mode (Optional, Future Feature) Defines how the controller will operate once this feature is enabled. Mode specifies the operation mode of the controller.
Currently unused. Planned values: Possible values:
- "selfhosted": For self-managed Kubernetes clusters. - "selfhosted": For self-managed Kubernetes clusters.
- "eks": For Amazon EKS environments. - "eks": For Amazon EKS environments.
Default: "selfhosted"
enum:
- selfhosted
- eks
type: string
provider:
description: |-
IamOIDCProvider configures IAM OIDC IamOIDCProvider Name
Only applicable when Mode is "eks".
type: string type: string
required: required:
- cleanup - cleanup
+17 -2
View File
@@ -102,8 +102,9 @@ _Appears in:_
| Field | Description | Default | Validation | | Field | Description | Default | Validation |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| `cleanup` _boolean_ | Cleanup, when enabled, allows the IRSASetup to perform garbage collection<br />of resources that are no longer needed or managed. | | | | `cleanup` _boolean_ | Cleanup, when enabled, allows the IRSASetup to perform garbage collection<br />of resources that are no longer needed or managed. | | |
| `mode` _string_ | Mode (Optional, Future Feature) Defines how the controller will operate once this feature is enabled.<br />Currently unused. Planned values:<br /> - "selfhosted": For self-managed Kubernetes clusters.<br /> - "eks": For Amazon EKS environments. | | | | `mode` _[SetupMode](#setupmode)_ | Mode specifies the operation mode of the controller.<br />Possible values:<br /> - "selfhosted": For self-managed Kubernetes clusters.<br /> - "eks": For Amazon EKS environments.<br />Default: "selfhosted" | | Enum: [selfhosted eks] <br /> |
| `discovery` _[Discovery](#discovery)_ | Discovery configures the IdP Discovery process, essential for setting up IRSA by locating<br />the OIDC provider information. | | | | `discovery` _[Discovery](#discovery)_ | Discovery configures the IdP Discovery process, essential for setting up IRSA by locating<br />the OIDC provider information.<br />Only applicable when Mode is "selfhosted". | | |
| `provider` _string_ | IamOIDCProvider configures IAM OIDC IamOIDCProvider Name<br />Only applicable when Mode is "eks". | | |
@@ -164,3 +165,17 @@ _Appears in:_
#### SetupMode
_Underlying type:_ _string_
_Validation:_
- Enum: [selfhosted eks]
_Appears in:_
- [IRSASetupSpec](#irsasetupspec)