Skip to content
Snippets Groups Projects
Unverified Commit cd9bc7bd authored by Manuel Gómez's avatar Manuel Gómez Committed by GitHub
Browse files

Add PostgreSQL pod name Scalyr sidecar environment (#194)

This will allow the Scalyr image to add a custom attribute to shipped
log entries that notes the name of the originating pod.
parent 15c278d4
Branches
Tags
No related merge requests found
...@@ -445,6 +445,15 @@ func (c *Cluster) generatePodTemplate( ...@@ -445,6 +445,15 @@ func (c *Cluster) generatePodTemplate(
Resources: *resourceRequirementsScalyrSidecar, Resources: *resourceRequirementsScalyrSidecar,
VolumeMounts: volumeMounts, VolumeMounts: volumeMounts,
Env: []v1.EnvVar{ Env: []v1.EnvVar{
{
Name: "POD_NAME",
ValueFrom: &v1.EnvVarSource{
FieldRef: &v1.ObjectFieldSelector{
APIVersion: "v1",
FieldPath: "metadata.name",
},
},
},
{ {
Name: "SCALYR_API_KEY", Name: "SCALYR_API_KEY",
Value: c.OpConfig.ScalyrAPIKey, Value: c.OpConfig.ScalyrAPIKey,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment