mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 16:27:28 +02:00
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.
This commit is contained in:
@@ -445,6 +445,15 @@ func (c *Cluster) generatePodTemplate(
|
||||
Resources: *resourceRequirementsScalyrSidecar,
|
||||
VolumeMounts: volumeMounts,
|
||||
Env: []v1.EnvVar{
|
||||
{
|
||||
Name: "POD_NAME",
|
||||
ValueFrom: &v1.EnvVarSource{
|
||||
FieldRef: &v1.ObjectFieldSelector{
|
||||
APIVersion: "v1",
|
||||
FieldPath: "metadata.name",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "SCALYR_API_KEY",
|
||||
Value: c.OpConfig.ScalyrAPIKey,
|
||||
|
||||
Reference in New Issue
Block a user