ssm

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: 28 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultSsmInstallerRegion = "us-west-2"

Initial region ssm installer is downloaded from. When installer runs, it will down the agent from the proper region configured in the nodeConfig during init command

Variables

View Source
var (
	SsmDaemonName = "amazon-ssm-agent"
)

Functions

func CheckEndpointAccess

func CheckEndpointAccess(ctx context.Context, config aws.Config) error

func DeregisterAndUninstall

func DeregisterAndUninstall(ctx context.Context, logger *zap.Logger, pkgSource PkgSource) error

DeregisterAndUninstall de-registers the managed instance and removes all files and components that make up the ssm agent component.

func GetManagedHybridInstanceId

func GetManagedHybridInstanceId() (string, error)

func GetManagedHybridInstanceIdAndRegion

func GetManagedHybridInstanceIdAndRegion() (string, string, error)

func Install

func Install(ctx context.Context, tracker *tracker.Tracker, source Source) error

func NewSsmDaemon

func NewSsmDaemon(daemonManager daemon.DaemonManager, cfg *api.NodeConfig, logger *zap.Logger) daemon.Daemon

func Uninstall

func Uninstall(ctx context.Context, logger *zap.Logger, pkgSource PkgSource) error

Uninstall uninstall the ssm agent package and removes the setup-cli binary. It does not de-register the managed instance and it leaves the registration and credentials file.

func WaitForAWSConfig

func WaitForAWSConfig(ctx context.Context, nodeConfig *api.NodeConfig, backoff time.Duration) (aws.Config, error)

Types

type AccessValidator

type AccessValidator struct {
	// contains filtered or unexported fields
}

AccessValidator validates access to the AWS SSM API endpoint.

func NewAccessValidator

func NewAccessValidator(aws aws.Config) AccessValidator

NewAccessValidator returns a new AccessValidator.

func (AccessValidator) Run

type HybridInstanceRegistration

type HybridInstanceRegistration struct {
	ManagedInstanceID string `json:"ManagedInstanceID"`
	Region            string `json:"Region"`
}

type PkgSource

type PkgSource interface {
	GetSSMPackage() artifact.Package
}

PkgSource serves and defines the package for target platform

type Source

type Source interface {
	GetSSMInstaller(ctx context.Context) (io.ReadCloser, error)
}

Source serves an SSM installer binary for the target platform.

func NewSSMInstaller

func NewSSMInstaller(region string) Source

SSMInstaller provides a Source that retrieves the SSM installer from the official release endpoint.

Jump to

Keyboard shortcuts

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