Skip to content

Commit

Permalink
fix host_ip env
Browse files Browse the repository at this point in the history
Signed-off-by: Thibault Mange <[email protected]>
  • Loading branch information
thibaultmg committed Jun 3, 2024
1 parent ffd6fab commit 75fbf57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -409,16 +409,6 @@ func createManifestWorks(
Value: "true",
})

// Add host ip env for endpoint operator. It is needed for microshift to scrape host processes metrics
spec.Containers[0].Env = append(spec.Containers[0].Env, corev1.EnvVar{
Name: "HOST_IP",
ValueFrom: &corev1.EnvVarSource{
FieldRef: &corev1.ObjectFieldSelector{
FieldPath: "status.hostIP",
},
},
})

dep.ObjectMeta.Name = config.HubEndpointOperatorName
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ spec:
value: "false"
- name: PULL_SECRET
value: "REPLACE_WITH_IMAGEPULLSECRET"
- name: HOST_IP # Needed for microshift
valueFrom:
fieldRef:
fieldPath: status.hostIP
volumeMounts:
- name: hub-kubeconfig-secret
mountPath: "/spoke/hub-kubeconfig"
Expand Down

0 comments on commit 75fbf57

Please sign in to comment.