@@ -58,9 +58,10 @@ type volumeConfig struct {
5858 name string
5959 readOnly bool
6060 path string
61- // isSecret or isConfigMap are mutually exclusive
61+ // isSecret, isConfigMap, and isEmptyDir are mutually exclusive
6262 isSecret bool
6363 isConfigMap bool
64+ isEmptyDir bool
6465 mappedKeys map [string ]string
6566}
6667
@@ -87,7 +88,6 @@ func DefaultDeployment(
8788 withStrategy (deployment , infrastructureConfig )
8889 withConsoleAnnotations (
8990 deployment ,
90- consoleConfigMap ,
9191 serviceCAConfigMap ,
9292 authnCATrustConfigMap ,
9393 trustedCAConfigMap ,
@@ -194,7 +194,6 @@ func withStrategy(deployment *appsv1.Deployment, infrastructureConfig *configv1.
194194// version changes.
195195func withConsoleAnnotations (
196196 deployment * appsv1.Deployment ,
197- consoleConfigMap * corev1.ConfigMap ,
198197 serviceCAConfigMap * corev1.ConfigMap ,
199198 authServerCAConfigMap * corev1.ConfigMap ,
200199 trustedCAConfigMap * corev1.ConfigMap ,
@@ -203,8 +202,9 @@ func withConsoleAnnotations(
203202 proxyConfig * configv1.Proxy ,
204203 infrastructureConfig * configv1.Infrastructure ,
205204) {
205+ // Avoid rolling out when the console-config configmap is updated.
206+ // Console now watches the configmap for changes without needing to redeploy.
206207 deployment .ObjectMeta .Annotations = map [string ]string {
207- configMapResourceVersionAnnotation : consoleConfigMap .GetResourceVersion (),
208208 serviceCAConfigMapResourceVersionAnnotation : serviceCAConfigMap .GetResourceVersion (),
209209 trustedCAConfigMapResourceVersionAnnotation : trustedCAConfigMap .GetResourceVersion (),
210210 proxyConfigResourceVersionAnnotation : proxyConfig .GetResourceVersion (),
@@ -304,6 +304,16 @@ func withConsoleVolumes(
304304 },
305305 }
306306 }
307+ if item .isEmptyDir {
308+ vols [i ] = corev1.Volume {
309+ Name : item .name ,
310+ VolumeSource : corev1.VolumeSource {
311+ EmptyDir : & corev1.EmptyDirVolumeSource {
312+ Medium : corev1 .StorageMediumMemory ,
313+ },
314+ },
315+ }
316+ }
307317 }
308318 deployment .Spec .Template .Spec .Volumes = vols
309319}
@@ -519,6 +529,12 @@ func defaultVolumeConfig() []volumeConfig {
519529 path : "/var/service-ca" ,
520530 isConfigMap : true ,
521531 },
532+ {
533+ name : api .SessionStorageVolumeName ,
534+ readOnly : false ,
535+ path : "/var/sessions" ,
536+ isEmptyDir : true ,
537+ },
522538 }
523539}
524540
0 commit comments