@@ -6,70 +6,64 @@ import (
66
77// Config is the Schema for the configs API
88type 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"`
1212}
1313
1414//-------------------------------------------------------------------------------------------------
1515
1616// ControllerConfig provides configuration for the controller.
1717type 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"`
2121}
2222
2323// HealthConfig provides configuration for the controller health checks.
2424type HealthConfig struct {
25- HealthProbeBindAddress string `yaml :"healthProbeBindAddress,omitempty"`
25+ HealthProbeBindAddress string `json :"healthProbeBindAddress,omitempty"`
2626}
2727
2828// LeaderElectionConfig provides configuration for the leader election.
2929type 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"`
3333}
3434
3535// MetricsConfig provides configuration for the controller metrics.
3636type MetricsConfig struct {
37- BindAddress string `yaml :"bindAddress,omitempty"`
37+ BindAddress string `json :"bindAddress,omitempty"`
3838}
3939
4040//-------------------------------------------------------------------------------------------------
4141
4242// IngressSelector can be used to limit operations to ingresses with a specific class.
4343type IngressSelector struct {
44- IngressClass * string `yaml :"ingressClass,omitempty"`
44+ IngressClass * string `json :"ingressClass,omitempty"`
4545}
4646
4747// IntegrationConfigs describes the configurations for all integrations.
4848type IntegrationConfigs struct {
49- ExternalDNS * ExternalDNSIntegrationConfig `yaml :"externalDNS"`
50- CertManager * CertManagerIntegrationConfig `yaml :"certManager"`
49+ ExternalDNS * ExternalDNSIntegrationConfig `json :"externalDNS"`
50+ CertManager * CertManagerIntegrationConfig `json :"certManager"`
5151}
5252
5353// ExternalDNSIntegrationConfig describes the configuration for the external-dns integration.
5454// Exactly one of target and target IPs should be set.
5555type 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"`
5858}
5959
6060// CertManagerIntegrationConfig describes the configuration for the cert-manager integration.
6161type CertManagerIntegrationConfig struct {
62- Template v1.Certificate `yaml :"certificateTemplate"`
62+ Template v1.Certificate `json :"certificateTemplate"`
6363}
6464
6565// ServiceRef uniquely describes a Kubernetes service.
6666type 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"`
7569}
0 commit comments