File tree Expand file tree Collapse file tree 3 files changed +5
-14
lines changed Expand file tree Collapse file tree 3 files changed +5
-14
lines changed Original file line number Diff line number Diff line change 2222 - name : CONTAINER_PLATFORM
2323 value : KUBERNETES
2424 - name : AGENT_CONFIG_PATH
25+ value : /etc/agent-config/agent_config
2526 - name : NOOBAA_LOG_LEVEL
2627 - name : NOOBAA_LOG_COLOR
2728 command : ["/noobaa_init_files/noobaa_init.sh", "agent"]
3536 - name : tmp-logs-vol
3637 mountPath : /usr/local/noobaa/logs
3738 - name : agent-config-secret
38- mountPath : AGENT_CONFIG_MOUNT_PATH
39+ mountPath : /etc/agent-config
3940 readOnly : true
4041 securityContext :
4142 runAsNonRoot : true
Original file line number Diff line number Diff line change @@ -32,8 +32,6 @@ import (
3232 "sigs.k8s.io/controller-runtime/pkg/reconcile"
3333)
3434
35- const agentConfigSecretMountPath string = "/etc/agent-config"
36-
3735// ModeInfo holds local information for a backing store mode.
3836type ModeInfo struct {
3937 Phase nbv1.BackingStorePhase
@@ -1289,8 +1287,6 @@ func (r *Reconciler) updatePodTemplate() error {
12891287 c := & r .PodAgentTemplate .Spec .Containers [0 ]
12901288 for j := range c .Env {
12911289 switch c .Env [j ].Name {
1292- case "AGENT_CONFIG_PATH" :
1293- c .Env [j ].Value = agentConfigSecretMountPath + "/agent_config"
12941290 case "NOOBAA_LOG_LEVEL" :
12951291 c .Env [j ].Value = r .CoreAppConfig .Data ["NOOBAA_LOG_LEVEL" ]
12961292 case "NOOBAA_LOG_COLOR" :
@@ -1350,13 +1346,6 @@ func (r *Reconciler) updatePodTemplate() error {
13501346 r .PodAgentTemplate .Spec .TopologySpreadConstraints = []corev1.TopologySpreadConstraint {topologySpreadConstraint }
13511347 }
13521348
1353- // replace AGENT_CONFIG_MOUNT_PATH with actual mount path
1354- for i := range r .PodAgentTemplate .Spec .Containers [0 ].VolumeMounts {
1355- if r .PodAgentTemplate .Spec .Containers [0 ].VolumeMounts [i ].MountPath == "AGENT_CONFIG_MOUNT_PATH" {
1356- r .PodAgentTemplate .Spec .Containers [0 ].VolumeMounts [i ].MountPath = agentConfigSecretMountPath
1357- }
1358- }
1359-
13601349 // replace AGENT_CONFIG_SECRET_NAME with actual secret name
13611350 for i := range r .PodAgentTemplate .Spec .Volumes {
13621351 if r .PodAgentTemplate .Spec .Volumes [i ].Secret != nil && r .PodAgentTemplate .Spec .Volumes [i ].Secret .SecretName == "AGENT_CONFIG_SECRET_NAME" {
Original file line number Diff line number Diff line change @@ -4477,7 +4477,7 @@ spec:
44774477 storage: 30Gi
44784478`
44794479
4480- const Sha256_deploy_internal_pod_agent_yaml = "7f6eef302f0a07ca766cef61693db9d1f66f4f7aabe4d8d01a84cfa9176b12ad "
4480+ const Sha256_deploy_internal_pod_agent_yaml = "74237f435120c893cd8e349e9ac685dd1c884e121c018f46e48228f845a51093 "
44814481
44824482const File_deploy_internal_pod_agent_yaml = `apiVersion: v1
44834483kind: Pod
@@ -4503,6 +4503,7 @@ spec:
45034503 - name: CONTAINER_PLATFORM
45044504 value: KUBERNETES
45054505 - name: AGENT_CONFIG_PATH
4506+ value: /etc/agent-config/agent_config
45064507 - name: NOOBAA_LOG_LEVEL
45074508 - name: NOOBAA_LOG_COLOR
45084509 command: ["/noobaa_init_files/noobaa_init.sh", "agent"]
@@ -4516,7 +4517,7 @@ spec:
45164517 - name: tmp-logs-vol
45174518 mountPath: /usr/local/noobaa/logs
45184519 - name: agent-config-secret
4519- mountPath: AGENT_CONFIG_MOUNT_PATH
4520+ mountPath: /etc/agent-config
45204521 readOnly: true
45214522 securityContext:
45224523 runAsNonRoot: true
You can’t perform that action at this time.
0 commit comments