Documentation
¶
Index ¶
- Constants
- Variables
- func PodIdentityBucket(ctx context.Context, client *s3.Client, cluster string) (string, error)
- func PodIdentityRole(ctx context.Context, client *iam.Client, cluster string) (string, error)
- type ADOTTest
- type Addon
- func (a Addon) Create(ctx context.Context, client *eks.Client, logger logr.Logger) error
- func (a Addon) CreateAndWaitForActive(ctx context.Context, eksClient *eks.Client, k8s clientgo.Interface, ...) error
- func (a Addon) Delete(ctx context.Context, client *eks.Client, logger logr.Logger) error
- func (a Addon) IsAvailable(ctx context.Context, client *eks.Client) (bool, error)
- func (a Addon) WaitUntilActive(ctx context.Context, client *eks.Client, logger logr.Logger) error
- type AddonTestConfig
- type CertManagerTest
- type CloudWatchAddon
- func (cw *CloudWatchAddon) SetupCwAddon(ctx context.Context, eksClient *eks.Client, k8sClient clientgo.Interface, ...) error
- func (cw CloudWatchAddon) VerifyCloudWatchLogGroups(ctx context.Context, cwLogsClient *cloudwatchlogs.Client, logger logr.Logger) error
- func (cw CloudWatchAddon) VerifyCwAddon(ctx context.Context, dynamicClient dynamic.Interface, ...) error
- func (cw CloudWatchAddon) WaitForComponents(ctx context.Context, k8sClient clientgo.Interface, logger logr.Logger) error
- type ExternalDNSTest
- type FlexibleStringSlice
- type FsxCSIDriverTest
- type KubeStateMetricsTest
- func (k *KubeStateMetricsTest) AddonName() string
- func (k *KubeStateMetricsTest) Create(ctx context.Context) error
- func (k *KubeStateMetricsTest) Delete(ctx context.Context) error
- func (k *KubeStateMetricsTest) PrintLogs(ctx context.Context) error
- func (k *KubeStateMetricsTest) Validate(ctx context.Context) error
- type MetricsServerTest
- type NodeMonitoringAgentTest
- func (n *NodeMonitoringAgentTest) AddonName() string
- func (n *NodeMonitoringAgentTest) Create(ctx context.Context) error
- func (n *NodeMonitoringAgentTest) Delete(ctx context.Context) error
- func (n *NodeMonitoringAgentTest) PrintLogs(ctx context.Context) error
- func (n *NodeMonitoringAgentTest) Validate(ctx context.Context) error
- type NvidiaDevicePluginTest
- type PCAIssuerTest
- type PodIdentityAddon
- type PodIdentityAssociation
- type PolicyDocument
- type PrometheusNodeExporterTest
- func (p *PrometheusNodeExporterTest) AddonName() string
- func (p *PrometheusNodeExporterTest) Create(ctx context.Context) error
- func (p *PrometheusNodeExporterTest) Delete(ctx context.Context) error
- func (p *PrometheusNodeExporterTest) PrintLogs(ctx context.Context) error
- func (p *PrometheusNodeExporterTest) Validate(ctx context.Context) error
- type S3MountpointCSIDriverTest
- type SecretsStoreCSIDriverTest
- type StatementEntry
- type VerifyPodIdentityAddon
Constants ¶
const (
PodIdentityS3BucketPrefix = "podid"
)
Variables ¶
var ErrAddonNotAvailable = errors.New("addon not available in this region")
ErrAddonNotAvailable is returned when an addon is not available in the current region/partition.
var ErrPodIdentityBucketNotFound = errors.New("pod identity bucket not found")
Functions ¶
func PodIdentityBucket ¶ added in v1.0.4
PodIdentityBucket returns the pod identity bucket for the given cluster.
Types ¶
type ADOTTest ¶ added in v1.0.19
type ADOTTest struct {
Cluster string
K8S clientgo.Interface
EKSClient *eks.Client
CloudWatchClient *cloudwatchlogs.Client
PodIdentityRoleArn string
Logger logr.Logger
// contains filtered or unexported fields
}
ADOTTest tests the AWS Distro for OpenTelemetry (ADOT) addon. ADOT requires cert-manager to be installed first. Validation uses the Container Logs pipeline to ship pod logs to CloudWatch Logs, then verifies that log entries appear in the expected log group.
The ADOT EKS addon creates the collector DaemonSet automatically when the containerLogs pipeline is enabled in the addon's configuration values. Pod Identity is used to grant the collector service account CloudWatch Logs permissions.
func (*ADOTTest) Cleanup ¶ added in v1.0.19
Cleanup removes the ADOT addon and the CloudWatch log group created during the test.
func (*ADOTTest) PrintLogs ¶ added in v1.0.19
PrintLogs collects logs from the ADOT operator for debugging.
func (*ADOTTest) Setup ¶ added in v1.0.19
Setup installs the ADOT EKS addon with the containerLogs pipeline enabled and waits for both the operator deployment and the collector DaemonSet to be ready. The addon creates the DaemonSet automatically from the configuration values. Pod Identity grants the collector service account CloudWatch Logs write permissions. If the addon is not available in the current region/partition, Setup returns nil and marks the test as unavailable so Validate becomes a no-op.
type Addon ¶
type Addon struct {
Name string
Namespace string
Cluster string
Configuration string
Version string
PodIdentityAssociations []PodIdentityAssociation
}
func (Addon) CreateAndWaitForActive ¶ added in v1.0.6
func (Addon) IsAvailable ¶ added in v1.0.19
IsAvailable returns true if the addon has at least one version available via DescribeAddonVersions. This is used to skip tests in regions/partitions where the addon is not offered.
type AddonTestConfig ¶ added in v1.0.18
type AddonTestConfig struct {
Cluster string
K8S peeredtypes.K8s
EKSClient *eks.Client
K8SConfig *rest.Config
Logger logr.Logger
Region string
EcrAccount string
DNSSuffix string
}
AddonTestConfig contains common configuration fields shared across addon tests. This reduces duplication and makes it easier to add new common fields in the future.
type CertManagerTest ¶ added in v1.0.8
type CertManagerTest struct {
Cluster string
K8S clientgo.Interface
EKSClient *eks.Client
K8SConfig *rest.Config
Logger logr.Logger
CertClient certmanagerclientset.Interface
PCAIssuer *PCAIssuerTest
ADOT *ADOTTest
CertName, CertNamespace, CertSecretName, IssuerName string
// contains filtered or unexported fields
}
CertManagerTest tests the cert-manager addon
func (*CertManagerTest) AddonName ¶ added in v1.0.19
func (c *CertManagerTest) AddonName() string
func (*CertManagerTest) Create ¶ added in v1.0.8
func (c *CertManagerTest) Create(ctx context.Context) error
Create installs the cert-manager addon
func (*CertManagerTest) Delete ¶ added in v1.0.8
func (c *CertManagerTest) Delete(ctx context.Context) error
Delete removes the addon and cleans up test resources
type CloudWatchAddon ¶ added in v1.0.11
func NewCloudWatchAddon ¶ added in v1.0.11
func NewCloudWatchAddon(cluster, roleArn string) CloudWatchAddon
NewCloudWatchAddon creates a new CloudWatch Observability addon instance
func (*CloudWatchAddon) SetupCwAddon ¶ added in v1.0.15
func (cw *CloudWatchAddon) SetupCwAddon(ctx context.Context, eksClient *eks.Client, k8sClient clientgo.Interface, cwLogsClient *cloudwatchlogs.Client, logger logr.Logger) error
SetupCwAddon handles CloudWatch addon installation and setup
func (CloudWatchAddon) VerifyCloudWatchLogGroups ¶ added in v1.0.15
func (cw CloudWatchAddon) VerifyCloudWatchLogGroups(ctx context.Context, cwLogsClient *cloudwatchlogs.Client, logger logr.Logger) error
VerifyCloudWatchLogGroups verifies that CloudWatch log groups exist and have active streams
func (CloudWatchAddon) VerifyCwAddon ¶ added in v1.0.15
func (cw CloudWatchAddon) VerifyCwAddon( ctx context.Context, dynamicClient dynamic.Interface, cwLogsClient *cloudwatchlogs.Client, logger logr.Logger, ) error
VerifyCwAddon verifies CloudWatch addon functionality including webhook validation and log groups
func (CloudWatchAddon) WaitForComponents ¶ added in v1.0.11
func (cw CloudWatchAddon) WaitForComponents(ctx context.Context, k8sClient clientgo.Interface, logger logr.Logger) error
WaitForComponents waits for CloudWatch components to be ready
type ExternalDNSTest ¶ added in v1.0.13
type ExternalDNSTest struct {
AddonTestConfig
Route53Client *route53.Client
PodIdentityRoleArn string
// contains filtered or unexported fields
}
ExternalDNSTest tests the external-dns addon
func (*ExternalDNSTest) AddonName ¶ added in v1.0.19
func (e *ExternalDNSTest) AddonName() string
AddonName returns the name of the external-dns addon
func (*ExternalDNSTest) Create ¶ added in v1.0.13
func (e *ExternalDNSTest) Create(ctx context.Context) error
Create installs the external-dns addon
type FlexibleStringSlice ¶ added in v1.0.10
type FlexibleStringSlice []string
FlexibleStringSlice handles JSON unmarshaling for fields that can be either a string or []string
func (*FlexibleStringSlice) UnmarshalJSON ¶ added in v1.0.10
func (f *FlexibleStringSlice) UnmarshalJSON(data []byte) error
UnmarshalJSON implements custom unmarshaling to handle both string and []string
type FsxCSIDriverTest ¶ added in v1.0.14
type FsxCSIDriverTest struct {
Cluster string
K8S peeredtypes.K8s
EKSClient *eks.Client
FSXClient *fsx.Client
K8SConfig *rest.Config
Logger logr.Logger
PodIdentityRoleArn string
SubnetID string
SecurityGroupID string
Region string
// contains filtered or unexported fields
}
FsxCSIDriverTest tests the AWS FSX CSI driver addon
func (*FsxCSIDriverTest) AddonName ¶ added in v1.0.19
func (f *FsxCSIDriverTest) AddonName() string
Create installs the AWS FSX CSI driver addon
func (*FsxCSIDriverTest) Create ¶ added in v1.0.14
func (f *FsxCSIDriverTest) Create(ctx context.Context) error
type KubeStateMetricsTest ¶ added in v1.0.7
type KubeStateMetricsTest struct {
Cluster string
K8S clientgo.Interface
EKSClient *eks.Client
K8SConfig *rest.Config
Logger logr.Logger
// contains filtered or unexported fields
}
KubeStateMetricsTest tests the kube-state-metrics addon
func (*KubeStateMetricsTest) AddonName ¶ added in v1.0.19
func (k *KubeStateMetricsTest) AddonName() string
AddonName returns the name of the kube-state-metrics addon
func (*KubeStateMetricsTest) Create ¶ added in v1.0.7
func (k *KubeStateMetricsTest) Create(ctx context.Context) error
Create installs the kube-state-metrics addon
func (*KubeStateMetricsTest) Delete ¶ added in v1.0.7
func (k *KubeStateMetricsTest) Delete(ctx context.Context) error
Delete removes the addon
type MetricsServerTest ¶ added in v1.0.7
type MetricsServerTest struct {
Cluster string
K8S clientgo.Interface
EKSClient *eks.Client
K8SConfig *rest.Config
MetricsClient metricsv1beta1.Interface
Logger logr.Logger
// contains filtered or unexported fields
}
MetricsServerTest tests the metrics-server addon
func (*MetricsServerTest) AddonName ¶ added in v1.0.19
func (m *MetricsServerTest) AddonName() string
AddonName returns the name of the metrics-server addon
func (*MetricsServerTest) Create ¶ added in v1.0.7
func (m *MetricsServerTest) Create(ctx context.Context) error
Create installs the metrics-server addon
func (*MetricsServerTest) Delete ¶ added in v1.0.7
func (m *MetricsServerTest) Delete(ctx context.Context) error
Delete removes the addon
type NodeMonitoringAgentTest ¶ added in v1.0.6
type NodeMonitoringAgentTest struct {
Cluster string
K8S clientgo.Interface
EKSClient *eks.Client
K8SConfig *rest.Config
Logger logr.Logger
Command string
CommandRunner commands.RemoteCommandRunner
NodeFilter labels.Selector
// contains filtered or unexported fields
}
func (*NodeMonitoringAgentTest) AddonName ¶ added in v1.0.19
func (n *NodeMonitoringAgentTest) AddonName() string
func (*NodeMonitoringAgentTest) Create ¶ added in v1.0.6
func (n *NodeMonitoringAgentTest) Create(ctx context.Context) error
func (*NodeMonitoringAgentTest) Delete ¶ added in v1.0.6
func (n *NodeMonitoringAgentTest) Delete(ctx context.Context) error
type NvidiaDevicePluginTest ¶ added in v1.0.8
type NvidiaDevicePluginTest struct {
Cluster string
K8S peeredtypes.K8s
EKSClient *eks.Client
K8SConfig *rest.Config
Logger logr.Logger
Command string
CommandRunner commands.RemoteCommandRunner
NodeName string
}
func (*NvidiaDevicePluginTest) Create ¶ added in v1.0.10
func (n *NvidiaDevicePluginTest) Create(ctx context.Context) error
func (*NvidiaDevicePluginTest) Delete ¶ added in v1.0.10
func (n *NvidiaDevicePluginTest) Delete(ctx context.Context) error
func (*NvidiaDevicePluginTest) Validate ¶ added in v1.0.10
func (n *NvidiaDevicePluginTest) Validate(ctx context.Context) error
func (*NvidiaDevicePluginTest) WaitForNvidiaDriverReady ¶ added in v1.0.8
func (n *NvidiaDevicePluginTest) WaitForNvidiaDriverReady(ctx context.Context) error
WaitForNvidiaDrivers checks if nvidia-smi command succeeds on the node
type PCAIssuerTest ¶ added in v1.0.10
type PCAIssuerTest struct {
Cluster string
Namespace string
K8S clientgo.Interface
EKSClient *eks.Client
CertClient certmanagerclientset.Interface
K8sPcaClient awspcaclientset.Interface
PCAClient *acmpca.Client
Region string
PCAArn *string
PodIdentityRoleArn string
Logger logr.Logger
// contains filtered or unexported fields
}
PCAIssuerTest tests the AWS PCA Issuer functionality as a plugin for cert-manager
func (*PCAIssuerTest) Cleanup ¶ added in v1.0.10
func (p *PCAIssuerTest) Cleanup(ctx context.Context) error
Cleanup removes all the AWS PCA Issuer resources
func (*PCAIssuerTest) PrintLogs ¶ added in v1.0.10
func (p *PCAIssuerTest) PrintLogs(ctx context.Context) error
PrintLogs collects and prints logs for debugging
func (*PCAIssuerTest) Setup ¶ added in v1.0.10
func (p *PCAIssuerTest) Setup(ctx context.Context) error
Setup installs the AWS PCA Issuer add-on. If the addon is not available in the current region/partition, Setup returns nil and marks the issuer as unavailable so that Validate can skip the PCA-specific steps without failing the whole test.
type PodIdentityAddon ¶ added in v1.0.3
type PodIdentityAddon struct {
Addon
// contains filtered or unexported fields
}
func NewPodIdentityAddon ¶ added in v1.0.3
func NewPodIdentityAddon(cluster, roleArn string) PodIdentityAddon
type PodIdentityAssociation ¶ added in v1.0.14
type PolicyDocument ¶ added in v1.0.4
type PolicyDocument struct {
Version string
Statement []StatementEntry
}
type PrometheusNodeExporterTest ¶ added in v1.0.8
type PrometheusNodeExporterTest struct {
Cluster string
K8S clientgo.Interface
EKSClient *eks.Client
K8SConfig *rest.Config
Logger logr.Logger
// contains filtered or unexported fields
}
PrometheusNodeExporterTest tests the Prometheus Node Exporter addon
func (*PrometheusNodeExporterTest) AddonName ¶ added in v1.0.19
func (p *PrometheusNodeExporterTest) AddonName() string
func (*PrometheusNodeExporterTest) Create ¶ added in v1.0.8
func (p *PrometheusNodeExporterTest) Create(ctx context.Context) error
Create installs the node exporter addon
func (*PrometheusNodeExporterTest) Delete ¶ added in v1.0.8
func (p *PrometheusNodeExporterTest) Delete(ctx context.Context) error
Delete removes the addon
type S3MountpointCSIDriverTest ¶ added in v1.0.13
type S3MountpointCSIDriverTest struct {
Cluster string
K8S peeredtypes.K8s
EKSClient *eks.Client
S3Client *s3.Client
K8SConfig *rest.Config
Logger logr.Logger
PodIdentityRoleArn string
Bucket string
// contains filtered or unexported fields
}
S3MountpointCSIDriverTest tests the S3 mountpoint CSI driver addon
func (*S3MountpointCSIDriverTest) Create ¶ added in v1.0.13
func (s *S3MountpointCSIDriverTest) Create(ctx context.Context) error
Create installs the S3 mountpoint CSI driver addon
type SecretsStoreCSIDriverTest ¶ added in v1.0.14
type SecretsStoreCSIDriverTest struct {
AddonTestConfig
SecretsManagerClient *secretsmanager.Client
PodIdentityRoleArn string
// contains filtered or unexported fields
}
SecretsStoreCSIDriverTest tests the Secrets Store CSI driver addon
func (*SecretsStoreCSIDriverTest) AddonName ¶ added in v1.0.19
func (s *SecretsStoreCSIDriverTest) AddonName() string
AddonName returns the name of the Secrets Store CSI driver addon
func (*SecretsStoreCSIDriverTest) Create ¶ added in v1.0.14
func (s *SecretsStoreCSIDriverTest) Create(ctx context.Context) error
Create installs the Secrets Store CSI driver addon