Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
0488a1a
test(e2e): add etcd data re-encryption tests after key rotation
jiezhao16 Aug 5, 2026
a924b82
test: fix := to = for rand.Read in etcd re-encryption test
jiezhao16 Sep 9, 2026
a1e17f8
test: fix lint issues in etcd re-encryption test
jiezhao16 Sep 9, 2026
c1266c5
test: add InformingLabel to new etcd re-encryption It() blocks
jiezhao16 Sep 9, 2026
b92840e
test: re-read HostedCluster before computing priorHistoryLen
jiezhao16 Sep 22, 2026
b86e8a3
test: address muraee review — table-driven rotation tests, ring-buffe…
jiezhao16 Sep 28, 2026
e8b75a2
test: name kasMaxAllowedRestarts constant and explain the value
jiezhao16 Oct 2, 2026
323401b
test: hard-fail on current KAS log stream error, silently skip previous
jiezhao16 Oct 2, 2026
430eb16
test: drop canary secret read-back from re-encryption tests
jiezhao16 Oct 5, 2026
202f496
test: use TargetKey.Provider as level-trigger for waitForReEncryption…
jiezhao16 Oct 5, 2026
ccc9cb9
test: wrap verifyConditionBubbleUp in Eventually to fix flake
jiezhao16 Oct 5, 2026
63cfd4d
test: replace raw JSON merge-patches with typed crclient.MergeFrom
jiezhao16 Oct 5, 2026
91fef92
test: add kms-reencryption cluster variant for etcd rotation CI
jiezhao16 Oct 8, 2026
0c14aaf
test: fold AESCBC and Azure KMS re-encryption tests into existing pub…
jiezhao16 Oct 14, 2026
fcdd2d3
test: address review comments on etcd re-encryption e2e tests
jiezhao16 Oct 23, 2026
6177014
chore: revert AGENTS.md changes
jiezhao16 Oct 26, 2026
b4448a7
test: add GinkgoHelper to all etcd re-encryption test helpers
jiezhao16 Oct 26, 2026
1c59809
test: fix gci import order and hypershiftlinter terminology
jiezhao16 Oct 26, 2026
80e45e9
test: address review comments on g.Eventually and remove redundant test
jiezhao16 Oct 26, 2026
865f849
test: drop AESCBC rotation test, require KMS ARN for kms-reencryption…
jiezhao16 Oct 27, 2026
f2fc188
test: refactor rotation tests — explicit It() per test, shared body v…
jiezhao16 Oct 28, 2026
640db08
test: remove verifyStorageVersionMigrations per reviewer feedback
jiezhao16 Oct 28, 2026
045fd9a
test: remove unused fmt import
jiezhao16 Oct 28, 2026
93e295b
test: replace e2eutil.GetConfig with tc.MgmtRESTConfig in KAS log check
jiezhao16 Oct 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions test/e2e/v2/internal/env_vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,17 @@ func init() {
false,
"",
)
// Encryption key rotation test environment variables
RegisterEnvVar(
"E2E_AWS_KMS_KEY_ARN_ALTERNATE",
"Alternate AWS KMS CMK ARN for key rotation re-encryption tests.",
false,
)
RegisterEnvVar(
"E2E_AZURE_KMS_KEY_VERSION_ALTERNATE",
"Alternate Azure Key Vault key version for key rotation re-encryption tests.",
false,
)
// External OIDC test environment variables
RegisterEnvVar(
"E2E_EXTERNAL_OIDC_CA_BUNDLE_FILE",
Expand Down
81 changes: 53 additions & 28 deletions test/e2e/v2/lifecycle/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func (a *AWSPlatformConfig) ClusterSpecs(ctx context.Context, releaseImage, n1Im
publicArgs = append(publicArgs, "--initial-storage-volumes-kms-key="+arn)
}

return []ClusterSpec{
specs := []ClusterSpec{
{
Variant: "public",
DestroyArgs: destroyArgs,
Expand Down Expand Up @@ -230,6 +230,19 @@ func (a *AWSPlatformConfig) ClusterSpecs(ctx context.Context, releaseImage, n1Im
),
},
}

// Only include kms-reencryption when a KMS key ARN is configured.
// e2e rotation coverage is KMS-only; without an ARN there are no rotation
// tests to run so the dedicated cluster would be created for nothing.
if kmsKeyARN := os.Getenv("HYPERSHIFT_ETCD_KMS_KEY_ARN"); kmsKeyARN != "" {
specs = append(specs, ClusterSpec{
Variant: "kms-reencryption",
DestroyArgs: destroyArgs,
CreateArgs: clusterArgs("--kms-key-arn=" + kmsKeyARN),
})
}

return specs
}

// PreCreate deploys the external OIDC provider and the mirror registry fixture
Expand Down Expand Up @@ -292,34 +305,46 @@ func (a *AWSPlatformConfig) DefaultTestPlan() TestPlan {
}

func (a *AWSPlatformConfig) TestMatrix() TestMatrix {
return TestMatrix{
Parallel: []TestGroup{
{
Name: "managed-dns",
Variant: "managed-dns",
LabelFilter: "hosted-cluster-managed-dns",
},
{
Name: "karpenter",
Variant: "karpenter",
LabelFilter: "karpenter",
},
// TODO: It might be possible to decompose the karpenter upgrade test
// into pre and post upgrade specs which communicate with a well defined
// IPC protocol, like the pre step serializing observations which the
// post step can use. Then we can compose the regular upgrade test here
// instead of duplicating upgrade logic inside the karpenter test.
{
Name: "karpenter-upgrade",
Variant: "karpenter-upgrade",
LabelFilter: "karpenter-upgrade",
},
{
Name: "image-mirroring",
Variant: "image-mirroring",
LabelFilter: "image-mirroring",
},
parallel := []TestGroup{
{
Name: "managed-dns",
Variant: "managed-dns",
LabelFilter: "hosted-cluster-managed-dns",
},
{
Name: "karpenter",
Variant: "karpenter",
LabelFilter: "karpenter",
},
// TODO: It might be possible to decompose the karpenter upgrade test
// into pre and post upgrade specs which communicate with a well defined
// IPC protocol, like the pre step serializing observations which the
// post step can use. Then we can compose the regular upgrade test here
// instead of duplicating upgrade logic inside the karpenter test.
{
Name: "karpenter-upgrade",
Variant: "karpenter-upgrade",
LabelFilter: "karpenter-upgrade",
},
{
Name: "image-mirroring",
Variant: "image-mirroring",
LabelFilter: "image-mirroring",
},
}

// kms-reencryption is only scheduled when a KMS key ARN is available —
// it must match the ClusterSpecs() conditional above.
if os.Getenv("HYPERSHIFT_ETCD_KMS_KEY_ARN") != "" {
parallel = append(parallel, TestGroup{
Name: "kms-reencryption",
Variant: "kms-reencryption",
LabelFilter: "etcd-encryption-reencryption",
})
}

return TestMatrix{
Parallel: parallel,
Sequential: []SequentialGroup{
{
Name: "public",
Expand Down
1 change: 1 addition & 0 deletions test/e2e/v2/lifecycle/aws_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func TestAWSPlatformConfigClusterSpecs(t *testing.T) {
g.Expect(spec.DumpArgs).To(BeEmpty(), "variant %s", spec.Variant)
}
})

}

// testCLIImage is a digest-pinned openshift/cli image reference used in lookup and setup tests.
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/v2/lifecycle/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ func (a *AzurePlatformConfig) TestMatrix() TestMatrix {
{
Name: "public",
Variant: "public",
LabelFilter: "azure-machine-diagnostics || self-managed-azure-public || hosted-cluster-node-communication || hosted-cluster-cpo || nodepool-arm64 || secret-encryption || control-plane-workloads || hosted-cluster-security || nodepool-osimagestream || hosted-cluster-ingress",
LabelFilter: "azure-machine-diagnostics || self-managed-azure-public || hosted-cluster-node-communication || hosted-cluster-cpo || nodepool-arm64 || secret-encryption || control-plane-workloads || hosted-cluster-security || nodepool-osimagestream || hosted-cluster-ingress || etcd-encryption-reencryption",
Skip: "KAS allowed CIDRs",
},
{
Expand Down
Loading