-
Notifications
You must be signed in to change notification settings - Fork 139
tie kfapp directory with kfdef name and namespace #324
Conversation
Thanks @adrian555, as I read this, it is deleting the kfapp even if only a change is detected, correct? |
@nakfour correct with any change to kfdef. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @adrian555
Can we capture this in a quick sequence diagram - essentially with the following verbs for simplicity, and maybe add somewhere in main README. Can be a follow-on PR if needed
- create
(kfdef -> kubeflow instance) - update
(kfdef -> kubeflow instance)
(kubeflow instance->kfdef ) [something changed on cluster, reconcile needs to kick in] - delete
(kfdef -> kubeflow instance)
(kubeflow instance->kfdef ) [something deleted on cluster, reconcile needs to kick in]
Other than that /lgtm
Thanks @animeshsingh for the heads up. I don't have much comment on the controller. On GCP we are moving in the direction of using GitOps and managing it as a loose collection of applications. Happy to discuss more at a community meeting if you are interested. if you want to see where we are headed. If you look at the makefile You can see the pattern is
|
Thanks @jlewi - that's news! So does this imply on GCP you are also moving away from kfdef? |
It means that KFDef is becoming redundant with kustomization.yaml. i.e. KFDef is just providing a list of kustomization packages to install. This can be done by listing kustomize packages in kustomization.yaml. So I think whether we move away from it on GCP depends on whether we find a suitable purpose for having that extra layer of indirection. |
This looks good to me - I tested it and was able to deploy into 2 separate namespaces. The operator reacted when I deleted one of the tracked configMaps and re-created it Any case I missed and it should be tested? If not LGTM |
Thanks @vpavlin for testing this out. I think the tests you have done covered the cases this PR fixes. I am writing some document according to what Animesh suggested above. Other than that, the code should be complete. |
/retest |
1 similar comment
/retest |
the
|
So the problem is quota limit being hit by the CI? Can we do something about it? It is very unfortunate if this is the thing that blocks this PR from being merged. |
/retest |
@animeshsingh @vpavlin same error failing to create gcp client from the log. Could @richardsliu @jlewi please help take a look? |
/retest |
Thanks @jlewi for getting the quota increased to fix the CI issue /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: animeshsingh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Awesome, thank you very much |
* tie kfapp directory with kfdef name and namespace * support multiple kfdefs
* tie kfapp directory with kfdef name and namespace * support multiple kfdefs
Towards #242
This is the simpler fix for the above issue. It does following:
for a new kfdef instance, the kfapp directory is created as
/tmp/<namespace>/<name>
. The kfdef configuration file is copied to this directory. The cache and kustomize directories are also sub directories to this kfapp dir.the manifest cache and kustomization files are downloaded and created by the same
kfApply
function like whatkfctl
command line does.when a change in kfdef instance is caught, the
Reconcile
function will first remove this kfapp directory, then the samekfApply
function runs to create/update according to the new kfdef configuration.when a kubeflow resource is deleted, the same
kfApply
is run when the reconcilation kicks in. But this time, since the kfapp directory remains and the contents do not get changed, the deleted kubeflow resource will get recreated.when the kfdef instance is deleted, the kfapp directory is destroyed as well.