Skip to content

Commit

Permalink
Merge pull request #1893 from rksharma95/fix-bug-1866
Browse files Browse the repository at this point in the history
fix(operator): update relay env vars with initial config
  • Loading branch information
daemon1024 authored Nov 28, 2024
2 parents a86f306 + e420327 commit bf5d5df
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 bf5d5df

Please sign in to comment.