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
Cleanup bool `json:"cleanup"`
// Mode (Optional, Future Feature) Defines how the controller will operate once this feature is enabled.
// Currently unused. Planned values:
// Mode specifies the operation mode of the controller.
// Possible values:
// - "selfhosted": For self-managed Kubernetes clusters.
// - "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
// the OIDC provider information.
// Only applicable when Mode is "selfhosted".
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
// the OIDC provider in a self-hosted environment.
type Discovery struct {
+12 -2
View File
@@ -52,6 +52,7 @@ spec:
description: |-
Discovery configures the IdP Discovery process, essential for setting up IRSA by locating
the OIDC provider information.
Only applicable when Mode is "selfhosted".
properties:
s3:
description: S3 specifies the AWS S3 bucket details where the
@@ -72,10 +73,19 @@ spec:
type: object
mode:
description: |-
Mode (Optional, Future Feature) Defines how the controller will operate once this feature is enabled.
Currently unused. Planned values:
Mode specifies the operation mode of the controller.
Possible values:
- "selfhosted": For self-managed Kubernetes clusters.
- "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
required:
- cleanup
@@ -53,6 +53,7 @@ spec:
description: |-
Discovery configures the IdP Discovery process, essential for setting up IRSA by locating
the OIDC provider information.
Only applicable when Mode is "selfhosted".
properties:
s3:
description: S3 specifies the AWS S3 bucket details where the
@@ -73,10 +74,19 @@ spec:
type: object
mode:
description: |-
Mode (Optional, Future Feature) Defines how the controller will operate once this feature is enabled.
Currently unused. Planned values:
Mode specifies the operation mode of the controller.
Possible values:
- "selfhosted": For self-managed Kubernetes clusters.
- "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
required:
- cleanup
+17 -2
View File
@@ -102,8 +102,9 @@ _Appears in:_
| 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. | | |
| `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. | | |
| `discovery` _[Discovery](#discovery)_ | Discovery configures the IdP Discovery process, essential for setting up IRSA by locating<br />the OIDC provider information. | | |
| `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.<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)