rebase: update k8s.io packages to v0.29.0

Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
Niels de Vos
2023-12-20 13:23:59 +01:00
committed by mergify[bot]
parent 328a264202
commit f080b9e0c9
367 changed files with 21340 additions and 11878 deletions

View File

@ -23,7 +23,6 @@ import (
"google.golang.org/grpc"
"k8s.io/klog/v2"
kmsapi "k8s.io/kms/apis/v2"
)
@ -45,8 +44,6 @@ func NewGRPCService(
kmsService Service,
) *GRPCService {
klog.V(4).InfoS("KMS plugin configured", "address", address, "timeout", timeout)
return &GRPCService{
addr: address,
timeout: timeout,
@ -70,14 +67,12 @@ func (s *GRPCService) ListenAndServe() error {
kmsapi.RegisterKeyManagementServiceServer(gs, s)
klog.V(4).InfoS("kms plugin serving", "address", s.addr)
return gs.Serve(ln)
}
// Shutdown performs a graceful shutdown. Doesn't accept new connections and
// blocks until all pending RPCs are finished.
func (s *GRPCService) Shutdown() {
klog.V(4).InfoS("kms plugin shutdown", "address", s.addr)
if s.server != nil {
s.server.GracefulStop()
}
@ -86,7 +81,6 @@ func (s *GRPCService) Shutdown() {
// Close stops the server by closing all connections immediately and cancels
// all active RPCs.
func (s *GRPCService) Close() {
klog.V(4).InfoS("kms plugin close", "address", s.addr)
if s.server != nil {
s.server.Stop()
}
@ -108,8 +102,6 @@ func (s *GRPCService) Status(ctx context.Context, _ *kmsapi.StatusRequest) (*kms
// Decrypt sends a decryption request to specified kms service.
func (s *GRPCService) Decrypt(ctx context.Context, req *kmsapi.DecryptRequest) (*kmsapi.DecryptResponse, error) {
klog.V(4).InfoS("decrypt request received", "id", req.Uid)
plaintext, err := s.kmsService.Decrypt(ctx, req.Uid, &DecryptRequest{
Ciphertext: req.Ciphertext,
KeyID: req.KeyId,
@ -126,8 +118,6 @@ func (s *GRPCService) Decrypt(ctx context.Context, req *kmsapi.DecryptRequest) (
// Encrypt sends an encryption request to specified kms service.
func (s *GRPCService) Encrypt(ctx context.Context, req *kmsapi.EncryptRequest) (*kmsapi.EncryptResponse, error) {
klog.V(4).InfoS("encrypt request received", "id", req.Uid)
encRes, err := s.kmsService.Encrypt(ctx, req.Uid, req.Plaintext)
if err != nil {
return nil, err