File tree Expand file tree Collapse file tree 12 files changed +31
-31
lines changed Expand file tree Collapse file tree 12 files changed +31
-31
lines changed Original file line number Diff line number Diff line change @@ -28,18 +28,18 @@ const (
2828)
2929
3030type CfgSnippet struct {
31+ ingress * store.Ingress
32+ service * store.Service
3133 name string
3234 frontend string
3335 backend string
34- ingress * store.Ingress
35- service * store.Service
3636}
3737
3838type cfgData struct {
39+ status store.Status
3940 value []string
4041 updated []string
4142 disabled bool
42- status store.Status
4343}
4444
4545// CfgSnippetType represents type of a config snippet
@@ -82,10 +82,10 @@ func InitCfgSnippet() {
8282}
8383
8484type ConfigSnippetOptions struct {
85- Name string
8685 Backend * string
8786 Frontend * string
8887 Ingress * store.Ingress
88+ Name string
8989}
9090
9191// DisableConfigSnippets fills a map[cfgSnippetType]struct{} of disabled config snippet types:
Original file line number Diff line number Diff line change @@ -43,20 +43,20 @@ import (
4343)
4444
4545type Builder struct {
46+ store store.K8s
4647 annotations annotations.Annotations
4748 haproxyClient api.HAProxyClient
4849 gatewayManager gateway.GatewayManager
4950 haproxyProcess process.Process
5051 haproxyRules rules.Rules
5152 restClientSet client.Client
53+ updateStatusManager status.UpdateStatusManager
5254 updatePublishServiceFunc func (ingresses []* ingress.Ingress , publishServiceAddresses []string )
5355 eventChan chan k8s.SyncDataEvent
5456 clientSet * kubernetes.Clientset
55- haproxyEnv env.Env
5657 haproxyCfgFile []byte
57- store store. K8s
58+ haproxyEnv env. Env
5859 osArgs utils.OSArgs
59- updateStatusManager status.UpdateStatusManager
6060}
6161
6262var defaultEnv = env.Env {
Original file line number Diff line number Diff line change @@ -40,21 +40,21 @@ var logger = utils.GetLogger()
4040
4141// HAProxyController is ingress controller
4242type HAProxyController struct {
43+ store store.K8s
4344 gatewayManager gateway.GatewayManager
4445 annotations annotations.Annotations
46+ updateStatusManager status.UpdateStatusManager
4547 eventChan chan k8s.SyncDataEvent
4648 updatePublishServiceFunc func (ingresses []* ingress.Ingress , publishServiceAddresses []string )
4749 chShutdown chan struct {}
4850 podNamespace string
4951 podPrefix string
50- haproxy haproxy.HAProxy
5152 updateHandlers []UpdateHandler
52- store store.K8s
53+ beforeUpdateHandlers []UpdateHandler
54+ haproxy haproxy.HAProxy
5355 osArgs utils.OSArgs
5456 auxCfgModTime int64
5557 ready bool
56- updateStatusManager status.UpdateStatusManager
57- beforeUpdateHandlers []UpdateHandler
5858}
5959
6060// Wrapping a Native-Client transaction and commit it.
Original file line number Diff line number Diff line change @@ -21,12 +21,12 @@ const (
2121type Quic struct {
2222 AddrIPv4 string
2323 AddrIPv6 string
24- IPv4 bool
25- IPv6 bool
2624 CertDir string
27- QuicAnnouncePort int64
2825 MaxAge string
26+ QuicAnnouncePort int64
2927 QuicBindPort int64
28+ IPv4 bool
29+ IPv6 bool
3030}
3131
3232func (q * Quic ) Update (k store.K8s , h haproxy.HAProxy , a annotations.Annotations ) (err error ) {
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ type RuntimeServerData struct {
1919 BackendName string
2020 ServerName string
2121 IP string
22- Port int
2322 State string
23+ Port int
2424}
2525
2626func (c * clientNative ) ExecuteRaw (command string ) (result []string , err error ) {
Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ func NeedAction() bool {
4242}
4343
4444type configurationManagerImpl struct {
45- reload , restart bool
4645 logger utils.Logger
46+ reload , restart bool
4747}
4848
4949func NewConfigurationManager () * configurationManagerImpl {
Original file line number Diff line number Diff line change @@ -76,13 +76,13 @@ type k8s struct {
7676 apiExtensionsClient * crdclientset.Clientset
7777 publishSvc * utils.NamespaceValue
7878 gatewayClient * gatewayclientset.Clientset
79+ crdClient * crdclientset.Clientset
7980 podPrefix string
8081 podNamespace string
8182 whiteListedNS []string
8283 syncPeriod time.Duration
8384 cacheResyncPeriod time.Duration
8485 disableSvcExternalName bool // CVE-2021-25740
85- crdClient * crdclientset.Clientset
8686 gatewayAPIInstalled bool
8787}
8888
Original file line number Diff line number Diff line change @@ -35,17 +35,17 @@ var logger = utils.GetLogger()
3535const cookieKey = "ohph7OoGhong"
3636
3737type Service struct {
38- path * store.IngressPath
39- resource * store.Service
40- backend * models.Backend
41- certs certs.Certificates
38+ certs certs.Certificates
39+ path * store.IngressPath
40+ resource * store.Service
41+ backend * models.Backend
42+ // ingressName string
43+ // ingressNamespace string
44+ ingress * store.Ingress
4245 annotations []map [string ]string
4346 modeTCP bool
4447 newBackend bool
4548 standalone bool
46- // ingressName string
47- // ingressNamespace string
48- ingress * store.Ingress
4949}
5050
5151// New returns a Service instance to handle the k8s IngressPath resource given in params.
Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ type UpdateStatusManager interface {
1717}
1818
1919type UpdateStatusManagerImpl struct {
20- updateIngresses []* ingress.Ingress
2120 client * kubernetes.Clientset
2221 ingressClass string
22+ updateIngresses []* ingress.Ingress
2323 emptyIngressClass bool
2424}
2525
Original file line number Diff line number Diff line change @@ -31,11 +31,11 @@ type K8s struct {
3131 SecretsProcessed map [string ]struct {}
3232 BackendsProcessed map [string ]struct {}
3333 GatewayClasses map [string ]* GatewayClass
34+ HaProxyPods map [string ]struct {}
35+ BackendsWithNoConfigSnippets map [string ]struct {}
3436 GatewayControllerName string
3537 PublishServiceAddresses []string
36- HaProxyPods map [string ]struct {}
3738 UpdateAllIngresses bool
38- BackendsWithNoConfigSnippets map [string ]struct {}
3939}
4040
4141type NamespacesWatch struct {
You can’t perform that action at this time.
0 commit comments