Skip to content

Commit e420327

Browse files
committed
update relay env vars with initial config
Signed-off-by: rksharma95 <[email protected]>
1 parent a86f306 commit e420327

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

pkg/KubeArmorOperator/internal/controller/resources.go

+16
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,22 @@ func (clusterWatcher *ClusterWatcher) WatchRequiredResources() {
534534
controller := deployments.GetKubeArmorControllerDeployment(common.Namespace)
535535
relayServer := deployments.GetRelayDeployment(common.Namespace)
536536

537+
// update relay env vars
538+
relayServer.Spec.Template.Spec.Containers[0].Env = []corev1.EnvVar{
539+
{
540+
Name: "ENABLE_STDOUT_LOGS",
541+
Value: common.KubearmorRelayEnvMap[common.EnableStdOutLogs],
542+
},
543+
{
544+
Name: "ENABLE_STDOUT_ALERTS",
545+
Value: common.KubearmorRelayEnvMap[common.EnableStdOutAlerts],
546+
},
547+
{
548+
Name: "ENABLE_STDOUT_MSGS",
549+
Value: common.KubearmorRelayEnvMap[common.EnableStdOutMsgs],
550+
},
551+
}
552+
537553
if common.EnableTls {
538554
relayServer.Spec.Template.Spec.Containers[0].VolumeMounts =
539555
append(relayServer.Spec.Template.Spec.Containers[0].VolumeMounts, common.KubeArmorRelayTlsVolumeMount...)

0 commit comments

Comments
 (0)