Skip to content

Commit f298637

Browse files
committed
inject TLS config to all the CCM operands
1 parent 7ef2307 commit f298637

12 files changed

Lines changed: 61 additions & 1 deletion

File tree

pkg/cloud/aws/assets/deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ spec:
4343
--leader-elect-renew-deadline=107s \
4444
--leader-elect-retry-period=26s \
4545
--leader-elect-resource-namespace=openshift-cloud-controller-manager \
46+
{{- if .tlsCipherSuites }}
47+
--tls-cipher-suites={{ .tlsCipherSuites }} \
48+
{{- end }}
49+
{{- if .tlsMinVersion }}
50+
--tls-min-version={{ .tlsMinVersion }} \
51+
{{- end }}
4652
--secure-port=0 \
4753
-v=2
4854
env:

pkg/cloud/aws/aws.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ type imagesReference struct {
3333
var templateValuesValidationMap = map[string]interface{}{
3434
"images": "required",
3535
"cloudproviderName": "required,type(string)",
36+
"tlsCipherSuites": "type(string)",
37+
"tlsMinVersion": "type(string)",
3638
}
3739

3840
type awsAssets struct {
@@ -48,6 +50,8 @@ func getTemplateValues(images *imagesReference, operatorConfig config.OperatorCo
4850
values := common.TemplateValues{
4951
"images": images,
5052
"cloudproviderName": operatorConfig.GetPlatformNameString(),
53+
"tlsCipherSuites": operatorConfig.TLSCipherSuites,
54+
"tlsMinVersion": operatorConfig.TLSMinVersion,
5155
}
5256
_, err := govalidator.ValidateMap(values, templateValuesValidationMap)
5357
if err != nil {

pkg/cloud/azure/assets/cloud-controller-manager-deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@ spec:
122122
--leader-elect-renew-deadline=107s \
123123
--leader-elect-retry-period=26s \
124124
--leader-elect-resource-namespace=openshift-cloud-controller-manager \
125+
{{- if .tlsCipherSuites }}
126+
--tls-cipher-suites={{ .tlsCipherSuites }} \
127+
{{- end }}
128+
{{- if .tlsMinVersion }}
129+
--tls-min-version={{ .tlsMinVersion }} \
130+
{{- end }}
125131
--secure-port=0
126132
terminationMessagePolicy: FallbackToLogsOnError
127133
volumeMounts:

pkg/cloud/azure/azure.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ var templateValuesValidationMap = map[string]interface{}{
7171
"images": "required",
7272
"infrastructureName": "required,type(string)",
7373
"cloudproviderName": "required,notnull,type(string)",
74+
"tlsCipherSuites": "type(string)",
75+
"tlsMinVersion": "type(string)",
7476
}
7577

7678
type azureAssets struct {
@@ -87,6 +89,8 @@ func getTemplateValues(images *imagesReference, operatorConfig config.OperatorCo
8789
"images": images,
8890
"infrastructureName": operatorConfig.InfrastructureName,
8991
"cloudproviderName": operatorConfig.GetPlatformNameString(),
92+
"tlsCipherSuites": operatorConfig.TLSCipherSuites,
93+
"tlsMinVersion": operatorConfig.TLSMinVersion,
9094
}
9195
_, err := govalidator.ValidateMap(values, templateValuesValidationMap)
9296
if err != nil {

pkg/cloud/azurestack/assets/cloud-controller-manager-deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ spec:
114114
--leader-elect-renew-deadline=107s \
115115
--leader-elect-retry-period=26s \
116116
--leader-elect-resource-namespace=openshift-cloud-controller-manager \
117+
{{- if .tlsCipherSuites }}
118+
--tls-cipher-suites={{ .tlsCipherSuites }} \
119+
{{- end }}
120+
{{- if .tlsMinVersion }}
121+
--tls-min-version={{ .tlsMinVersion }} \
122+
{{- end }}
117123
--secure-port=0
118124
terminationMessagePolicy: FallbackToLogsOnError
119125
volumeMounts:

pkg/cloud/azurestack/azurestack.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ var templateValuesValidationMap = map[string]interface{}{
4141
"images": "required",
4242
"infrastructureName": "required,type(string)",
4343
"cloudproviderName": "required,type(string)",
44+
"tlsCipherSuites": "type(string)",
45+
"tlsMinVersion": "type(string)",
4446
}
4547

4648
type azurestackAssets struct {
@@ -57,6 +59,8 @@ func getTemplateValues(images imagesReference, operatorConfig config.OperatorCon
5759
"images": images,
5860
"infrastructureName": operatorConfig.InfrastructureName,
5961
"cloudproviderName": operatorConfig.GetPlatformNameString(),
62+
"tlsCipherSuites": operatorConfig.TLSCipherSuites,
63+
"tlsMinVersion": operatorConfig.TLSMinVersion,
6064
}
6165
_, err := govalidator.ValidateMap(values, templateValuesValidationMap)
6266
if err != nil {

pkg/cloud/gcp/assets/cloud-controller-manager.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ spec:
9696
--leader-elect-renew-deadline=107s \
9797
--leader-elect-retry-period=26s \
9898
--leader-elect-resource-namespace=openshift-cloud-controller-manager \
99+
{{- if .tlsCipherSuites }}
100+
--tls-cipher-suites={{ .tlsCipherSuites }} \
101+
{{- end }}
102+
{{- if .tlsMinVersion }}
103+
--tls-min-version={{ .tlsMinVersion }} \
104+
{{- end }}
99105
--secure-port=0
100106
terminationMessagePolicy: FallbackToLogsOnError
101107
volumeMounts:

pkg/cloud/gcp/gcp.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ var templateValuesValidationMap = map[string]interface{}{
3636
"images": "required",
3737
"infrastructureName": "required,type(string)",
3838
"cloudproviderName": "required,type(string)",
39+
"tlsCipherSuites": "type(string)",
40+
"tlsMinVersion": "type(string)",
3941
}
4042

4143
type GCPAssets struct {
@@ -52,6 +54,8 @@ func getTemplateValues(images *imagesReference, operatorConfig config.OperatorCo
5254
"images": images,
5355
"infrastructureName": operatorConfig.InfrastructureName,
5456
"cloudproviderName": operatorConfig.GetPlatformNameString(),
57+
"tlsCipherSuites": operatorConfig.TLSCipherSuites,
58+
"tlsMinVersion": operatorConfig.TLSMinVersion,
5559
}
5660
_, err := govalidator.ValidateMap(values, templateValuesValidationMap)
5761
if err != nil {

pkg/cloud/openstack/assets/deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ spec:
7979
--leader-elect-retry-period=26s \
8080
--leader-elect-resource-namespace=openshift-cloud-controller-manager \
8181
--feature-gates={{ .featureGates }} \
82+
{{- if .tlsCipherSuites }}
83+
--tls-cipher-suites={{ .tlsCipherSuites }} \
84+
{{- end }}
85+
{{- if .tlsMinVersion }}
86+
--tls-min-version={{ .tlsMinVersion }} \
87+
{{- end }}
8288
--secure-port=0
8389
ports:
8490
- containerPort: 10258

pkg/cloud/openstack/openstack.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ var templateValuesValidationMap = map[string]interface{}{
3737
"cloudproviderName": "required,type(string)",
3838
"featureGates": "type(string)",
3939
"infrastructureName": "required,type(string)",
40+
"tlsCipherSuites": "type(string)",
41+
"tlsMinVersion": "type(string)",
4042
}
4143

4244
type openstackAssets struct {
@@ -54,6 +56,8 @@ func getTemplateValues(images *imagesReference, operatorConfig config.OperatorCo
5456
"cloudproviderName": operatorConfig.GetPlatformNameString(),
5557
"featureGates": operatorConfig.FeatureGates,
5658
"infrastructureName": operatorConfig.InfrastructureName,
59+
"tlsCipherSuites": operatorConfig.TLSCipherSuites,
60+
"tlsMinVersion": operatorConfig.TLSMinVersion,
5761
}
5862
_, err := govalidator.ValidateMap(values, templateValuesValidationMap)
5963
if err != nil {

0 commit comments

Comments
 (0)