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 (
28
28
)
29
29
30
30
type CfgSnippet struct {
31
+ ingress * store.Ingress
32
+ service * store.Service
31
33
name string
32
34
frontend string
33
35
backend string
34
- ingress * store.Ingress
35
- service * store.Service
36
36
}
37
37
38
38
type cfgData struct {
39
+ status store.Status
39
40
value []string
40
41
updated []string
41
42
disabled bool
42
- status store.Status
43
43
}
44
44
45
45
// CfgSnippetType represents type of a config snippet
@@ -82,10 +82,10 @@ func InitCfgSnippet() {
82
82
}
83
83
84
84
type ConfigSnippetOptions struct {
85
- Name string
86
85
Backend * string
87
86
Frontend * string
88
87
Ingress * store.Ingress
88
+ Name string
89
89
}
90
90
91
91
// 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 (
43
43
)
44
44
45
45
type Builder struct {
46
+ store store.K8s
46
47
annotations annotations.Annotations
47
48
haproxyClient api.HAProxyClient
48
49
gatewayManager gateway.GatewayManager
49
50
haproxyProcess process.Process
50
51
haproxyRules rules.Rules
51
52
restClientSet client.Client
53
+ updateStatusManager status.UpdateStatusManager
52
54
updatePublishServiceFunc func (ingresses []* ingress.Ingress , publishServiceAddresses []string )
53
55
eventChan chan k8s.SyncDataEvent
54
56
clientSet * kubernetes.Clientset
55
- haproxyEnv env.Env
56
57
haproxyCfgFile []byte
57
- store store. K8s
58
+ haproxyEnv env. Env
58
59
osArgs utils.OSArgs
59
- updateStatusManager status.UpdateStatusManager
60
60
}
61
61
62
62
var defaultEnv = env.Env {
Original file line number Diff line number Diff line change @@ -40,21 +40,21 @@ var logger = utils.GetLogger()
40
40
41
41
// HAProxyController is ingress controller
42
42
type HAProxyController struct {
43
+ store store.K8s
43
44
gatewayManager gateway.GatewayManager
44
45
annotations annotations.Annotations
46
+ updateStatusManager status.UpdateStatusManager
45
47
eventChan chan k8s.SyncDataEvent
46
48
updatePublishServiceFunc func (ingresses []* ingress.Ingress , publishServiceAddresses []string )
47
49
chShutdown chan struct {}
48
50
podNamespace string
49
51
podPrefix string
50
- haproxy haproxy.HAProxy
51
52
updateHandlers []UpdateHandler
52
- store store.K8s
53
+ beforeUpdateHandlers []UpdateHandler
54
+ haproxy haproxy.HAProxy
53
55
osArgs utils.OSArgs
54
56
auxCfgModTime int64
55
57
ready bool
56
- updateStatusManager status.UpdateStatusManager
57
- beforeUpdateHandlers []UpdateHandler
58
58
}
59
59
60
60
// Wrapping a Native-Client transaction and commit it.
Original file line number Diff line number Diff line change @@ -21,12 +21,12 @@ const (
21
21
type Quic struct {
22
22
AddrIPv4 string
23
23
AddrIPv6 string
24
- IPv4 bool
25
- IPv6 bool
26
24
CertDir string
27
- QuicAnnouncePort int64
28
25
MaxAge string
26
+ QuicAnnouncePort int64
29
27
QuicBindPort int64
28
+ IPv4 bool
29
+ IPv6 bool
30
30
}
31
31
32
32
func (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 {
19
19
BackendName string
20
20
ServerName string
21
21
IP string
22
- Port int
23
22
State string
23
+ Port int
24
24
}
25
25
26
26
func (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 {
42
42
}
43
43
44
44
type configurationManagerImpl struct {
45
- reload , restart bool
46
45
logger utils.Logger
46
+ reload , restart bool
47
47
}
48
48
49
49
func NewConfigurationManager () * configurationManagerImpl {
Original file line number Diff line number Diff line change @@ -76,13 +76,13 @@ type k8s struct {
76
76
apiExtensionsClient * crdclientset.Clientset
77
77
publishSvc * utils.NamespaceValue
78
78
gatewayClient * gatewayclientset.Clientset
79
+ crdClient * crdclientset.Clientset
79
80
podPrefix string
80
81
podNamespace string
81
82
whiteListedNS []string
82
83
syncPeriod time.Duration
83
84
cacheResyncPeriod time.Duration
84
85
disableSvcExternalName bool // CVE-2021-25740
85
- crdClient * crdclientset.Clientset
86
86
gatewayAPIInstalled bool
87
87
}
88
88
Original file line number Diff line number Diff line change @@ -35,17 +35,17 @@ var logger = utils.GetLogger()
35
35
const cookieKey = "ohph7OoGhong"
36
36
37
37
type 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
42
45
annotations []map [string ]string
43
46
modeTCP bool
44
47
newBackend bool
45
48
standalone bool
46
- // ingressName string
47
- // ingressNamespace string
48
- ingress * store.Ingress
49
49
}
50
50
51
51
// 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 {
17
17
}
18
18
19
19
type UpdateStatusManagerImpl struct {
20
- updateIngresses []* ingress.Ingress
21
20
client * kubernetes.Clientset
22
21
ingressClass string
22
+ updateIngresses []* ingress.Ingress
23
23
emptyIngressClass bool
24
24
}
25
25
Original file line number Diff line number Diff line change @@ -31,11 +31,11 @@ type K8s struct {
31
31
SecretsProcessed map [string ]struct {}
32
32
BackendsProcessed map [string ]struct {}
33
33
GatewayClasses map [string ]* GatewayClass
34
+ HaProxyPods map [string ]struct {}
35
+ BackendsWithNoConfigSnippets map [string ]struct {}
34
36
GatewayControllerName string
35
37
PublishServiceAddresses []string
36
- HaProxyPods map [string ]struct {}
37
38
UpdateAllIngresses bool
38
- BackendsWithNoConfigSnippets map [string ]struct {}
39
39
}
40
40
41
41
type NamespacesWatch struct {
You can’t perform that action at this time.
0 commit comments