mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-21 11:48:53 +00:00
remove unnecessary local variable
This commit is contained in:
parent
83e13b2098
commit
e4794d36d0
2 changed files with 2 additions and 12 deletions
pkg
|
@ -361,11 +361,6 @@ func makeStatefulSetSpec(a *monitoringv1.Alertmanager, config Config) (*appsv1.S
|
|||
}, ports...)
|
||||
}
|
||||
|
||||
var securityContext *v1.PodSecurityContext = nil
|
||||
if a.Spec.SecurityContext != nil {
|
||||
securityContext = a.Spec.SecurityContext
|
||||
}
|
||||
|
||||
// Adjust Alertmanager command line args to specified AM version
|
||||
//
|
||||
// Alertmanager versions < v0.15.0 are only supported on a best effort basis
|
||||
|
@ -540,7 +535,7 @@ func makeStatefulSetSpec(a *monitoringv1.Alertmanager, config Config) (*appsv1.S
|
|||
}, a.Spec.Containers...),
|
||||
Volumes: volumes,
|
||||
ServiceAccountName: a.Spec.ServiceAccountName,
|
||||
SecurityContext: securityContext,
|
||||
SecurityContext: a.Spec.SecurityContext,
|
||||
Tolerations: a.Spec.Tolerations,
|
||||
Affinity: a.Spec.Affinity,
|
||||
},
|
||||
|
|
|
@ -443,11 +443,6 @@ func makeStatefulSetSpec(p monitoringv1.Prometheus, c *Config, ruleConfigMapName
|
|||
}
|
||||
}
|
||||
|
||||
var securityContext *v1.PodSecurityContext = nil
|
||||
if p.Spec.SecurityContext != nil {
|
||||
securityContext = p.Spec.SecurityContext
|
||||
}
|
||||
|
||||
if p.Spec.EnableAdminAPI {
|
||||
promArgs = append(promArgs, "-web.enable-admin-api")
|
||||
}
|
||||
|
@ -935,7 +930,7 @@ func makeStatefulSetSpec(p monitoringv1.Prometheus, c *Config, ruleConfigMapName
|
|||
Spec: v1.PodSpec{
|
||||
Containers: containers,
|
||||
InitContainers: p.Spec.InitContainers,
|
||||
SecurityContext: securityContext,
|
||||
SecurityContext: p.Spec.SecurityContext,
|
||||
ServiceAccountName: p.Spec.ServiceAccountName,
|
||||
NodeSelector: p.Spec.NodeSelector,
|
||||
PriorityClassName: p.Spec.PriorityClassName,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue