File tree Expand file tree Collapse file tree 3 files changed +34
-1
lines changed Expand file tree Collapse file tree 3 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,24 @@ func defaultDeployment(
81
81
volumes , mounts = toVolumesAndMounts (syncData .idpSecrets , volumes , mounts )
82
82
volumes , mounts = toVolumesAndMounts (syncData .tplSecrets , volumes , mounts )
83
83
84
+ volumes = append (volumes , corev1.Volume {
85
+ Name : trustedCABundleLocalName ,
86
+ VolumeSource : corev1.VolumeSource {
87
+ ConfigMap : & corev1.ConfigMapVolumeSource {
88
+ LocalObjectReference : corev1.LocalObjectReference {
89
+ Name : trustedCABundleLocalName ,
90
+ },
91
+ Items : []corev1.KeyToPath {{Key : trustedCABundleKey , Path : trustedCABundleMountFile }},
92
+ },
93
+ },
94
+ })
95
+
96
+ mounts = append (mounts , corev1.VolumeMount {
97
+ Name : trustedCABundleLocalName ,
98
+ ReadOnly : true ,
99
+ MountPath : trustedCABundleMountDir ,
100
+ })
101
+
84
102
// force redeploy when any associated resource changes
85
103
// we use a hash to prevent this value from growing indefinitely
86
104
// need to sort first in order to get a stable array
Original file line number Diff line number Diff line change @@ -62,7 +62,8 @@ const (
62
62
kasServiceAndEndpointName = "kubernetes"
63
63
kasServiceFullName = kasServiceAndEndpointName + "." + corev1 .NamespaceDefault + ".svc"
64
64
65
- rootCAFile = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
65
+ systemTrustStoreDirPath = "/etc/pki/ca-trust/extracted/pem"
66
+ rootCAFile = systemTrustStoreDirPath + "/tls-ca-bundle.pem"
66
67
67
68
systemConfigPath = "/var/config/system"
68
69
systemConfigPathConfigMaps = systemConfigPath + "/configmaps"
@@ -109,6 +110,12 @@ const (
109
110
consoleConfigMapLocalName = systemConfigPrefix + consoleConfigMapSharedName
110
111
consoleConfigKey = consoleConfigMapSharedName + ".yaml"
111
112
113
+ trustedCABundleSharedName = "trusted-ca-bundle"
114
+ trustedCABundleLocalName = systemConfigPrefix + trustedCABundleSharedName
115
+ trustedCABundleKey = "ca-bundle.crt"
116
+ trustedCABundleMountDir = systemTrustStoreDirPath
117
+ trustedCABundleMountFile = "tls-ca-bundle.pem"
118
+
112
119
ocpBrandingSecretName = systemConfigPrefix + "ocp-branding-template"
113
120
ocpBrandingSecretMount = systemConfigPathSecrets + "/" + ocpBrandingSecretName
114
121
ocpBrandingLoginPath = ocpBrandingSecretMount + "/" + configv1 .LoginTemplateKey
Original file line number Diff line number Diff line change @@ -122,6 +122,14 @@ func RunOperator(ctx *controllercmd.ControllerContext) error {
122
122
return err
123
123
}
124
124
125
+ // add syncing for the console-config ConfigMap (indirect watch for changes)
126
+ if err := resourceSyncer .SyncConfigMap (
127
+ resourcesynccontroller.ResourceLocation {Namespace : targetNamespace , Name : trustedCABundleLocalName },
128
+ resourcesynccontroller.ResourceLocation {Namespace : machineConfigNamespace , Name : trustedCABundleSharedName },
129
+ ); err != nil {
130
+ return err
131
+ }
132
+
125
133
versionGetter := status .NewVersionGetter ()
126
134
127
135
operator := NewAuthenticationOperator (
You can’t perform that action at this time.
0 commit comments