-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
ansible operator reapeating tasks twice? #6424
Comments
@ricosega Would you be able to share your |
hi @everettraven, here is my watches.yaml
Just to give you more overview, the operator manages creating labs, so it creates needed kubernetes objects and also some infrastructure. |
@ricosega Thanks for sharing your I suspect that if you disable the dependent resource watches that you will no longer see the reconciliation triggered a second time |
@everettraven that was the cause! |
@ricosega Apologies for my severly late reply. I don't think it is possible to only remove the injected owner reference for a specific object, but I do think you could configure a watch on individual resources you want watched to trigger the same playbook. |
well the "watchDependentResources" solved our problem, thank you @everettraven for your responses. |
Question
Why the operator is repeating the task twice?
What did you do?
Created a new crd and in the tasks doing some steps:
What did you expect to see?
I want the task to be done once.
What did you see instead? Under which circumstances?
The task repeated.
First time it creates the namespace and creates the object externalSecret.
But it runs again from the beginning.
Environment
Operator type:
Kubernetes cluster type:
EKS 1.25
$ operator-sdk version
operator-sdk version: "v1.27.0", commit: "5cbdad9209332043b7c730856b6302edc8996faf", kubernetes version: "1.25.0", go version: "go1.19.5", GOOS: "linux", GOARCH: "amd64"
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.3", GitCommit:"434bfd82814af038ad94d62ebe59b133fcb50506", GitTreeState:"clean", BuildDate:"2022-10-12T10:57:26Z", GoVersion:"go1.19.2", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.7
Server Version: version.Info{Major:"1", Minor:"25+", GitVersion:"v1.25.6-eks-48e63af", GitCommit:"9f22d4ae876173884749c0701f01340879ab3f95", GitTreeState:"clean", BuildDate:"2023-01-24T19:19:02Z", GoVersion:"go1.19.5", Compiler:"gc", Platform:"linux/amd64"}
Additional context
Is not the only case when adding this part of code "create externalSecrets" that causes the task to be repeated twice. But tried removing all the tasks and leaving the minimum when it starts to do this behavior.
Below you can see it:
https://gist.github.com/ricosega/ba9d35904af8e9329de16c7853543be2
The text was updated successfully, but these errors were encountered: