File tree 4 files changed +36
-3
lines changed
4 files changed +36
-3
lines changed Original file line number Diff line number Diff line change
1
+
2
+ apiVersion : config.jobset.x-k8s.io/v1alpha1
3
+ kind : Configuration
4
+ leaderElection :
5
+ leaderElect : true
Original file line number Diff line number Diff line change 1
1
resources :
2
2
- manager.yaml
3
3
4
+ generatorOptions :
5
+ disableNameSuffixHash : true
6
+
7
+ configMapGenerator :
8
+ - files :
9
+ - controller_manager_config.yaml
10
+ name : manager-config
11
+
4
12
apiVersion : kustomize.config.k8s.io/v1beta1
5
13
kind : Kustomization
6
14
images :
Original file line number Diff line number Diff line change 9
9
containers :
10
10
- name : manager
11
11
args :
12
+ - " --config=/controller_manager_config.yaml"
12
13
- " --zap-log-level=2"
13
- - " --health-probe-bind-address=:8081"
14
- - " --metrics-bind-address=:8443"
15
- - " --leader-elect"
14
+ volumeMounts :
15
+ - name : manager-config
16
+ mountPath : /controller_manager_config.yaml
17
+ subPath : controller_manager_config.yaml
18
+ volumes :
19
+ - name : manager-config
20
+ configMap :
21
+ name : manager-config
Original file line number Diff line number Diff line change @@ -116,18 +116,32 @@ func main() {
116
116
117
117
if flagsSet ["metrics-bind-address" ] {
118
118
options .Metrics .BindAddress = metricsAddr
119
+ } else {
120
+ options .Metrics .BindAddress = cfg .Metrics .BindAddress
119
121
}
122
+
120
123
if flagsSet ["health-probe-bind-address" ] {
121
124
options .HealthProbeBindAddress = probeAddr
125
+ } else {
126
+ options .HealthProbeBindAddress = cfg .Health .HealthProbeBindAddress
122
127
}
128
+
123
129
if flagsSet ["leader-elect" ] {
124
130
options .LeaderElection = enableLeaderElection
131
+ } else {
132
+ options .LeaderElection = * cfg .LeaderElection .LeaderElect
125
133
}
134
+
126
135
if flagsSet ["kube-api-qps" ] {
127
136
kubeConfig .QPS = float32 (qps )
137
+ } else {
138
+ kubeConfig .QPS = * cfg .ClientConnection .QPS
128
139
}
140
+
129
141
if flagsSet ["kube-api-burst" ] {
130
142
kubeConfig .Burst = burst
143
+ } else {
144
+ kubeConfig .Burst = int (* cfg .ClientConnection .Burst )
131
145
}
132
146
// Metrics endpoint is enabled in 'config/default/kustomization.yaml'. The Metrics options configure the server.
133
147
// More info:
You can’t perform that action at this time.
0 commit comments