Skip to content

Commit

Permalink
update relay env vars with initial config
Browse files Browse the repository at this point in the history
Signed-off-by: rksharma95 <[email protected]>
  • Loading branch information
rksharma95 committed Nov 26, 2024
1 parent a86f306 commit e420327
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pkg/KubeArmorOperator/internal/controller/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,22 @@ func (clusterWatcher *ClusterWatcher) WatchRequiredResources() {
controller := deployments.GetKubeArmorControllerDeployment(common.Namespace)
relayServer := deployments.GetRelayDeployment(common.Namespace)

// update relay env vars
relayServer.Spec.Template.Spec.Containers[0].Env = []corev1.EnvVar{
{
Name: "ENABLE_STDOUT_LOGS",
Value: common.KubearmorRelayEnvMap[common.EnableStdOutLogs],
},
{
Name: "ENABLE_STDOUT_ALERTS",
Value: common.KubearmorRelayEnvMap[common.EnableStdOutAlerts],
},
{
Name: "ENABLE_STDOUT_MSGS",
Value: common.KubearmorRelayEnvMap[common.EnableStdOutMsgs],
},
}

if common.EnableTls {
relayServer.Spec.Template.Spec.Containers[0].VolumeMounts =
append(relayServer.Spec.Template.Spec.Containers[0].VolumeMounts, common.KubeArmorRelayTlsVolumeMount...)
Expand Down

0 comments on commit e420327

Please sign in to comment.