Fix setting service account annotations
This commit is contained in:
parent
ef96b5564d
commit
2c28755e90
|
|
@ -350,6 +350,9 @@ func (r *ReconcileJenkinsBaseConfiguration) createServiceAccount(meta metav1.Obj
|
||||||
}
|
}
|
||||||
|
|
||||||
if !compareMap(r.Configuration.Jenkins.Spec.ServiceAccount.Annotations, serviceAccount.Annotations) {
|
if !compareMap(r.Configuration.Jenkins.Spec.ServiceAccount.Annotations, serviceAccount.Annotations) {
|
||||||
|
if serviceAccount.Annotations == nil {
|
||||||
|
serviceAccount.Annotations = map[string]string{}
|
||||||
|
}
|
||||||
for key, value := range r.Configuration.Jenkins.Spec.ServiceAccount.Annotations {
|
for key, value := range r.Configuration.Jenkins.Spec.ServiceAccount.Annotations {
|
||||||
serviceAccount.Annotations[key] = value
|
serviceAccount.Annotations[key] = value
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue