Description
Describe the problem/challenge you have
I have two resources that are part of an app. Resource A will not be ready without resource B, and resource B will not become ready without resource A. I'd like to know for kapp deploy
when both resources are ready.
If I define no wait rules or change rules then everything will come up, but I don't know when that happens via kapp
.
If I define wait rules, then I know when both resources are up, but there's a race condition where one of the resource could be not ready and fail the kapp deploy
.
If I define a change rule, then I can ensure that resource A is created before resource B. But because resource A will never become ready without resource B, I can't also specify a wait rule, as resource B will never be created as resource A is never ready.
More specific details below.
Describe the solution you'd like
I'd like a way to order the upsert of resources via a change rule to wait for the resource to be "seen" without needing to wait for all of the wait rule conditions. Waiting for the resource to be created/updated on the api may be sufficient, or if a wait rule defines supportsObservedGeneration: true
wait for the generations to match.
Anything else you would like to add:
My specific use case involves trying to deploy a Knative Service
(S) and a ServiceBinding
(SB) resource. The S will crash loop until the SB is ready. The SB will not become ready until the S exists.
Prereqs:
- Install Knative Serving
- Install Service Bindings
kapp deploy -a service-bindings -f https://github.com/vmware-labs/service-bindings/releases/download/v0.6.0/service-bindings-0.6.0.yaml
- Create a MySQL service
kapp deploy -a mysql -f https://gist.github.com/scothis/f65bd3ec45bd42ca89b1a554442c7cdc/raw/467d84237f582c6615ae1f7543d30d3a5015f2c6/mysql.yaml
Gist with config I'm attempting to use. Has both wait rules and a change rule defined. It will fail as is.
kapp deploy -a workload -f https://gist.github.com/scothis/f65bd3ec45bd42ca89b1a554442c7cdc/raw/467d84237f582c6615ae1f7543d30d3a5015f2c6/app.yaml
Vote on this request
This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.
👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"
We are also happy to receive and review Pull Requests if you want to help working on this issue.