iamauth

package
v0.7.0-alpha.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EC2NodeUserName is the username required for EC2 nodes.
	EC2NodeUserName = "system:node:{{EC2PrivateDNSName}}"
)

Variables

View Source
var (
	// ErrInvalidBackendType defines an error for an invalid backend type.
	ErrInvalidBackendType = errors.New("invalid backend type")

	// ErrClientRequired defines an error for when a k8s client is required but
	// not supplied.
	ErrClientRequired = errors.New("k8s client required")
)
View Source
var (
	// BackendTypeConfigMap is the Kubernetes config map backend.
	BackendTypeConfigMap = BackendType("config-map")
	// BackendTypeCRD is the CRD based backend.
	BackendTypeCRD = BackendType("crd")
)
View Source
var (
	// NodeGroups is the groups that are required for a node.
	NodeGroups = []string{"system:bootstrappers", "system:nodes"}
)

Functions

This section is empty.

Types

type AuthenticatorBackend

type AuthenticatorBackend interface {
	// MapRole is used to map a role ARN to a user and set of groups
	MapRole(mapping ekscontrolplanev1.RoleMapping) error
	// MapUser is used to map a user ARN to a user and set of groups
	MapUser(mapping ekscontrolplanev1.UserMapping) error
}

AuthenticatorBackend is the interface that represents an aws-iam-authenticator backend.

func NewBackend

func NewBackend(backendType BackendType, client crclient.Client) (AuthenticatorBackend, error)

NewBackend will create a new authenticate backend for a given type. Only use BackendTypeConfigMap with EKS.

type BackendType

type BackendType string

BackendType is a type that represents the different aws-iam-authenticator backends.

type Scope

type Scope interface {
	cloud.ClusterScoper

	// IAMAuthConfig returns the IAM authenticator config
	IAMAuthConfig() *ekscontrolplanev1.IAMAuthenticatorConfig
}

Scope is a scope for use with the iamauth reconciling service.

type Service

type Service struct {
	STSClient stsiface.STSAPI
	// contains filtered or unexported fields
}

Service defines the specs for a service.

func NewService

func NewService(iamScope Scope, backend BackendType, client client.Client) *Service

NewService will create a new Service object.

func (*Service) ReconcileIAMAuthenticator

func (s *Service) ReconcileIAMAuthenticator(ctx context.Context) error

ReconcileIAMAuthenticator is used to create the aws-iam-authenticator in a cluster.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL