Skip to content

Commit

Permalink
Support Security.Networking.Filter.Egress.Enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
VOID404 committed Sep 13, 2024
1 parent 126bbb1 commit 696edfb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/gardener/shoot/extender/network_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ package extender
import (
gardener "github.com/gardener/gardener/pkg/apis/core/v1beta1"
imv1 "github.com/kyma-project/infrastructure-manager/api/v1"
"k8s.io/utils/ptr"
)

const NetworkFilterType = "shoot-networking-filter"

func ExtendWithNetworkFilter(runtime imv1.Runtime, shoot *gardener.Shoot) error { //nolint:revive

networkingFilter := gardener.Extension{
Type: NetworkFilterType,
Disabled: ptr.To(false),
Type: NetworkFilterType,
// this pointer is safe, because runtime is fully pass-by-value
Disabled: &runtime.Spec.Security.Networking.Filter.Egress.Enabled,
}

shoot.Spec.Extensions = append(shoot.Spec.Extensions, networkingFilter)
Expand Down

0 comments on commit 696edfb

Please sign in to comment.