Skip to content

Commit

Permalink
Merge branch 'master' into gardener-v1.92
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 authored Sep 30, 2024
2 parents ca21c7a + 70e05d6 commit 56b5a18
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions pkg/webhook/controlplane/ensurer.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/metal-stack/gardener-extension-provider-metal/pkg/apis/metal/helper"
"github.com/metal-stack/gardener-extension-provider-metal/pkg/imagevector"
"github.com/metal-stack/gardener-extension-provider-metal/pkg/metal"
"github.com/metal-stack/metal-lib/pkg/pointer"

appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -219,3 +220,23 @@ func (e *ensurer) EnsureMachineControllerManagerVPA(_ context.Context, _ gcontex
)
return nil
}

func (e *ensurer) EnsureAdditionalFiles(ctx context.Context, gctx gcontext.GardenContext, new, old *[]extensionsv1alpha1.File) error {
if new == nil {
return nil
}

var files []extensionsv1alpha1.File
for _, f := range *new {
if f.Path == "/var/lib/kubelet/config/kubelet" {
// for cis benchmark this needs to be 600
f.Permissions = pointer.Pointer(int32(0600))
}

files = append(files, f)
}

*new = files

return nil
}

0 comments on commit 56b5a18

Please sign in to comment.