Skip to content

Commit

Permalink
Update deprecated Port fields (#878)
Browse files Browse the repository at this point in the history
  • Loading branch information
halamix2 authored Apr 11, 2024
1 parent f1c5f5b commit e266152
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion components/operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import (
ctrlclient "sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/healthz"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
ctrlwebhook "sigs.k8s.io/controller-runtime/pkg/webhook"

operatorv1alpha1 "github.com/kyma-project/serverless/components/operator/api/v1alpha1"
"github.com/kyma-project/serverless/components/operator/controllers"
Expand Down Expand Up @@ -98,7 +99,9 @@ func main() {
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
MetricsBindAddress: metricsAddr,
Port: 9443,
WebhookServer: ctrlwebhook.NewServer(ctrlwebhook.Options{
Port: 9443,
}),
HealthProbeBindAddress: probeAddr,
SyncPeriod: &syncPeriod,
Client: ctrlclient.Options{
Expand Down
5 changes: 4 additions & 1 deletion components/serverless/cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
ctrlzap "sigs.k8s.io/controller-runtime/pkg/log/zap"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/source"
ctrlwebhook "sigs.k8s.io/controller-runtime/pkg/webhook"
// +kubebuilder:scaffold:imports
)

Expand Down Expand Up @@ -109,7 +110,9 @@ func main() {
MetricsBindAddress: config.MetricsAddress,
LeaderElection: config.LeaderElectionEnabled,
LeaderElectionID: config.LeaderElectionID,
Port: config.SecretMutatingWebhookPort,
WebhookServer: ctrlwebhook.NewServer(ctrlwebhook.Options{
Port: config.SecretMutatingWebhookPort,
}),
HealthProbeBindAddress: config.Healthz.Address,
Client: ctrlclient.Options{
Cache: &ctrlclient.CacheOptions{
Expand Down

0 comments on commit e266152

Please sign in to comment.