Skip to content

Commit

Permalink
Add leader election namespace configuration for apinetlet (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
balpert89 authored May 14, 2024
1 parent 676a6c8 commit 97829fd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/apinetlet/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,19 @@ import (
networkingv1alpha1 "github.com/ironcore-dev/ironcore/api/networking/v1alpha1"
"github.com/ironcore-dev/ironcore/utils/client/config"
flag "github.com/spf13/pflag"
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/cluster"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"

// Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.)
// to ensure that exec-entrypoint and run can make use of them.
_ "k8s.io/client-go/plugin/pkg/client/auth"

"k8s.io/apimachinery/pkg/runtime"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
_ "k8s.io/client-go/plugin/pkg/client/auth"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/cluster"
"sigs.k8s.io/controller-runtime/pkg/healthz"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
//+kubebuilder:scaffold:imports
)

Expand Down Expand Up @@ -128,6 +127,7 @@ func main() {
},
HealthProbeBindAddress: probeAddr,
LeaderElection: enableLeaderElection,
LeaderElectionConfig: apiNetCfg,
LeaderElectionID: "fa89daf5.apinetlet.apinet.ironcore.dev",
Cache: cache.Options{
DefaultNamespaces: cacheDefaultNamespaces,
Expand Down

0 comments on commit 97829fd

Please sign in to comment.