mirror of https://github.com/k3s-io/k3s
Merge pull request #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 ```pull/6/head
commit
fd57b1c002
|
@ -27,7 +27,7 @@ go_library(
|
|||
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["encryptionconfig_test.go"],
|
||||
srcs = ["config_test.go"],
|
||||
library = ":go_default_library",
|
||||
deps = [
|
||||
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
|
||||
|
|
|
@ -46,9 +46,6 @@ type envelopeTransformer struct {
|
|||
// transformers is a thread-safe LRU cache which caches decrypted DEKs indexed by their encrypted form.
|
||||
transformers *lru.Cache
|
||||
|
||||
// cacheSize is the maximum number of DEKs that are cached.
|
||||
cacheSize int
|
||||
|
||||
// baseTransformerFunc creates a new transformer for encrypting the data with the DEK.
|
||||
baseTransformerFunc func(cipher.Block) value.Transformer
|
||||
}
|
||||
|
@ -68,7 +65,6 @@ func NewEnvelopeTransformer(envelopeService Service, cacheSize int, baseTransfor
|
|||
return &envelopeTransformer{
|
||||
envelopeService: envelopeService,
|
||||
transformers: cache,
|
||||
cacheSize: cacheSize,
|
||||
baseTransformerFunc: baseTransformerFunc,
|
||||
}, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue