credentials

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	Cert    *x509.Certificate `json:"cert"`
	CertPEM []byte            `json:"certPEM"`
	Key     *ecdsa.PrivateKey `json:"key"`
	KeyPEM  []byte            `json:"keyPEM"`
}

func CreateCA

func CreateCA() (*Certificate, error)

func CreateCertificateForNode

func CreateCertificateForNode(ca *x509.Certificate, caPrivKey any, nodeName string) (*Certificate, error)

CreateCertificateForNode creates a new certificate with the nodeName as the Subject's CN.

func ParseCertificate

func ParseCertificate(certPEM, keyPEM []byte) (*Certificate, error)

type IamRolesAnywhereProvider

type IamRolesAnywhereProvider struct {
	TrustAnchorARN string
	ProfileARN     string
	RoleARN        string
	CA             *Certificate
}

func (*IamRolesAnywhereProvider) FilesForNode

func (i *IamRolesAnywhereProvider) FilesForNode(spec e2e.NodeSpec) ([]e2e.File, error)

func (*IamRolesAnywhereProvider) Name

func (*IamRolesAnywhereProvider) NodeadmConfig

func (i *IamRolesAnywhereProvider) NodeadmConfig(ctx context.Context, spec e2e.NodeSpec) (*api.NodeConfig, error)

func (*IamRolesAnywhereProvider) VerifyUninstall

func (i *IamRolesAnywhereProvider) VerifyUninstall(ctx context.Context, instanceId string) error

type Infrastructure

type Infrastructure struct {
	StackOutput
	RolesAnywhereCA *Certificate
	// contains filtered or unexported fields
}

Infrastructure represents the necessary infrastructure for credentials providers to be used by nodeadm.

func Setup

func Setup(ctx context.Context, logger logr.Logger, config aws.Config, clusterName string) (*Infrastructure, error)

Setup creates the necessary infrastructure for credentials providers to be used by nodeadm.

func (*Infrastructure) Teardown

func (p *Infrastructure) Teardown(ctx context.Context) error

type SsmProvider

type SsmProvider struct {
	SSM  *ssm.Client
	Role string
}

func (*SsmProvider) FilesForNode

func (s *SsmProvider) FilesForNode(_ e2e.NodeSpec) ([]e2e.File, error)

func (*SsmProvider) Name

func (*SsmProvider) NodeadmConfig

func (s *SsmProvider) NodeadmConfig(ctx context.Context, node e2e.NodeSpec) (*api.NodeConfig, error)

func (*SsmProvider) VerifyUninstall

func (s *SsmProvider) VerifyUninstall(ctx context.Context, instanceId string) error

type Stack

type Stack struct {
	ClusterName            string
	Name                   string
	ClusterArn             string
	CFN                    *cloudformation.Client
	IAM                    *iam.Client
	IAMRolesAnywhereCACert []byte
}

func (*Stack) Delete

func (s *Stack) Delete(ctx context.Context, logger logr.Logger, output *StackOutput) error

func (*Stack) Deploy

func (s *Stack) Deploy(ctx context.Context, logger logr.Logger) (*StackOutput, error)

type StackOutput

type StackOutput struct {
	EC2Role            string `json:"EC2Role"`
	InstanceProfileARN string `json:"instanceProfileARN"`
	SSMNodeRoleName    string `json:"ssmNodeRoleName"`
	SSMNodeRoleARN     string `json:"ssmNodeRoleARN"`
	IRANodeRoleName    string `json:"iraNodeRoleName"`
	IRANodeRoleARN     string `json:"iraNodeRoleARN"`
	IRATrustAnchorARN  string `json:"iraTrustAnchorARN"`
	IRAProfileARN      string `json:"iraProfileARN"`
}

Jump to

Keyboard shortcuts

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