Skip to content
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

fix kustomize manifests for kubeflow #1498

Merged
merged 17 commits into from
Apr 13, 2021

Conversation

davidspek
Copy link
Contributor

When trying to build the manifests for the Kubeflow deployment the following error occurs:

Error: accumulating resources: accumulation err='accumulating resources from '../../components/controller/controller.yaml': security; file '/home/david/Documents/GitHub/katib/manifests/v1beta1/components/controller/controller.yaml' is not in or below '/home/david/Documents/GitHub/katib/manifests/v1beta1/installs/katib-with-kubeflow'': got file 'controller.yaml', but '/home/david/Documents/GitHub/katib/manifests/v1beta1/components/controller/controller.yaml' must be a directory to be a root

This PR creates kustomization.yaml files for each of the folders so that the kustomization.yaml in katib-with-kubeflow can reference the component folders properly. Similarly, the katib-config-path.yaml that was being referenced from katib-standalone has been copied into the katib-with-kubeflow so that the manifests can be properly built with kustomize.

/cc @andreyvelich

@davidspek davidspek force-pushed the fix-manifests branch 2 times, most recently from a5274b2 to bc8f44a Compare April 3, 2021 11:10
Copy link
Member

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left few comments @davidspek.
For the CI: we should change the path for the katib-config with image tags here: https://github.com/kubeflow/katib/blob/master/test/scripts/v1beta1/setup-katib.sh#L42.

For the release scripts: we should also modify the path for the katib-config: https://github.com/kubeflow/katib/blob/master/scripts/v1beta1/release.sh#L74.

@@ -0,0 +1,61 @@
apiVersion: v1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we discussed on the meeting, we should move this file to /manifests/v1beta1/components/controller and remove current katib-config.yaml file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed the katib-config-patch.yaml files in the installation directory and move the image tags to /manifests/v1beta1/components/controller/katib-config.yaml.

@@ -3,28 +3,17 @@ kind: Kustomization
namespace: kubeflow
resources:
# Namespace.
- ../../components/namespace.yaml
- namespace.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any ideas how we can keep namespace under manifests/v1beta1/components ?
Maybe create folder components/namespace and add namespace.yaml and kustomization.yaml there.
WDYT @davidspek ? cc @yanniszark

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the easiest way so I have implemented this.

