Skip to content

Commit

Permalink
chore: add changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
azrod committed Oct 31, 2024
1 parent 3d5fdc4 commit be16372
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .changelog/87.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:feature
`chore` - Now the mutating webhook configuration used for mutate image tag on pod creation is created by the operator itself. This is done to avoid the need for the user to create the mutating webhook configuration manually. The operator will also update the mutating webhook configuration if the user changes the configuration (annotations) in the namespace.
```
2 changes: 1 addition & 1 deletion internal/controller/namespace_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (r *NamespaceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (

if err := r.Client.Get(ctx, req.NamespacedName, &ns); err != nil {
if client.IgnoreNotFound(err) == nil {
xlog.WithError(err).Error("could not get the image object")
xlog.WithError(err).Error("could not get the namespace object")
foundInMutatorConfig = true // Force rebuilding the mutating configuration
} else {
return ctrl.Result{}, err
Expand Down
17 changes: 8 additions & 9 deletions manifests/operator/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ rules:
- patch
- update
- watch
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- watch
- apiGroups:
- kimup.cloudavenue.io
resources:
Expand Down Expand Up @@ -80,12 +88,3 @@ rules:
- get
- patch
- update

- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- watch

0 comments on commit be16372

Please sign in to comment.