@@ -5,13 +5,13 @@ Subject: [PATCH] run operator
55
66Signed-off-by: l1b0k <libokang.dev@gmail.com>
77---
8- daemon/cmd/daemon_main.go | 22 ++--
8+ daemon/cmd/daemon_main.go | 25 + ++--
99 operator/Makefile | 2 +-
10- operator/main.go | 218 --------------------------------------
11- 3 files changed, 16 insertions(+), 226 deletions(-)
10+ operator/main.go | 219 --------------------------------------
11+ 3 files changed, 19 insertions(+), 227 deletions(-)
1212
1313diff --git a/daemon/cmd/daemon_main.go b/daemon/cmd/daemon_main.go
14- index 14daa753ef..3880abdd9c 100644
14+ index 8948ece323..7ca1c4af6e 100644
1515--- a/daemon/cmd/daemon_main.go
1616+++ b/daemon/cmd/daemon_main.go
1717@@ -14,13 +14,6 @@ import (
@@ -49,11 +49,14 @@ index 14daa753ef..3880abdd9c 100644
4949 )
5050
5151 const (
52- @@ -1613 ,6 +1613,14 @@ func (d *Daemon) initKVStore() {
52+ @@ -1617 ,6 +1617,17 @@ func (d *Daemon) initKVStore() {
5353 }
5454
5555 func runDaemon() {
5656+ go func() {
57+ + if os.Getenv("DISABLE_CILIUM_OPERATOR") == "true" {
58+ + return
59+ + }
5760+ cmd := exec.CommandContext(server.ServerCtx, "cilium-operator-generic", "--skip-crd-creation", "--k8s-namespace", os.Getenv("CILIUM_K8S_NAMESPACE"), "--identity-gc-interval", "10m", "--identity-heartbeat-timeout", "20m")
5861+ cmd.Stdout = os.Stdout
5962+ cmd.Stderr = os.Stderr
@@ -78,7 +81,7 @@ index ebd1285e3d..1710880c84 100644
7881 cilium-operator-aws: GO_TAGS_FLAGS+=ipam_provider_aws
7982 cilium-operator-azure: GO_TAGS_FLAGS+=ipam_provider_azure
8083diff --git a/operator/main.go b/operator/main.go
81- index 803a95322a ..9d6c2522a2 100644
84+ index ac0ad59924 ..9d6c2522a2 100644
8285--- a/operator/main.go
8386+++ b/operator/main.go
8487@@ -15,29 +15,22 @@ import (
@@ -311,7 +314,7 @@ index 803a95322a..9d6c2522a2 100644
311314- // Once the CiliumNodes are synchronized with the operator we will
312315- // be able to watch for K8s Node events which they will be used
313316- // to create the remaining CiliumNodes.
314- - <-k8sCiliumNodesCacheSynced
317+ - <-ciliumNodeManagerQueueSynced
315318-
316319- // We don't want CiliumNodes that don't have podCIDRs to be
317320- // allocated with a podCIDR already being used by another node.
@@ -326,7 +329,7 @@ index 803a95322a..9d6c2522a2 100644
326329 if operatorOption.Config.IdentityGCInterval != 0 {
327330 identityRateLimiter = rate.NewLimiter(
328331 operatorOption.Config.IdentityGCRateInterval,
329- @@ -566,30 +372,6 @@ func onOperatorStartLeading(ctx context.Context) {
332+ @@ -566,31 +372,6 @@ func onOperatorStartLeading(ctx context.Context) {
330333 enableCiliumEndpointSyncGC(true)
331334 }
332335
@@ -346,7 +349,8 @@ index 803a95322a..9d6c2522a2 100644
346349- ingressController, err := ingress.NewIngressController(
347350- ingress.WithHTTPSEnforced(operatorOption.Config.EnforceIngressHTTPS),
348351- ingress.WithSecretsSyncEnabled(operatorOption.Config.EnableIngressSecretsSync),
349- - ingress.WithSecretsNamespace(operatorOption.Config.IngressSecretsNamespace))
352+ - ingress.WithSecretsNamespace(operatorOption.Config.IngressSecretsNamespace),
353+ - ingress.WithLBAnnotationPrefixes(operatorOption.Config.IngressLBAnnotationPrefixes))
350354- if err != nil {
351355- log.WithError(err).WithField(logfields.LogSubsys, ingress.Subsys).Fatal(
352356- "Failed to start ingress controller")
@@ -358,5 +362,5 @@ index 803a95322a..9d6c2522a2 100644
358362
359363 <-shutdownSignal
360364- -
361- 2.37.3
365+ 2.39.0
362366
0 commit comments