Documentation ¶
Overview ¶
Package connector Canonicalize code adopted from https://github.com/kubernetes-sigs/aws-iam-authenticator/blob/2a9ee95fecab59fab41a0b646a63227d66113434/pkg/arn/arn.go At 2022.06.08 to break dependency on aws-iam-authenticator. At the time of adoption the code hasn't changed in over 2 years.
Index ¶
- func Canonicalize(arn string) (string, error)
- func GetManifestFilenames() ([]string, error)
- func ValidProviders() []ekstypes.ConnectorConfigProvider
- func WriteResources(fs afero.Fs, manifestList *ManifestList) error
- type EKSConnector
- type ExternalCluster
- type ManifestFile
- type ManifestList
- type ManifestTemplate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Canonicalize ¶
Canonicalize validates IAM resources are appropriate for the authenticator and converts STS assumed roles into the IAM role resource.
Supported IAM resources are:
- AWS account: arn:aws:iam::123456789012:root
- IAM user: arn:aws:iam::123456789012:user/Bob
- IAM role: arn:aws:iam::123456789012:role/S3Access
- IAM Assumed role: arn:aws:sts::123456789012:assumed-role/Accounting-Role/Mary (converted to IAM role)
- Federated user: arn:aws:sts::123456789012:federated-user/Bob
func GetManifestFilenames ¶
GetManifestFilenames gets the filenames for EKS Connector manifests
func ValidProviders ¶
func ValidProviders() []ekstypes.ConnectorConfigProvider
ValidProviders returns a list of supported providers.
func WriteResources ¶
func WriteResources(fs afero.Fs, manifestList *ManifestList) error
WriteResources writes the EKS Connector resources to the current directory.
Types ¶
type EKSConnector ¶
type EKSConnector struct { Provider provider ManifestTemplate ManifestTemplate }
func (*EKSConnector) DeregisterCluster ¶
func (c *EKSConnector) DeregisterCluster(ctx context.Context, clusterName string) error
DeregisterCluster deregisters the cluster and removes associated IAM resources.
func (*EKSConnector) RegisterCluster ¶
func (c *EKSConnector) RegisterCluster(ctx context.Context, cluster ExternalCluster) (*ManifestList, error)
RegisterCluster registers the specified external cluster with EKS and returns a list of Kubernetes resources for EKS Connector.
type ExternalCluster ¶
type ManifestFile ¶
type ManifestList ¶
type ManifestList struct { ConnectorResources ManifestFile ClusterRoleResources ManifestFile ConsoleAccessResources ManifestFile Expiry time.Time IAMIdentityARN string }
type ManifestTemplate ¶
type ManifestTemplate struct { Connector ManifestFile ClusterRole ManifestFile ConsoleAccess ManifestFile }
ManifestTemplate holds the manifest templates for EKS Connector.
func GetManifestTemplate ¶
func GetManifestTemplate() (ManifestTemplate, error)
GetManifestTemplate returns the resources for EKS Connector.