Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
postgres-operator
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
zalando
postgres-operator
Commits
3de4fe87
Commit
3de4fe87
authored
Jan 11, 2019
by
erthalion
Browse files
Options
Downloads
Patches
Plain Diff
WIP: pass metrics env to spilo image
parent
c70905ae
Branches
feature/metrics-env
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pkg/cluster/k8sres.go
+25
-0
25 additions, 0 deletions
pkg/cluster/k8sres.go
with
25 additions
and
0 deletions
pkg/cluster/k8sres.go
+
25
−
0
View file @
3de4fe87
...
@@ -558,6 +558,31 @@ func (c *Cluster) generateSpiloPodEnvVars(uid types.UID, spiloConfiguration stri
...
@@ -558,6 +558,31 @@ func (c *Cluster) generateSpiloPodEnvVars(uid types.UID, spiloConfiguration stri
envVars
=
append
(
envVars
,
c
.
generateCloneEnvironment
(
cloneDescription
)
...
)
envVars
=
append
(
envVars
,
c
.
generateCloneEnvironment
(
cloneDescription
)
...
)
}
}
if
c
.
OpConfig
.
MetricsHost
!=
""
{
envVars
=
append
(
envVars
,
[]
v1
.
EnvVar
{
{
Name
:
"METRICS_HOST"
,
Value
:
c
.
OpConfig
.
MetricHostName
,
},
{
Name
:
"METRICS_USER"
,
Value
:
c
.
OpConfig
.
MetricUserName
,
},
{
Name
:
"METRICS_PASSWORD"
,
ValueFrom
:
&
v1
.
EnvVarSource
{
SecretKeyRef
:
&
v1
.
SecretKeySelector
{
LocalObjectReference
:
v1
.
LocalObjectReference
{
Name
:
c
.
credentialSecretName
(
c
.
OpConfig
.
MetricUserName
),
},
Key
:
"password"
,
},
},
},
})
}
if
len
(
customPodEnvVarsList
)
>
0
{
if
len
(
customPodEnvVarsList
)
>
0
{
envVars
=
append
(
envVars
,
customPodEnvVarsList
...
)
envVars
=
append
(
envVars
,
customPodEnvVarsList
...
)
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment