Open aravinder111 opened 4 years ago
Slack conversation regarding the ask mentioned above is here
With Ansible operator is possible to watch the resources which are dependent. See; https://sdk.operatorframework.io/docs/ansible/reference/dependent-watches/
But, confirmed with @fabianvf that currently has not a way to scope the operator to a single resource (other than checking and ending early from Ansible)
So, it will be flagged as RFE and will be discussed in the next triage meeting.
/cc @fabianvf
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten /remove-lifecycle stale
/remove-lifecycle rotten
c/c @asmacdo @fabianvf
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
@estroz is this supported from golang operators (I assume it is?). If so, we do probably want to add this functionality to keep parity
Yes if a predicate is used that filters by name. Perhaps allowing multiple names
per GVK?
Side note: requests like this are really good reasons to use a Go-Ansible hybrid operator; this particularly request is easy to implement and the watches API change is small, so conversion to a hybrid operator isn’t necessary.
Stale issues rot after 30d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten /remove-lifecycle stale
/lifecycle frozen
small remark: I think it's implemented using predicates on golang operator, but it's at reconciliation time that the decision is made to pick up or not the resource. It's also possible with ansible, you can watch all configmaps and execute your action only if the configmap respect your requirements (name/annotation/label, you only have to query for the configmap and filter according to your needs) I don't think this is optimal because you'll actually watch all configmaps, but it does work.
We also need this feature, can this be implemented soon?
Side note: requests like this are really good reasons to use a Go-Ansible hybrid operator; this particularly request is easy to implement and the watches API change is small, so conversion to a hybrid operator isn’t necessary.
Is there an example somewhere that demonstrates a hybrid?
Type of question
Are you asking about community best practices, how to implement a specific feature, or about general context and help around the operator-sdk? Help with operator-sdk's Ansible operator pattern
Question
What did you do? I would like to watch a specific k8s resource, to be specific I want to watch a configmap which is not created by my role. Whenever there is a change to the configmap, I want to reconcile my role.
What did you expect to see? An optional field
name
to be specified in watches.yamlWhat did you see instead? Under which circumstances? I dont see an option to watch a specific resource by its name in documentation https://sdk.operatorframework.io/docs/ansible/reference/watches/
Environment
Kubernetes version information: