@@ -153,11 +153,13 @@ func RHSSODeployment(cr *v1alpha1.Keycloak, dbSecret *v1.Secret, dbSSLSecret *v1
153153 "component" : KeycloakDeploymentComponent ,
154154 }
155155 podLabels := AddPodLabels (cr , labels )
156+ podAnnotations := cr .Spec .KeycloakDeploymentSpec .PodAnnotations
156157 rhssoStatefulSet := & v13.StatefulSet {
157158 ObjectMeta : v12.ObjectMeta {
158- Name : KeycloakDeploymentName ,
159- Namespace : cr .Namespace ,
160- Labels : podLabels ,
159+ Name : KeycloakDeploymentName ,
160+ Namespace : cr .Namespace ,
161+ Labels : podLabels ,
162+ Annotations : podAnnotations ,
161163 },
162164 Spec : v13.StatefulSetSpec {
163165 Replicas : SanitizeNumberOfReplicas (cr .Spec .Instances , true ),
@@ -166,9 +168,10 @@ func RHSSODeployment(cr *v1alpha1.Keycloak, dbSecret *v1.Secret, dbSSLSecret *v1
166168 },
167169 Template : v1.PodTemplateSpec {
168170 ObjectMeta : v12.ObjectMeta {
169- Name : KeycloakDeploymentName ,
170- Namespace : cr .Namespace ,
171- Labels : podLabels ,
171+ Name : KeycloakDeploymentName ,
172+ Namespace : cr .Namespace ,
173+ Labels : podLabels ,
174+ Annotations : podAnnotations ,
172175 },
173176 Spec : v1.PodSpec {
174177 Volumes : KeycloakVolumes (cr , dbSSLSecret ),
@@ -231,7 +234,9 @@ func RHSSODeploymentReconciled(cr *v1alpha1.Keycloak, currentState *v13.Stateful
231234 reconciled := currentState .DeepCopy ()
232235
233236 reconciled .ObjectMeta .Labels = AddPodLabels (cr , reconciled .ObjectMeta .Labels )
237+ reconciled .ObjectMeta .Annotations = AddPodAnnotations (cr , reconciled .ObjectMeta .Annotations )
234238 reconciled .Spec .Template .ObjectMeta .Labels = AddPodLabels (cr , reconciled .Spec .Template .ObjectMeta .Labels )
239+ reconciled .Spec .Template .ObjectMeta .Annotations = AddPodAnnotations (cr , reconciled .Spec .Template .ObjectMeta .Annotations )
235240
236241 reconciled .ResourceVersion = currentState .ResourceVersion
237242 reconciled .Spec .Replicas = SanitizeNumberOfReplicas (cr .Spec .Instances , false )
0 commit comments