@@ -0,0 +1,6 @@
[
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've implemented katib-with-kubeflow-cert-manager to use katib-with-kubeflow as a base, which solves needing to duplicate this file.

@@ -0,0 +1,20 @@
apiVersion: networking.istio.io/v1alpha3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same comment as for the mysql-pvc.yaml patch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've implemented katib-with-kubeflow-cert-manager to use katib-with-kubeflow as a base, which solves needing to duplicate this file.

@andreyvelich
Copy link
Member

It would be great if @yanniszark could also take a look at these changes.

@yanniszark
Copy link
Contributor

@davidspek thanks for this effort. I will take a look shortly but I should comment that I am not treating this PR as release blocking (I think we've discussed in the past, but also mentioning it now for clarity). The first thing I would check for a PR like this would be that the result of kustomize build before and after the PR is the same for every entry under installs. Could you confirm that this is the case? And of course, CI should be passing and @andreyvelich confirm that these changes won't break something we don't expect in Katib docs / examples.

@davidspek
Copy link
Contributor Author

@yanniszark That is indeed how I am testing things. I just got caught up with creating a PR for a fix to the JWA as something seemed to be broken but I am now continuing with working on these manifests. It isn't release blocking, but as the RC period is partly meant for fixing manifests if this PR is done in time for the release cut it should be included I think.

@andreyvelich
Copy link
Member

@yanniszark Since we are using katib-with-kubeflow-cert-manager install for the kubeflow installation maybe we can remove the overlay which is using the Katib cert generator for now ?
I think if any distribution owners will require this install for Katib, we can this overlay later.

@andreyvelich
Copy link
Member

andreyvelich commented Apr 7, 2021

@davidspek @yanniszark I was actually thinking about the Katib installs more. What do you think about keeping these installs:

  1. /installs/katib-external-db
  2. /installs/katib-ibm
  3. /installs/katib-standalone
  4. /installs/katib-cert-manager
  5. /installs/katib-with-kubeflow

Since Kubeflow installation uses cert manager instead of custom cert generator we don't need to have 2 installs for Katib with Kubeflow.
We can create katib-cert-manager with all Katib Standalone components without Cert generator.
This is useful in cases when our custom Cert Generator doesn't work, e.g. #1512

WDYT @davidspek @yanniszark ?

@davidspek
Copy link
Contributor Author

@andreyvelich Sorry I completely missed your comment yesterday as I was very busy. Hopefully I will have time to continue wit this today (otherwise it'll be in the weekend).

@andreyvelich
Copy link
Member

@andreyvelich Sorry I completely missed your comment yesterday as I was very busy. Hopefully I will have time to continue wit this today (otherwise it'll be in the weekend).

No worries, take your time.
Thank you for your effort on this!

@davidspek
Copy link
Contributor Author

@andreyvelich I've pushed a commit with the katib-cert-manager and katib-with-kubeflow uses this as a base. I've also had the cert-generator create around 10 pods before one was successful so I think this is a good move. I don't really have a way to test this deployment, but when looking at the resulting YAML it makes sense. The resulting kubeflow YAML is what is expected with this setup.

I've also updated the releasing and test scripts so that the image tags are updated in katib-config.yaml.

@andreyvelich
Copy link
Member

Overall looks good to me, thank you @davidspek!
/lgtm
Please take a look @yanniszark @gaocegege @johnugeorge

@andreyvelich
Copy link
Member

/retest

@yanniszark
Copy link
Contributor

Thanks a lot for the effort @davidspek @andreyvelich.
I took a quick look and some small comments I have are:

  • It would be good if the patches were declared in a universal way (separate files). Keep in mind that you can include multiple patches in one file, using patchesStrategicMerge, if the context is similar.
  • Instead of patching to remove all cert-generator resources, how about creating a separate kustomization for the cert-generator?

And of course, before merging, I would validate that the result of each new kustomization is the same as the result of the respective previous kustomization.

@davidspek
Copy link
Contributor Author

Makes sense to me. @andreyvelich Let me know what you prefer and I'll make the needed changes.

@andreyvelich
Copy link
Member

I agree with @yanniszark.

Let's have 2 separate folders for the Webhooks:

  1. cert-generator
  2. webhook

@davidspek
Copy link
Contributor Author

@andreyvelich I've just pushed a commit in which I have separated webhook from cert-generator and I'm not using katib-standalone as a base for katib-cert-manager to avoid needing all the patches that delete the cert-generator resources.

@andreyvelich
Copy link
Member

Thank you @davidspek.
If the changes look good to you @yanniszark, can you add lgtm, please ?

@davidspek
Copy link
Contributor Author

/retest

Copy link
Member

@gaocegege gaocegege left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: DavidSpek, gaocegege

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-robot google-oss-robot merged commit 520f54e into kubeflow:master Apr 13, 2021
google-oss-robot pushed a commit that referenced this pull request Apr 13, 2021
…1514: Create workflow for Go Cherry pick of #1498 #1514 on release-0.11. #1498: fix kustomize manifests for kubeflow #1514: Create workflow for Go (#1515)

* fix kustomize manifests for kubeflow

* fix standalone and external-db manifests

* remove old namespace file

* remove PV from kubeflow manifest

* fix katib-external-db reference outside of root

* fix katib-with-kubeflow-cert-manager

* Move image tags to katib-config.yaml and remove patches

* use common namespace kustomization

* Make kubeflow-cert use kubeflow as a base

* Remove katib-cert-generator job from kubeflow-cert-generator manifests

* Move pv-patch to patches folder

* Create katib-cert-manager and make kubeflowuse this as base

* Fix release and CI scripts for new layout

* Remove unnecessary cert-generator images from kustomization.yaml

* Remove unnecessary SA, CR and CRB from katib-cert-manager

* Remove commonLabel from katib-with-kubeflow

* Separate cert-generator from webhook kustomization

* Create workflow for Go

* Add GOPATH env

* Move check up

* Add env

* Add go mod download

* Add ls command

* Add path

* Change path for run

* Change GOPATH

* Add kubebuilder

* Download coveralls

* Add node test

* Remove Travis

* Add coveralls step

* Change coveralls use

* Add working dir

* Remove run

* Fix the patch

* Remove patch

Co-authored-by: DavidSpek <vanderspek.david@gmail.com>
maanur added a commit to maanur/katib that referenced this pull request Apr 13, 2021
maanur added a commit to maanur/katib that referenced this pull request Apr 13, 2021
google-oss-robot pushed a commit that referenced this pull request Apr 22, 2021
* Add kustomization overlay: katib-standalone-openshift

* Rename OpenShift kustomization and remove unused RBAC resources

* Update kustomization katib-openshift to support changes in #1498

* katib-openshift: move patches to dedicated dir

* katib-openshift: clarify comments

* Update katib-openshift image tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants