Set the kubelet dir environment variable in the spod deployment for all relevant containers
@@ -190,6 +190,12 @@ var Manifest = &appsv1.DaemonSet{
corev1.ResourceEphemeralStorage: resource.MustParse("50Mi"),
},
},
+ Env: []corev1.EnvVar{
+ {
+ Name: config.KubeletDirEnvKey,
+ Value: config.KubeletDir(),
+ },
+ },
},
{
Name: SelinuxPoliciesCopierContainerName,
@@ -266,6 +272,12 @@ semodule -i /opt/spo-profiles/selinuxrecording.cil
corev1.ResourceEphemeralStorage: resource.MustParse("50Mi"),
},
},
+ Env: []corev1.EnvVar{
+ {
+ Name: config.KubeletDirEnvKey,
+ Value: config.KubeletDir(),
+ },
+ },
},
},
Containers: []corev1.Container{
@@ -345,6 +357,10 @@ semodule -i /opt/spo-profiles/selinuxrecording.cil
Name: config.SPOdNameEnvKey,
Value: config.SPOdName,
},
+ {
+ Name: config.KubeletDirEnvKey,
+ Value: config.KubeletDir(),
+ },
},
Ports: []corev1.ContainerPort{
{
@@ -432,6 +448,12 @@ semodule -i /opt/spo-profiles/selinuxrecording.cil
corev1.ResourceEphemeralStorage: resource.MustParse("400Mi"),
},
},
+ Env: []corev1.EnvVar{
+ {
+ Name: config.KubeletDirEnvKey,
+ Value: config.KubeletDir(),
+ },
+ },
},
{
Name: LogEnricherContainerName,
@@ -483,6 +505,10 @@ semodule -i /opt/spo-profiles/selinuxrecording.cil
},
},
},
+ {
+ Name: config.KubeletDirEnvKey,
+ Value: config.KubeletDir(),
+ },
},
},
{
@@ -538,6 +564,10 @@ semodule -i /opt/spo-profiles/selinuxrecording.cil
},
},
},
+ {
+ Name: config.KubeletDirEnvKey,
+ Value: config.KubeletDir(),
+ },
},
},
{
