Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the irsa v1alpha1 API group +kubebuilder:object:generate=true +groupName=irsa-manager.kkb0318.github.io
Index ¶
- Constants
- Variables
- func HasConditionReason(cond *metav1.Condition, reasons ...string) bool
- func IsReadyConditionTrue(irsa IRSASetup) bool
- func ReadyStatus(irsa IRSASetup) *metav1.Condition
- type Discovery
- type EksConditionReason
- type IRSA
- func IRSAStatusNotReady(irsa IRSA, reason, message string) IRSA
- func IRSAStatusReady(irsa IRSA, reason, message string) IRSA
- func IRSAStatusRemoveServiceAccount(irsa IRSA, namespacedNames []types.NamespacedName) IRSA
- func IRSAStatusSetServiceAccount(irsa IRSA, namespacedNames []types.NamespacedName) IRSA
- type IRSAList
- type IRSANamespacedNameWithTags
- type IRSAReason
- type IRSAServiceAccount
- type IRSASetup
- type IRSASetupList
- type IRSASetupSpec
- type IRSASetupStatus
- type IRSASpec
- type IRSAStatus
- type IamRole
- type S3Discovery
- type SelfhostedConditionReason
- type SetupMode
- type StatusServiceAccountList
- func (s *StatusServiceAccountList) Append(nsNames types.NamespacedName)
- func (in StatusServiceAccountList) DeepCopy() StatusServiceAccountList
- func (in StatusServiceAccountList) DeepCopyInto(out *StatusServiceAccountList)
- func (s *StatusServiceAccountList) Delete(nsNames types.NamespacedName)
- func (s *StatusServiceAccountList) IsExist(nsNames types.NamespacedName) bool
Constants ¶
const ( ModeSelfhosted = SetupMode("selfhosted") ModeEks = SetupMode("eks") )
const (
// IRSAKind represents the kind attribute of an IRSA resource.
IRSAKind = "IRSA"
)
const (
// IRSASetupKind represents the kind attribute of an IRSASetup resource.
IRSASetupKind = "IRSASetup"
)
const ( // ReadyCondition indicates the resource is ready and fully reconciled. // If the Condition is False, the resource SHOULD be considered to be in the process of reconciling and not a // representation of actual state. ReadyCondition string = "Ready" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "irsa-manager.kkb0318.github.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func HasConditionReason ¶
HasConditionReason
func IsReadyConditionTrue ¶
Types ¶
type Discovery ¶
type Discovery struct { // S3 specifies the AWS S3 bucket details where the OIDC provider's discovery information is hosted. S3 S3Discovery `json:"s3,omitempty"` }
Discovery holds the configuration for IdP Discovery, which is crucial for locating the OIDC provider in a self-hosted environment.
func (*Discovery) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Discovery.
func (*Discovery) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EksConditionReason ¶
type EksConditionReason string
const ( EksNotReady EksConditionReason = "EksOIDCNotReady" EksReasonReady EksConditionReason = "EksOIDCSetupReady" )
type IRSA ¶
type IRSA struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec IRSASpec `json:"spec,omitempty"` Status IRSAStatus `json:"status,omitempty"` }
IRSA is the Schema for the irsas API
func IRSAStatusNotReady ¶
func IRSAStatusReady ¶
func IRSAStatusRemoveServiceAccount ¶
func IRSAStatusRemoveServiceAccount(irsa IRSA, namespacedNames []types.NamespacedName) IRSA
func IRSAStatusSetServiceAccount ¶
func IRSAStatusSetServiceAccount(irsa IRSA, namespacedNames []types.NamespacedName) IRSA
func (*IRSA) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IRSA.
func (*IRSA) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IRSA) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*IRSA) GetIRSAStatusConditions ¶
GetIRSAStatusConditions returns a pointer to the Conditions slice
func (*IRSA) GetIRSAStatusServiceAccounts ¶
func (in *IRSA) GetIRSAStatusServiceAccounts() *StatusServiceAccountList
GetIRSAStatusServiceAccounts returns a pointer to the ServiceAccount slice
type IRSAList ¶
type IRSAList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []IRSA `json:"items"` }
IRSAList contains a list of IRSA
func (*IRSAList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IRSAList.
func (*IRSAList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IRSAList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type IRSANamespacedNameWithTags ¶
type IRSANamespacedNameWithTags struct { Name string `json:"name"` Namespace string `json:"namespace"` }
IRSANamespacedNameWithTags is like a types.NamespacedName with JSON tags
func (*IRSANamespacedNameWithTags) DeepCopy ¶
func (in *IRSANamespacedNameWithTags) DeepCopy() *IRSANamespacedNameWithTags
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IRSANamespacedNameWithTags.
func (*IRSANamespacedNameWithTags) DeepCopyInto ¶
func (in *IRSANamespacedNameWithTags) DeepCopyInto(out *IRSANamespacedNameWithTags)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IRSAReason ¶
type IRSAReason string
const ( IRSAReasonFailedRoleUpdate IRSAReason = "IRSAFailedRoleUpdate" IRSAReasonFailedK8sApply IRSAReason = "IRSAFailedApplyingResources" IRSAReasonFailedK8sCleanUp IRSAReason = "IRSAFailedDeletingResources" IRSAReasonReady IRSAReason = "IRSAReady" )
type IRSAServiceAccount ¶
type IRSAServiceAccount struct { // Name represents the name of the Kubernetes service account Name string `json:"name,omitempty"` // Namespaces represents the list of namespaces where the service account is used Namespaces []string `json:"namespaces,omitempty"` }
IRSAServiceAccount represents the details of the Kubernetes service account
func (*IRSAServiceAccount) DeepCopy ¶
func (in *IRSAServiceAccount) DeepCopy() *IRSAServiceAccount
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IRSAServiceAccount.
func (*IRSAServiceAccount) DeepCopyInto ¶
func (in *IRSAServiceAccount) DeepCopyInto(out *IRSAServiceAccount)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IRSAServiceAccount) NamespacedNameList ¶
func (sa *IRSAServiceAccount) NamespacedNameList() []types.NamespacedName
NamespacedNameList returns a slice of types.NamespacedName constructed from the Name and Namespace settings.
type IRSASetup ¶
type IRSASetup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec IRSASetupSpec `json:"spec,omitempty"` Status IRSASetupStatus `json:"status,omitempty"` }
IRSASetup represents a configuration for setting up IAM Roles for Service Accounts (IRSA) in a Kubernetes cluster.
func SetupStatusReady ¶
func StatusNotReady ¶
func (*IRSASetup) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IRSASetup.
func (*IRSASetup) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IRSASetup) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*IRSASetup) GetStatusConditions ¶
GetStatusConditions returns a pointer to the Status.Conditions slice
type IRSASetupList ¶
type IRSASetupList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []IRSASetup `json:"items"` }
IRSASetupList contains a list of IRSASetup
func (*IRSASetupList) DeepCopy ¶
func (in *IRSASetupList) DeepCopy() *IRSASetupList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IRSASetupList.
func (*IRSASetupList) DeepCopyInto ¶
func (in *IRSASetupList) DeepCopyInto(out *IRSASetupList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IRSASetupList) DeepCopyObject ¶
func (in *IRSASetupList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type IRSASetupSpec ¶
type IRSASetupSpec struct { // Cleanup, when enabled, allows the IRSASetup to perform garbage collection // of resources that are no longer needed or managed. // +required Cleanup bool `json:"cleanup"` // Mode specifies the operation mode of the controller. // Possible values: // - "selfhosted": For self-managed Kubernetes clusters. // - "eks": For Amazon EKS environments. // 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,omitempty"` // IamOIDCProvider configures IAM OIDC IamOIDCProvider Name // Only applicable when Mode is "eks". IamOIDCProvider string `json:"iamOIDCProvider,omitempty"` }
IRSASetupSpec defines the desired state of IRSASetup
func (*IRSASetupSpec) DeepCopy ¶
func (in *IRSASetupSpec) DeepCopy() *IRSASetupSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IRSASetupSpec.
func (*IRSASetupSpec) DeepCopyInto ¶
func (in *IRSASetupSpec) DeepCopyInto(out *IRSASetupSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IRSASetupStatus ¶
IRSASetupStatus defines the observed state of IRSASetup
func (*IRSASetupStatus) DeepCopy ¶
func (in *IRSASetupStatus) DeepCopy() *IRSASetupStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IRSASetupStatus.
func (*IRSASetupStatus) DeepCopyInto ¶
func (in *IRSASetupStatus) DeepCopyInto(out *IRSASetupStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IRSASpec ¶
type IRSASpec struct { // Cleanup, when enabled, allows the IRSA to perform garbage collection // of resources that are no longer needed or managed. // +required Cleanup bool `json:"cleanup"` // ServiceAccount represents the Kubernetes service account associated with the IRSA. // +required ServiceAccount IRSAServiceAccount `json:"serviceAccount,omitempty"` // IamRole represents the IAM role details associated with the IRSA. // +required IamRole IamRole `json:"iamRole,omitempty"` // IamPolicies represents the list of IAM policies to be attached to the IAM role. // You can set both the policy name (only AWS default policies) or the full ARN. // +required IamPolicies []string `json:"iamPolicies,omitempty"` }
IRSASpec defines the desired state of IRSA
func (*IRSASpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IRSASpec.
func (*IRSASpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IRSAStatus ¶
type IRSAStatus struct { Conditions []metav1.Condition `json:"conditions,omitempty"` // Inventory of applied service resources ServiceAccounts StatusServiceAccountList `json:"serviceAccounts,omitempty"` }
IRSAStatus defines the observed state of IRSA.
func (*IRSAStatus) DeepCopy ¶
func (in *IRSAStatus) DeepCopy() *IRSAStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IRSAStatus.
func (*IRSAStatus) DeepCopyInto ¶
func (in *IRSAStatus) DeepCopyInto(out *IRSAStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IRSAStatus) ServiceNamespacedNameList ¶
func (s *IRSAStatus) ServiceNamespacedNameList() []types.NamespacedName
type IamRole ¶
type IamRole struct { // Name represents the name of the IAM role. Name string `json:"name,omitempty"` }
IamRole represents the IAM role configuration
func (*IamRole) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IamRole.
func (*IamRole) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type S3Discovery ¶
type S3Discovery struct { // Region denotes the AWS region where the S3 bucket is located. Region string `json:"region"` // BucketName is the name of the S3 bucket that hosts the OIDC discovery information. BucketName string `json:"bucketName"` }
S3Discovery contains the specifics of the S3 bucket used for hosting OIDC provider discovery information.
func (*S3Discovery) DeepCopy ¶
func (in *S3Discovery) DeepCopy() *S3Discovery
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S3Discovery.
func (*S3Discovery) DeepCopyInto ¶
func (in *S3Discovery) DeepCopyInto(out *S3Discovery)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SelfhostedConditionReason ¶
type SelfhostedConditionReason string
const ( SelfHostedReasonFailedWebhook SelfhostedConditionReason = "SelfHostedSetupFailedWebhookCreation" SelfHostedReasonFailedOidc SelfhostedConditionReason = "SelfHostedSetupFailedOidcCreation" SelfHostedReasonFailedIssuer SelfhostedConditionReason = "SelfHostedSetupFailedIssuer" SelfHostedReasonFailedKeys SelfhostedConditionReason = "SelfHostedSetupFailedKeysCreation" SelfHostedReasonReady SelfhostedConditionReason = "SelfHostedSetupReady" )
type SetupMode ¶
type SetupMode string
+kubebuilder:default=selfhosted +kubebuilder:validation:Enum=selfhosted;eks +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
type StatusServiceAccountList ¶
type StatusServiceAccountList []IRSANamespacedNameWithTags
func (*StatusServiceAccountList) Append ¶
func (s *StatusServiceAccountList) Append(nsNames types.NamespacedName)
Append adds a new IRSANamespacedNameWithTags to the StatusServiceAccountList. If the provided NamespacedName already exists in the list, it will be ignored.
func (StatusServiceAccountList) DeepCopy ¶
func (in StatusServiceAccountList) DeepCopy() StatusServiceAccountList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusServiceAccountList.
func (StatusServiceAccountList) DeepCopyInto ¶
func (in StatusServiceAccountList) DeepCopyInto(out *StatusServiceAccountList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StatusServiceAccountList) Delete ¶
func (s *StatusServiceAccountList) Delete(nsNames types.NamespacedName)
Delete removes an IRSANamespacedNameWithTags from the StatusServiceAccountList that matches the provided NamespacedName. If the provided NamespacedName does not exist in the list, the method does nothing.
func (*StatusServiceAccountList) IsExist ¶
func (s *StatusServiceAccountList) IsExist(nsNames types.NamespacedName) bool