-
Notifications
You must be signed in to change notification settings - Fork 41k
Convert k8s.io/kms/apis
from gogo to protoc
#132833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
k8s.io/kms/apis
from gogo to protock8s.io/kms/apis
from gogo to protoc
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
k8s.io/kms/apis
from gogo to protock8s.io/kms/apis
from gogo to protoc
ba15451
to
eb3f591
Compare
k8s.io/kms/apis
from gogo to protock8s.io/kms/apis
from gogo to protoc
staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/config_test.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go
Outdated
Show resolved
Hide resolved
8c76a5f
to
e403217
Compare
staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/config_test.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/config_test.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/envelope.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go
Outdated
Show resolved
Hide resolved
staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go
Show resolved
Hide resolved
@@ -464,6 +464,7 @@ resources: | |||
var firstEncryptedDEKSource []byte | |||
var f checkFunc | |||
if useSeed { | |||
//nolint:govet // copying the lock is nonrelevant for this test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we change all these signatures to take a pointer so we don't have to add nolint:govet anywhere?
diff --git a/test/integration/controlplane/transformation/kmsv2_transformation_test.go b/test/integration/controlplane/transformation/kmsv2_transformation_test.go
index c4a716f870a..a0ecbbc1c95 100644
--- a/test/integration/controlplane/transformation/kmsv2_transformation_test.go
+++ b/test/integration/controlplane/transformation/kmsv2_transformation_test.go
@@ -464,8 +464,7 @@ resources:
var firstEncryptedDEKSource []byte
var f checkFunc
if useSeed {
- //nolint:govet // copying the lock is nonrelevant for this test
- f = func(_ int, _ uint64, etcdKey string, obj kmstypes.EncryptedObject) {
+ f = func(_ int, _ uint64, etcdKey string, obj *kmstypes.EncryptedObject) {
firstEncryptedDEKSource = obj.EncryptedDEKSource
if obj.KeyID != "1" {
@@ -473,8 +472,7 @@ resources:
}
}
} else {
- //nolint:govet // copying the lock is nonrelevant for this test
- f = func(_ int, counter uint64, etcdKey string, obj kmstypes.EncryptedObject) {
+ f = func(_ int, counter uint64, etcdKey string, obj *kmstypes.EncryptedObject) {
firstEncryptedDEKSource = obj.EncryptedDEKSource
if obj.KeyID != "1" {
@@ -534,8 +532,7 @@ resources:
// - create
var checkDEK checkFunc
if useSeed {
- //nolint:govet // copying the lock is nonrelevant for this test
- checkDEK = func(_ int, _ uint64, etcdKey string, obj kmstypes.EncryptedObject) {
+ checkDEK = func(_ int, _ uint64, etcdKey string, obj *kmstypes.EncryptedObject) {
if len(obj.EncryptedDEKSource) == 0 {
t.Error("unexpected empty DEK source")
}
@@ -549,8 +546,7 @@ resources:
}
}
} else {
- //nolint:govet // copying the lock is nonrelevant for this test
- checkDEK = func(_ int, counter uint64, etcdKey string, obj kmstypes.EncryptedObject) {
+ checkDEK = func(_ int, counter uint64, etcdKey string, obj *kmstypes.EncryptedObject) {
if len(obj.EncryptedDEKSource) == 0 {
t.Error("unexpected empty DEK source")
}
@@ -689,8 +685,7 @@ func TestKMSv2ProviderDEKSourceReuse(t *testing.T) {
kmsName := "kms-provider-dek-reuse-false"
defer encryptionconfig.SetKDFForTests(kmsName, false)()
testKMSv2ProviderDEKSourceReuse(t, kmsName,
- //nolint:govet // copying the lock is nonrelevant for this test
- func(i int, counter uint64, etcdKey string, obj kmstypes.EncryptedObject) {
+ func(i int, counter uint64, etcdKey string, obj *kmstypes.EncryptedObject) {
if obj.KeyID != "1" {
t.Errorf("key %s: want key ID %s, got %s", etcdKey, "1", obj.KeyID)
}
@@ -708,8 +703,7 @@ func TestKMSv2ProviderDEKSourceReuse(t *testing.T) {
kmsName := "kms-provider-dek-reuse-true"
defer encryptionconfig.SetKDFForTests(kmsName, true)()
testKMSv2ProviderDEKSourceReuse(t, kmsName,
- //nolint:govet // copying the lock is nonrelevant for this test
- func(_ int, _ uint64, etcdKey string, obj kmstypes.EncryptedObject) {
+ func(_ int, _ uint64, etcdKey string, obj *kmstypes.EncryptedObject) {
if obj.KeyID != "1" {
t.Errorf("key %s: want key ID %s, got %s", etcdKey, "1", obj.KeyID)
}
@@ -770,7 +764,7 @@ resources:
)
}
-type checkFunc func(i int, counter uint64, etcdKey string, obj kmstypes.EncryptedObject)
+type checkFunc func(i int, counter uint64, etcdKey string, obj *kmstypes.EncryptedObject)
func assertPodDEKSources(ctx context.Context, t *testing.T, config storagebackend.Config, podCount, dekSourcesCount int, kmsName, kmsPrefix string, f checkFunc) {
t.Helper()
@@ -824,14 +818,12 @@ func assertPodDEKSources(ctx context.Context, t *testing.T, config storagebacken
}
counter := binary.LittleEndian.Uint64(count)
- //nolint:govet // copying the lock is nonrelevant for this test
- f(i, counter, string(kv.Key), out[i])
+ f(i, counter, string(kv.Key), &out[i])
}
uniqueDEKSources := sets.NewString()
- //nolint:govet // copying the lock is nonrelevant for this test
- for _, object := range out {
- object := object
+ for i := range out {
+ object := &out[i]
uniqueDEKSources.Insert(string(object.EncryptedDEKSource))
if useSeed {
if object.EncryptedDEKSourceType != kmstypes.EncryptedDEKSourceType_HKDF_SHA256_XNONCE_AES_GCM_SEED {
Use standard protoc for the kms APIs instead of gogo. Part of kubernetes#96564 Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
/test pull-kubernetes-unit |
/lgtm |
LGTM label has been added. Git tree hash: 40b7d261f2bcfa323d781e092464932315852ec3
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test pull-kubernetes-unit |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Use standard protoc for the kms APIs instead of gogo.
Which issue(s) this PR is related to:
Part of #96564
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: