Skip to content
Open
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
13 changes: 10 additions & 3 deletions pkg/operator/workload/sync_openshift_oauth_apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/openshift/library-go/pkg/controller/factory"
libgoetcd "github.com/openshift/library-go/pkg/operator/configobserver/etcd"
"github.com/openshift/library-go/pkg/operator/configobserver/featuregates"
encryptionkms "github.com/openshift/library-go/pkg/operator/encryption/kms"
kmspluginlifecycle "github.com/openshift/library-go/pkg/operator/encryption/kms/pluginlifecycle"
"github.com/openshift/library-go/pkg/operator/events"
"github.com/openshift/library-go/pkg/operator/resource/resourceapply"
"github.com/openshift/library-go/pkg/operator/resource/resourcehash"
Expand Down Expand Up @@ -315,8 +315,15 @@ func (c *OAuthAPIServerWorkload) syncStandardDeployment(ctx context.Context, ope
}
required.Spec.Replicas = masterNodeCount

if err := encryptionkms.AddKMSPluginVolumeAndMountToPodSpec(&required.Spec.Template.Spec, "oauth-apiserver", c.featureGateAccessor); err != nil {
return nil, fmt.Errorf("failed to add KMS encryption volumes: %w", err)
if err := kmspluginlifecycle.AddKMSPluginSidecarToPodSpec(
ctx,
&required.Spec.Template.Spec,
"oauth-apiserver",
c.targetNamespace,
fmt.Sprintf("encryption-config-%d", operatorStatus.LatestAvailableRevision),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is better to get confirmation from @p0lyn0mial with this line.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c.kubeClient.CoreV1(),
c.featureGateAccessor); err != nil {
Comment thread
coderabbitai[bot] marked this conversation as resolved.
return nil, fmt.Errorf("failed to add KMS plugin to pod spec: %w", err)
}

deployment, _, err := resourceapply.ApplyDeployment(ctx, c.kubeClient.AppsV1(), eventRecorder, required, resourcemerge.ExpectedDeploymentGeneration(required, operatorStatus.Generations))
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.

1 change: 1 addition & 0 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ github.com/openshift/library-go/pkg/operator/encryption/deployer
github.com/openshift/library-go/pkg/operator/encryption/encoding
github.com/openshift/library-go/pkg/operator/encryption/encryptiondata
github.com/openshift/library-go/pkg/operator/encryption/kms
github.com/openshift/library-go/pkg/operator/encryption/kms/pluginlifecycle
github.com/openshift/library-go/pkg/operator/encryption/observer
github.com/openshift/library-go/pkg/operator/encryption/secrets
github.com/openshift/library-go/pkg/operator/encryption/state
Expand Down