in internal/resource/statefulset_utils.go [187:199]
func ConfigureStatefulSet(instance *TeamCity, node Node, current *v1.StatefulSet) {
allPersistentVolumeClaims := instance.GetAllCustomPersistentVolumeClaim()
volumes := BuildVolumesFromPersistentVolumeClaims(allPersistentVolumeClaims)
current.Spec.Replicas = pointer.Int32(1)
current.Spec.Template.Annotations = node.Annotations
current.Spec.Template.Spec.Volumes = volumes
current.Spec.Template.Spec.InitContainers = node.Spec.InitContainers
current.Spec.Template.Spec.NodeSelector = node.Spec.NodeSelector
current.Spec.Template.Spec.Affinity = &node.Spec.Affinity
current.Spec.Template.Spec.SecurityContext = &node.Spec.PodSecurityContext
current.Spec.Template.Spec.ServiceAccountName = instance.Spec.ServiceAccount.Name
current.Spec.Template.Spec.DeprecatedServiceAccount = ""
}