@@ -796,9 +796,41 @@ func operatorResources(namespace string, m TemplateMaps) []runtime.Object {
796
796
},
797
797
},
798
798
},
799
-
800
- // Deployment
801
799
operatorDeployment (namespace , m ),
800
+ operatorServingCertConfigMap (namespace ),
801
+ }
802
+ }
803
+
804
+ func operatorServingCertConfigMap (namespace string ) * corev1.ConfigMap {
805
+ return & corev1.ConfigMap {
806
+ TypeMeta : metav1.TypeMeta {
807
+ APIVersion : "v1" ,
808
+ Kind : "ConfigMap" ,
809
+ },
810
+ ObjectMeta : metav1.ObjectMeta {
811
+ Name : "thanos-operator-serving-cert" ,
812
+ Namespace : namespace ,
813
+ Labels : map [string ]string {
814
+ "app.kubernetes.io/component" : "manager" ,
815
+ "app.kubernetes.io/created-by" : "thanos-operator" ,
816
+ "app.kubernetes.io/instance" : "controller-manager" ,
817
+ "app.kubernetes.io/managed-by" : "rhobs" ,
818
+ "app.kubernetes.io/name" : "configmap" ,
819
+ "app.kubernetes.io/part-of" : "thanos-operator" ,
820
+ },
821
+ Annotations : map [string ]string {
822
+ "service.beta.openshift.io/inject-cabundle" : "true" ,
823
+ },
824
+ },
825
+ Data : map [string ]string {
826
+ "config.yaml" : `"authorization":
827
+ "static":
828
+ - "path": "/metrics"
829
+ "resourceRequest": false
830
+ "user":
831
+ "name": "system:serviceaccount:openshift-customer-monitoring:prometheus-k8s"
832
+ "verb": "get"` ,
833
+ },
802
834
}
803
835
}
804
836
@@ -860,13 +892,20 @@ func operatorDeployment(namespace string, m TemplateMaps) *appsv1.Deployment {
860
892
"--v=4" ,
861
893
"--tls-cert-file=/etc/tls/private/tls.crt" ,
862
894
"--tls-private-key-file=/etc/tls/private/tls.key" ,
895
+ "--client-ca-file=/etc/service-ca/service-ca.crt" ,
896
+ "--config-file=/etc/service-ca/config.yaml" ,
863
897
},
864
898
VolumeMounts : []corev1.VolumeMount {
865
899
{
866
900
Name : "tls" ,
867
901
MountPath : "/etc/tls/private" ,
868
902
ReadOnly : true ,
869
903
},
904
+ {
905
+ Name : "service-ca" ,
906
+ MountPath : "/etc/service-ca" ,
907
+ ReadOnly : true ,
908
+ },
870
909
},
871
910
Ports : []corev1.ContainerPort {
872
911
{
@@ -943,6 +982,18 @@ func operatorDeployment(namespace string, m TemplateMaps) *appsv1.Deployment {
943
982
},
944
983
},
945
984
},
985
+ {
986
+ Name : "service-ca" ,
987
+ VolumeSource : corev1.VolumeSource {
988
+ ConfigMap : & corev1.ConfigMapVolumeSource {
989
+ LocalObjectReference : corev1.LocalObjectReference {
990
+ Name : "openshift-service-ca.crt" ,
991
+ },
992
+ DefaultMode : ptr .To (int32 (420 )),
993
+ Optional : ptr .To (false ),
994
+ },
995
+ },
996
+ },
946
997
},
947
998
ServiceAccountName : "thanos-operator-controller-manager" ,
948
999
TerminationGracePeriodSeconds : ptr .To (int64 (10 )),
0 commit comments