@@ -29,7 +29,6 @@ import (
2929 secretsmanager "github.com/gardener/gardener/pkg/utils/secrets/manager"
3030 admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
3131 appsv1 "k8s.io/api/apps/v1"
32- v1 "k8s.io/api/apps/v1"
3332 corev1 "k8s.io/api/core/v1"
3433 networkingv1 "k8s.io/api/networking/v1"
3534 policyv1 "k8s.io/api/policy/v1"
@@ -368,12 +367,6 @@ type valuesProvider struct {
368367 customLabelDomain string
369368}
370369
371- // isShoot returns if the cluster is a shoot or a seed by checking if the gardenlet is present in cluster
372- func (vp * valuesProvider ) isShoot (ctx context.Context , cluster * extensionscontroller.Cluster ) bool {
373- err := vp .client .Get (ctx , k8sclient.ObjectKey {Name : "gardenlet" , Namespace : "garden" }, & v1.Deployment {})
374- return errors .IsNotFound (err )
375- }
376-
377370// GetConfigChartValues returns the values for the config chart applied by the generic actuator.
378371func (vp * valuesProvider ) GetConfigChartValues (
379372 ctx context.Context ,
@@ -1083,8 +1076,7 @@ func (vp *valuesProvider) getControlPlaneShootChartValues(ctx context.Context, c
10831076 return nil , err
10841077 }
10851078
1086- isShoot := vp .isShoot (ctx , cluster )
1087- podIdentityWebhook , err := vp .getSTACKITPodIdentityWebhookShootChartValues (isShoot , secretsReader )
1079+ podIdentityWebhook , err := vp .getSTACKITPodIdentityWebhookShootChartValues (secretsReader )
10881080 if err != nil {
10891081 return nil , err
10901082 }
@@ -1319,7 +1311,6 @@ func getSTACKITPodIdentityWebhookChartValues(
13191311}
13201312
13211313func (vp * valuesProvider ) getSTACKITPodIdentityWebhookShootChartValues (
1322- isShoot bool ,
13231314 secretsReader secretsmanager.Reader ,
13241315) (map [string ]any , error ) {
13251316 caSecret , found := secretsReader .Get (caNameControlPlane )
@@ -1328,7 +1319,6 @@ func (vp *valuesProvider) getSTACKITPodIdentityWebhookShootChartValues(
13281319 }
13291320
13301321 return map [string ]any {
1331- "enabled" : isShoot ,
13321322 "webhook" : map [string ]any {
13331323 "caBundle" : gardenerutils .EncodeBase64 (caSecret .Data [secretutils .DataKeyCertificateBundle ]),
13341324 },
0 commit comments