Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 4 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,7 @@ require (
sigs.k8s.io/yaml v1.6.0 // indirect
)

replace github.com/onsi/ginkgo/v2 => github.com/openshift/onsi-ginkgo/v2 v2.6.1-0.20251001123353-fd5b1fb35db1
replace (
github.com/onsi/ginkgo/v2 => github.com/openshift/onsi-ginkgo/v2 v2.6.1-0.20251001123353-fd5b1fb35db1
github.com/openshift/library-go => github.com/bertinatto/library-go v0.0.0-20260521212646-57fab52e2504
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ github.com/apparentlymart/go-cidr v1.0.1 h1:NmIwLZ/KdsjIUlhf+/Np40atNXm/+lZ5txfT
github.com/apparentlymart/go-cidr v1.0.1/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bertinatto/library-go v0.0.0-20260521212646-57fab52e2504 h1:LUvXyaZtY1Q4rYCQI8QF6UzseSaOCQPYJlvGovbXv0k=
github.com/bertinatto/library-go v0.0.0-20260521212646-57fab52e2504/go.mod h1:gKG9lctU0yEftSoT3DUyeIWz1oAgF0EHUpwI4pnCo4o=
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
Expand Down Expand Up @@ -165,8 +167,6 @@ github.com/openshift/build-machinery-go v0.0.0-20250530140348-dc5b2804eeee h1:+S
github.com/openshift/build-machinery-go v0.0.0-20250530140348-dc5b2804eeee/go.mod h1:8jcm8UPtg2mCAsxfqKil1xrmRMI3a+XU2TZ9fF8A7TE=
github.com/openshift/client-go v0.0.0-20260512113608-deb4dc54551a h1:EKx2XhOKehd1C5ptY7IrLl4WV35E8kP0pRPnG5BUZXk=
github.com/openshift/client-go v0.0.0-20260512113608-deb4dc54551a/go.mod h1:V933kvY/cb/Un7UCEOhXHUySNX327u7Epe8g9KNqg2Q=
github.com/openshift/library-go v0.0.0-20260520123929-8dbb42ebf1e9 h1:1ubwPydT+ABjfvmeiv4hoJQ0gIDCyMq/U5UyHrrpefA=
github.com/openshift/library-go v0.0.0-20260520123929-8dbb42ebf1e9/go.mod h1:gKG9lctU0yEftSoT3DUyeIWz1oAgF0EHUpwI4pnCo4o=
github.com/openshift/onsi-ginkgo/v2 v2.6.1-0.20251001123353-fd5b1fb35db1 h1:PMTgifBcBRLJJiM+LgSzPDTk9/Rx4qS09OUrfpY6GBQ=
github.com/openshift/onsi-ginkgo/v2 v2.6.1-0.20251001123353-fd5b1fb35db1/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo=
github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0=
Expand Down
12 changes: 4 additions & 8 deletions test/e2e-encryption-kms/encryption_kms.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (

g "github.com/onsi/ginkgo/v2"

configv1 "github.com/openshift/api/config/v1"
"github.com/openshift/cluster-kube-apiserver-operator/pkg/operator/operatorclient"
operatorencryption "github.com/openshift/cluster-kube-apiserver-operator/test/library/encryption"
library "github.com/openshift/library-go/test/library/encryption"
Expand Down Expand Up @@ -42,7 +41,7 @@ func testKMSEncryptionOnOff(t testing.TB) {
// NOTE: This manual deployment is only required for KMS v1. In the future,
// the platform will manage the KMS plugins, and this code will no longer be needed.
librarykms.DeployUpstreamMockKMSPlugin(context.Background(), t, library.GetClients(t).Kube, librarykms.WellKnownUpstreamMockKMSPluginNamespace, librarykms.WellKnownUpstreamMockKMSPluginImage, librarykms.DefaultKMSPluginCount)
library.TestEncryptionTurnOnAndOff(t, library.OnOffScenario{
library.TestEncryptionTurnOnAndOff(context.TODO(), t, library.OnOffScenario{
BasicScenario: library.BasicScenario{
Namespace: operatorclient.GlobalMachineSpecifiedConfigNamespace,
LabelSelector: "encryption.apiserver.operator.openshift.io/component" + "=" + operatorclient.TargetNamespace,
Expand All @@ -57,10 +56,7 @@ func testKMSEncryptionOnOff(t testing.TB) {
AssertResourceNotEncryptedFunc: operatorencryption.AssertSecretOfLifeNotEncrypted,
ResourceFunc: operatorencryption.SecretOfLife,
ResourceName: "SecretOfLife",
EncryptionProvider: library.EncryptionProvider{APIServerEncryption: configv1.APIServerEncryption{
Type: configv1.EncryptionTypeKMS,
KMS: librarykms.DefaultFakeKMSPluginConfig,
}},
EncryptionProvider: librarykms.DefaultFakeVaultEncryptionProvider,
})
}

Expand All @@ -74,7 +70,7 @@ func testKMSEncryptionOnOff(t testing.TB) {
// 6. Verifies secret is correctly encrypted after each migration
func testKMSEncryptionProvidersMigration(t testing.TB) {
librarykms.DeployUpstreamMockKMSPlugin(context.Background(), t, library.GetClients(t).Kube, librarykms.WellKnownUpstreamMockKMSPluginNamespace, librarykms.WellKnownUpstreamMockKMSPluginImage, librarykms.DefaultKMSPluginCount)
library.TestEncryptionProvidersMigration(t, library.ProvidersMigrationScenario{
library.TestEncryptionProvidersMigration(context.TODO(), t, library.ProvidersMigrationScenario{
BasicScenario: library.BasicScenario{
Namespace: operatorclient.GlobalMachineSpecifiedConfigNamespace,
LabelSelector: "encryption.apiserver.operator.openshift.io/component" + "=" + operatorclient.TargetNamespace,
Expand All @@ -90,7 +86,7 @@ func testKMSEncryptionProvidersMigration(t testing.TB) {
ResourceFunc: operatorencryption.SecretOfLife,
ResourceName: "SecretOfLife",
EncryptionProviders: library.ShuffleEncryptionProviders([]library.EncryptionProvider{
{APIServerEncryption: configv1.APIServerEncryption{Type: configv1.EncryptionTypeKMS, KMS: librarykms.DefaultFakeKMSPluginConfig}},
librarykms.DefaultFakeVaultEncryptionProvider,
library.SupportedStaticEncryptionProviders[rand.IntN(len(library.SupportedStaticEncryptionProviders))],
}),
})
Expand Down
2 changes: 1 addition & 1 deletion test/e2e-encryption-perf/encryption_perf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var provider = flag.String("provider", "aescbc", "encryption provider used by th

func TestPerfEncryption(tt *testing.T) {
operatorClient := operatorencryption.GetOperator(tt)
library.TestPerfEncryption(tt, library.PerfScenario{
library.TestPerfEncryption(context.TODO(), tt, library.PerfScenario{
BasicScenario: library.BasicScenario{
Namespace: operatorclient.GlobalMachineSpecifiedConfigNamespace,
LabelSelector: "encryption.apiserver.operator.openshift.io/component" + "=" + operatorclient.TargetNamespace,
Expand Down
2 changes: 1 addition & 1 deletion test/e2e-encryption-rotation/encryption_rotation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var provider = flag.String("provider", "aescbc", "encryption provider used by th
// rotation by setting the "encyrption.Reason" in the operator's configuration
// file
func TestEncryptionRotation(t *testing.T) {
library.TestEncryptionRotation(t, library.RotationScenario{
library.TestEncryptionRotation(context.TODO(), t, library.RotationScenario{
BasicScenario: library.BasicScenario{
Namespace: operatorclient.GlobalMachineSpecifiedConfigNamespace,
LabelSelector: "encryption.apiserver.operator.openshift.io/component" + "=" + operatorclient.TargetNamespace,
Expand Down
7 changes: 4 additions & 3 deletions test/e2e-encryption/encryption_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package e2e_encryption

import (
"context"
"flag"
"fmt"
"testing"
Expand All @@ -14,7 +15,7 @@ import (
var provider = flag.String("provider", "aescbc", "encryption provider used by the tests")

func TestEncryptionTypeIdentity(t *testing.T) {
library.TestEncryptionTypeIdentity(t, library.BasicScenario{
library.TestEncryptionTypeIdentity(context.TODO(), t, library.BasicScenario{
Namespace: operatorclient.GlobalMachineSpecifiedConfigNamespace,
LabelSelector: "encryption.apiserver.operator.openshift.io/component" + "=" + operatorclient.TargetNamespace,
EncryptionConfigSecretName: fmt.Sprintf("encryption-config-%s", operatorclient.TargetNamespace),
Expand All @@ -26,7 +27,7 @@ func TestEncryptionTypeIdentity(t *testing.T) {
}

func TestEncryptionTypeUnset(t *testing.T) {
library.TestEncryptionTypeUnset(t, library.BasicScenario{
library.TestEncryptionTypeUnset(context.TODO(), t, library.BasicScenario{
Namespace: operatorclient.GlobalMachineSpecifiedConfigNamespace,
LabelSelector: "encryption.apiserver.operator.openshift.io/component" + "=" + operatorclient.TargetNamespace,
EncryptionConfigSecretName: fmt.Sprintf("encryption-config-%s", operatorclient.TargetNamespace),
Expand All @@ -38,7 +39,7 @@ func TestEncryptionTypeUnset(t *testing.T) {
}

func TestEncryptionTurnOnAndOff(t *testing.T) {
library.TestEncryptionTurnOnAndOff(t, library.OnOffScenario{
library.TestEncryptionTurnOnAndOff(context.TODO(), t, library.OnOffScenario{
BasicScenario: library.BasicScenario{
Namespace: operatorclient.GlobalMachineSpecifiedConfigNamespace,
LabelSelector: "encryption.apiserver.operator.openshift.io/component" + "=" + operatorclient.TargetNamespace,
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/encryption.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package e2e

import (
"context"
"fmt"
"testing"

Expand All @@ -18,7 +19,7 @@ var _ = g.Describe("[sig-api-machinery] kube-apiserver operator", func() {
})

func testEncryptionTypeAESCBC(t testing.TB) {
library.TestEncryptionTypeAESCBC(t, library.BasicScenario{
library.TestEncryptionTypeAESCBC(context.TODO(), t, library.BasicScenario{
Namespace: operatorclient.GlobalMachineSpecifiedConfigNamespace,
LabelSelector: "encryption.apiserver.operator.openshift.io/component" + "=" + operatorclient.TargetNamespace,
EncryptionConfigSecretName: fmt.Sprintf("encryption-config-%s", operatorclient.TargetNamespace),
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading