Open gberche-orange opened 1 year ago
This has been on our mind for a bit. Giving users the ability to inspect what has happened after each stage of reconciliation.
Our initial thought was to allow users to inspect the result after the templating step. But I see how it might be helpful to see fetched resources as well.
Could you share what the spec looks like? I might be able to help you reproduce this while we iron out what the experience for mimicking a reconciliation step by step should look like!
Edit: By spec, I meant the spec of the app CR in question
Thanks @100mik for your help !
Could you share what the spec looks like? I might be able to help you reproduce this while we iron out what the experience for mimicking a reconciliation step by step should look like!
Finally solved, see full details in slack thread https://kubernetes.slack.com/archives/CH8KCCKA5/p1673453880059389
Awesome! I will leave this issue up for the time being because we were thinking about how we can help users do "dry runs" of reconciliations better. Maybe we can close it if we have another issue tracking this thought 🚀 It might be worth spending some time thinking about what the experience should look like and if we can find better ways of achieving the goal here.
(I was putting this together, I will leave it here in case someone else trying to do something similar comes across this)
If you have the CLIs vendir
and ytt
installed you can replicate what you are doing with the following steps:
apiVersion: vendir.k14s.io/v1alpha1
directories:
- contents:
- git:
commitTitle: 'remove manual pvc creation #2...'
sha: d1b65f266e5078c91ae453c0a72f191835eeff8e
path: .
path: "0"
kind: LockConfig
vendir.yml
in a new folder.vendir sync
in this folder.After this step the folder config
(and any other folders being fetched) will be visible in this folder
Lets say values.yml
is the file we put our values in.
ytt
step described in the app spec to see the resultWould look like ytt -f config --data-values-file values.yml
in this case
thanks @100mik
I do believe that the displayed commands are quite useful, however reproducing the vendir commands seems to still require some work.
$ cat vendir.yml
apiVersion: vendir.k14s.io/v1alpha1
directories:
- contents:
- git:
commitTitle: 'remove manual pvc creation #2...'
sha: d1b65f266e5078c91ae453c0a72f191835eeff8e
path: .
path: "0"
kind: LockConfig
$ vendir sync
vendir: Error: Parsing resource config 'vendir.yml':
Unknown apiVersion 'vendir.k14s.io/v1alpha1' or kind 'LockConfig' for resource
$ vendir version
vendir version 0.32.2
Succeeded
After changing LockConfig
into Config
:
$ vendir sync
vendir: Error: Parsing resource config 'vendir.yml':
Unmarshaling config:
Validating config:
Validating directory '' (0):
Expected path to not be one of '/', '.', '..', ''
$ cat vendir.yml
apiVersion: vendir.k14s.io/v1alpha1
directories:
- contents:
- git:
commitTitle: 'remove manual pvc creation #2...'
sha: d1b65f266e5078c91ae453c0a72f191835eeff8e
path: .
path: "0"
kind: Config
Simply being able to inspect the current fetched artifacts and rerun the displayed ytt commands seems to me a very useful 1st step.
Oops! I thought we were printing the actual vendir config instead of the output. I definitely agree that it will be a valuable feature. We do need to hammer out how the experience will be like.
I am going to add the triage label and we should prioritise this when we have some bandwidth 🚀
Describe the problem/challenge you have
Trying to debug the behavior of kappcontroller with
kctrl dev
, the files passed to ytt are temporary and deleted upon completion of the command. As a result, it pretty hard to inspect them and interactively rerun the corresponding ytt commandDescribe the solution you'd like
A new
--keep-temp-files
flag to kctrl dev to prevent deleting the temporary directoryAnything else you would like to add:
See related slack thread https://kubernetes.slack.com/archives/CH8KCCKA5/p1673453880059389
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.