Skip to content

Commit

Permalink
Merge pull request #746 from jvanz/patch-configmaps-deployments
Browse files Browse the repository at this point in the history
fix: use patch verb to update configmaps and deployments.
  • Loading branch information
flavio authored May 28, 2024
2 parents f089d9e + db74734 commit 95f74a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/pkg/admission/policy-server-configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (r *Reconciler) reconcilePolicyServerConfigMap(
Namespace: r.DeploymentsNamespace,
},
}
_, err := controllerutil.CreateOrUpdate(ctx, r.Client, cfg, func() error {
_, err := controllerutil.CreateOrPatch(ctx, r.Client, cfg, func() error {
return r.updateConfigMapData(cfg, policyServer, policies)
})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/admission/policy-server-deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (r *Reconciler) reconcilePolicyServerDeployment(ctx context.Context, policy
Namespace: r.DeploymentsNamespace,
},
}
_, err = controllerutil.CreateOrUpdate(ctx, r.Client, policyServerDeployment, func() error {
_, err = controllerutil.CreateOrPatch(ctx, r.Client, policyServerDeployment, func() error {
return r.updatePolicyServerDeployment(policyServer, policyServerDeployment, configMapVersion)
})
if err != nil {
Expand Down

0 comments on commit 95f74a4

Please sign in to comment.