certificates

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package certificates provides functionality for managing and renewing certificates in EKS Anywhere clusters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateScanner

type CertificateScanner interface {
	CheckCertificateExpiry(ctx context.Context, cluster *anywherev1.Cluster) ([]anywherev1.ClusterCertificateInfo, error)
	UpdateClusterCertificateStatus(ctx context.Context, cluster *anywherev1.Cluster) error
}

CertificateScanner defines the interface for checking certificate expiration.

type MachineInfo

type MachineInfo struct {
	Name string
	IP   string
}

MachineInfo holds machine name and IP information.

type NodeConfig

type NodeConfig struct {
	Nodes     []string `yaml:"nodes"`
	OS        string   `yaml:"os"`
	SSHKey    string   `yaml:"sshKey"`
	SSHUser   string   `yaml:"sshUser"`
	SSHPasswd string   `yaml:"sshPasswd,omitempty"` // Optional SSH key passphrase.
}

NodeConfig holds SSH configuration for a node group.

type RenewalConfig

type RenewalConfig struct {
	ClusterName  string     `yaml:"clusterName"`
	ControlPlane NodeConfig `yaml:"controlPlane"`
	Etcd         NodeConfig `yaml:"etcd"`
}

RenewalConfig defines the configuration for certificate renewal operations.

func ParseConfig

func ParseConfig(path string) (*RenewalConfig, error)

ParseConfig reads and parses a certificate renewal configuration file.

type Scanner

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

Scanner implements the CertificateScanner interface and provides certificate checking functionality.

func NewCertificateScanner

func NewCertificateScanner(client client.Client, logger logr.Logger) *Scanner

NewCertificateScanner creates a new certificate service.

func (*Scanner) CheckCertificateExpiry

func (s *Scanner) CheckCertificateExpiry(ctx context.Context, cluster *anywherev1.Cluster) ([]anywherev1.ClusterCertificateInfo, error)

CheckCertificateExpiry checks the certificate expiration for control plane and etcd machines.

func (*Scanner) UpdateClusterCertificateStatus

func (s *Scanner) UpdateClusterCertificateStatus(ctx context.Context, cluster *anywherev1.Cluster) error

UpdateClusterCertificateStatus updates the cluster status with certificate information.

Jump to

Keyboard shortcuts

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