Operator needs to create services before webhooks
@@ -541,11 +541,6 @@ func (r *Reconciler) Sync(queue workqueue.RateLimitingInterface) (bool, error) {
return false, err
}
- err = r.createOrUpdateComponentsWithCertificates(queue)
- if err != nil {
- return false, err
- }
-
// create/update Services
pending, err := r.createOrUpdateService()
if err != nil {
@@ -559,6 +554,11 @@ func (r *Reconciler) Sync(queue workqueue.RateLimitingInterface) (bool, error) {
return false, nil
}
+ err = r.createOrUpdateComponentsWithCertificates(queue)
+ if err != nil {
+ return false, err
+ }
+
if infrastructureRolledOver {
err = r.removeKvServiceAccountsFromDefaultSCC(r.kv.Namespace)
if err != nil {
