Skip to content

Commit

Permalink
remove deprecated methods
Browse files Browse the repository at this point in the history
  • Loading branch information
dbadura committed Feb 7, 2024
1 parent d55a84e commit 7a9ae40
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions internal/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package webhook

import (
"context"
"k8s.io/utils/ptr"
"reflect"

"github.com/kyma-project/warden/internal/admission"
Expand All @@ -12,7 +13,6 @@ import (
apiErrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/utils/pointer"
ctlrclient "sigs.k8s.io/controller-runtime/pkg/client"
)

Expand Down Expand Up @@ -99,8 +99,8 @@ func getFunctionMutatingWebhookCfg(config WebhookConfig) admissionregistrationv1
Service: &admissionregistrationv1.ServiceReference{
Namespace: config.ServiceNamespace,
Name: config.ServiceName,
Path: pointer.String(admission.DefaultingPath),
Port: pointer.Int32(443),
Path: ptr.To[string](admission.DefaultingPath),
Port: ptr.To[int32](443),
},
},
FailurePolicy: &failurePolicy,
Expand All @@ -123,7 +123,7 @@ func getFunctionMutatingWebhookCfg(config WebhookConfig) admissionregistrationv1
},
},
SideEffects: &sideEffects,
TimeoutSeconds: pointer.Int32(WebhookTimeout),
TimeoutSeconds: ptr.To[int32](WebhookTimeout),
}
}

Expand All @@ -149,8 +149,8 @@ func createValidatingWebhookConfiguration(config WebhookConfig) *admissionregist
Service: &admissionregistrationv1.ServiceReference{
Namespace: config.ServiceNamespace,
Name: config.ServiceName,
Path: pointer.String(PodValidationPath),
Port: pointer.Int32(443),
Path: ptr.To[string](PodValidationPath),
Port: ptr.To[int32](443),
},
},
FailurePolicy: &failurePolicy,
Expand All @@ -172,7 +172,7 @@ func createValidatingWebhookConfiguration(config WebhookConfig) *admissionregist
},

SideEffects: &sideEffects,
TimeoutSeconds: pointer.Int32(WebhookTimeout),
TimeoutSeconds: ptr.To[int32](WebhookTimeout),
},
},
}
Expand Down

0 comments on commit 7a9ae40

Please sign in to comment.