Skip to content

Commit fd57b1c

Browse files
author
Kubernetes Submit Queue
authored
Merge pull request kubernetes#53249 from hzxuzhonghu/envelop-encrypt
Automatic merge from submit-queue (batch tested with PRs 53249, 53586). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. rename encryptionconfig_test.go and remove unused filed in envelopeTransformer **What this PR does / why we need it**: useless field `cacheSize` and rename test file match original `config.go`. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
2 parents e51e714 + 81d8746 commit fd57b1c

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ go_library(
2727

2828
go_test(
2929
name = "go_default_test",
30-
srcs = ["encryptionconfig_test.go"],
30+
srcs = ["config_test.go"],
3131
library = ":go_default_library",
3232
deps = [
3333
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",

staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/envelope.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ type envelopeTransformer struct {
4646
// transformers is a thread-safe LRU cache which caches decrypted DEKs indexed by their encrypted form.
4747
transformers *lru.Cache
4848

49-
// cacheSize is the maximum number of DEKs that are cached.
50-
cacheSize int
51-
5249
// baseTransformerFunc creates a new transformer for encrypting the data with the DEK.
5350
baseTransformerFunc func(cipher.Block) value.Transformer
5451
}
@@ -68,7 +65,6 @@ func NewEnvelopeTransformer(envelopeService Service, cacheSize int, baseTransfor
6865
return &envelopeTransformer{
6966
envelopeService: envelopeService,
7067
transformers: cache,
71-
cacheSize: cacheSize,
7268
baseTransformerFunc: baseTransformerFunc,
7369
}, nil
7470
}

0 commit comments

Comments
 (0)