-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Namespace stuck in Terminating mode due to Finalizer in spec and ansible-operator not triggering. #2362
Comments
Hi, @camilamacedo86 #1513 has the steps to reproduce the scenario where the ansible-operator is watching a CR but in this case, the ansible-operator I created is not watching a CR but a Namespace which is a built-in type. As you can see from my But the playbook/role is not getting triggered when I delete a Namespace, hence I had to add the 'kubernetes' finalizer in the |
The steps to reproduce this issue are:
|
Hi @fabianvf could you give a hand here? WDYT? |
@RushinthJohn is the operator getting triggered on update? Curious if this is an issue specifically with deletion or if we're not getting events that come after creation period |
@fabianvf I performed an update on the Namespace by adding labels to its metadata and the Ansible role was not triggered. Not sure if adding labels constitutes an update event. |
Didn't face this issue with the latest version of ansible-operator base image. Closing this issue. |
Hi @RushinthJohn, When the However, in the 0.14 release, a bug fix was done which may be related to it as well which was to So, this also can be the reason for you are no longer facing this issue too. Thank you for your reply. |
Bug Report
What did you do?
I created an ansible-operator that watches the Namespaces.
The Ansible role is triggered successfully whenever a namespace is created.
But when I delete a namespace, the namespace is stuck in terminating mode.
What did you expect to see?
When the namespace was deleted the Ansible role mentioned has to be triggered.
What did you see instead? Under which circumstances?
When the namespace was deleted the Ansible role mentioned was not triggered and the namespace was stuck in Terminating mode.
Environment
operator-sdk version: v0.12.0
go version: go1.13.3 linux/amd64
Kubernetes version information:
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.0", GitCommit:"70132b0f130acc0bed193d9ba59dd186f0e634cf", GitTreeState:"clean", BuildDate:"2019-12-07T21:20:10Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.11-gke.14", GitCommit:"56d89863d1033f9668ddd6e1c1aea81cd846ef88", GitTreeState:"clean", BuildDate:"2019-11-07T19:12:22Z", GoVersion:"go1.12.11b4", Compiler:"gc", Platform:"linux/amd64"}
Kubernetes cluster kind: GKE
Are you writing your operator in ansible, helm, or go?
ansible
ansible-operator image: quay.io/operator-framework/ansible-operator:v0.13.0
Additional context
The
watches.yaml
looks like:The
roles/acme/tasks/main.yml
looks like:The text was updated successfully, but these errors were encountered: