iamauth

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2020 License: Apache-2.0 Imports: 20 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 = errors.New("invalid backend type")
	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
}

func NewService

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

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