@@ -6,70 +6,64 @@ import (
6
6
7
7
// Config is the Schema for the configs API
8
8
type Config struct {
9
- ControllerConfig `yaml :",inline"`
10
- Selector IngressSelector `yaml :"selector"`
11
- Integrations IntegrationConfigs `yaml :"integrations"`
9
+ ControllerConfig `json :",inline"`
10
+ Selector IngressSelector `json :"selector"`
11
+ Integrations IntegrationConfigs `json :"integrations"`
12
12
}
13
13
14
14
//-------------------------------------------------------------------------------------------------
15
15
16
16
// ControllerConfig provides configuration for the controller.
17
17
type ControllerConfig struct {
18
- Health HealthConfig `yaml :"health,omitempty"`
19
- LeaderElection LeaderElectionConfig `yaml :"leaderElection,omitempty"`
20
- Metrics MetricsConfig `yaml :"metrics,omitempty"`
18
+ Health HealthConfig `json :"health,omitempty"`
19
+ LeaderElection LeaderElectionConfig `json :"leaderElection,omitempty"`
20
+ Metrics MetricsConfig `json :"metrics,omitempty"`
21
21
}
22
22
23
23
// HealthConfig provides configuration for the controller health checks.
24
24
type HealthConfig struct {
25
- HealthProbeBindAddress string `yaml :"healthProbeBindAddress,omitempty"`
25
+ HealthProbeBindAddress string `json :"healthProbeBindAddress,omitempty"`
26
26
}
27
27
28
28
// LeaderElectionConfig provides configuration for the leader election.
29
29
type LeaderElectionConfig struct {
30
- LeaderElect bool `yaml :"leaderElect,omitempty"`
31
- ResourceName string `yaml :"resourceName,omitempty"`
32
- ResourceNamespace string `yaml :"resourceNamespace,omitempty"`
30
+ LeaderElect bool `json :"leaderElect,omitempty"`
31
+ ResourceName string `json :"resourceName,omitempty"`
32
+ ResourceNamespace string `json :"resourceNamespace,omitempty"`
33
33
}
34
34
35
35
// MetricsConfig provides configuration for the controller metrics.
36
36
type MetricsConfig struct {
37
- BindAddress string `yaml :"bindAddress,omitempty"`
37
+ BindAddress string `json :"bindAddress,omitempty"`
38
38
}
39
39
40
40
//-------------------------------------------------------------------------------------------------
41
41
42
42
// IngressSelector can be used to limit operations to ingresses with a specific class.
43
43
type IngressSelector struct {
44
- IngressClass * string `yaml :"ingressClass,omitempty"`
44
+ IngressClass * string `json :"ingressClass,omitempty"`
45
45
}
46
46
47
47
// IntegrationConfigs describes the configurations for all integrations.
48
48
type IntegrationConfigs struct {
49
- ExternalDNS * ExternalDNSIntegrationConfig `yaml :"externalDNS"`
50
- CertManager * CertManagerIntegrationConfig `yaml :"certManager"`
49
+ ExternalDNS * ExternalDNSIntegrationConfig `json :"externalDNS"`
50
+ CertManager * CertManagerIntegrationConfig `json :"certManager"`
51
51
}
52
52
53
53
// ExternalDNSIntegrationConfig describes the configuration for the external-dns integration.
54
54
// Exactly one of target and target IPs should be set.
55
55
type ExternalDNSIntegrationConfig struct {
56
- TargetService * ServiceRef `yaml :"targetService,omitempty"`
57
- TargetIPs []string `yaml :"targetIPs,omitempty"`
56
+ TargetService * ServiceRef `json :"targetService,omitempty"`
57
+ TargetIPs []string `json :"targetIPs,omitempty"`
58
58
}
59
59
60
60
// CertManagerIntegrationConfig describes the configuration for the cert-manager integration.
61
61
type CertManagerIntegrationConfig struct {
62
- Template v1.Certificate `yaml :"certificateTemplate"`
62
+ Template v1.Certificate `json :"certificateTemplate"`
63
63
}
64
64
65
65
// ServiceRef uniquely describes a Kubernetes service.
66
66
type ServiceRef struct {
67
- Name string `yaml:"name"`
68
- Namespace string `yaml:"namespace"`
69
- }
70
-
71
- // IssuerRef uniquely references a cert-manager issuer.
72
- type IssuerRef struct {
73
- Kind string `yaml:"kind"`
74
- Name string `yaml:"name"`
67
+ Name string `json:"name"`
68
+ Namespace string `json:"namespace"`
75
69
}
0 commit comments