-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add AWS kfctl(golang) support and 0.6 support #3695
Conversation
/cc @kkasravi |
/assign @jlewi HI @Jeffwan moving forward I'd like to try to get away from adding more command line flags. The desired experience will be closer to something like
So rather than define new config flags; you should define an AWSPlugin
And then any AWS fields (e.g. region) should be provided as part of that plugin and set in the KFDef file. |
bootstrap/config/kfctl_aws.yaml
Outdated
namespace: kubeflow | ||
spec: | ||
platform: aws | ||
componentParams: |
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.
The fields packages, components, componentParams are the deprecated fields that were there for ksonnet.
If you want you can still use these fields but since its a new config I might suggest using the new field
Spec.applications
Each application is just a pointer to a kustomize package.
kfctl will automatically update kfdef.spec.applications based on packages, components,componentParams
so if you run kfctl and then look at app.yaml you can copy the value of KfDef.Spec.Applications from there.
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.
Sure. I will make some clean ups as you suggest.
- Define a plugin to avoid bring in more options
- Use Applications instead.
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
33de57c
to
e5f3960
Compare
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.
Reviewable status: 0 of 15 files reviewed, 5 unresolved discussions (waiting on @Jeffwan, @kkasravi, @kunmingg, and @mameshini)
bootstrap/cmd/kfctl/cmd/apply.go, line 19 at r2 (raw file):
import ( "fmt"
nit: can we revert this file just to get rid of spurious changes?
bootstrap/config/overlays/aws/kfctl_default.yaml, line 1 at r2 (raw file):
apiVersion: kfdef.apps.kubeflow.org/v1alpha1
I don't think you need these files.
kfctl used to be using kustomize to generate a KFDef in a YAML file
but now
kfctl takes a single parameter --config=
where the YAML file should fully specify KFDef
So if you want to have multiple configurations you what have multiple independent YAML files.
If you wanted to use kustomize to reduce boilerplate across those configs you could but the pattern would be to run kustomize and then check in the results.
bootstrap/pkg/apis/apps/kfdef/v1alpha1/application_types.go, line 37 at r2 (raw file):
SkipInitProject bool `json:"skipInitProject,omitempty"` UseIstio bool `json:"useIstio"` ServerVersion string `json:"serverVersion,omitempty"`
Did you mean to make this change? Maybe you just need to sync and pull in the latest changes?
bootstrap/pkg/kfapp/aws/aws.go, line 82 at r2 (raw file):
// use aws to call sts get-caller-identity to verify aws credential works. if err := utils.CheckAwsStsCallerIdentity(sess); err != nil {
I think you would want to move this code to Generate and/or Apply
kubeflow/bootstrap/pkg/kfapp/gcp/gcp.go
Line 782 in ed40c4f
if err := gcp.initGcpClient(); err != nil { |
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.
Reviewable status: 0 of 15 files reviewed, 5 unresolved discussions (waiting on @Jeffwan, @jlewi, @kkasravi, @kunmingg, and @mameshini)
bootstrap/config/overlays/aws/kfctl_default.yaml, line 1 at r2 (raw file):
Previously, jlewi (Jeremy Lewi) wrote…
I don't think you need these files.
kfctl used to be using kustomize to generate a KFDef in a YAML file
but nowkfctl takes a single parameter --config=
where the YAML file should fully specify KFDef
So if you want to have multiple configurations you what have multiple independent YAML files.
If you wanted to use kustomize to reduce boilerplate across those configs you could but the pattern would be to run kustomize and then check in the results.
I think keeping them would be ok since bootstrap/config/{base,overlays} will be moved into manifests and a tool can generate the file used for kfctl init --config=...
/hold |
Changes are not ready yet. Still working on it. I will address above comments. |
e5f3960
to
37ca547
Compare
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.
Reviewable status: 0 of 15 files reviewed, 5 unresolved discussions (waiting on @Jeffwan, @jlewi, @kunmingg, and @mameshini)
bootstrap/cmd/kfctl/cmd/apply.go, line 19 at r2 (raw file):
nit: can we revert this file just to get rid of spurious changes?
Looks like my editor auto format this fine and add one empty line. Revert it.
bootstrap/config/overlays/aws/kfctl_default.yaml, line 1 at r2 (raw file):
Previously, kkasravi (Kam Kasravi) wrote…
I think keeping them would be ok since bootstrap/config/{base,overlays} will be moved into manifests and a tool can generate the file used for
kfctl init --config=...
Notice we need kfctl init {app_name} --config=.. since init.go check args.
bootstrap/config/{base,overlays} will give some template like this, if we want to use --config, where should we keep the preconfigured templates?
bootstrap/pkg/apis/apps/kfdef/v1alpha1/application_types.go, line 37 at r2 (raw file):
Previously, jlewi (Jeremy Lewi) wrote…
Did you mean to make this change? Maybe you just need to sync and pull in the latest changes?
I will have a check. I may carelessly delete it in rebase.
bootstrap/pkg/kfapp/aws/aws.go, line 82 at r2 (raw file):
Previously, jlewi (Jeremy Lewi) wrote…
I think you would want to move this code to Generate and/or Apply
kubeflow/bootstrap/pkg/kfapp/gcp/gcp.go
Line 782 in ed40c4f
if err := gcp.initGcpClient(); err != nil {
Move to Generate/Apply/Delete
/hold cancel |
@jlewi @kkasravi Changes are ready and I address the feedbacks you left and please have a check. Only confusion part is what's the best practice if we have different config patterns? Should we create different kfctl_aws_**.yaml template for users?
|
Thanks @Jeffwan
Could you explain a bit more on the different config patterns or point me to the relevanant part(s), or paste several kfctl_aws_*.yaml's you had in mind? |
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.
Reviewed 2 of 18 files at r1, 4 of 12 files at r2, 9 of 9 files at r3.
Reviewable status: 14 of 16 files reviewed, 4 unresolved discussions (waiting on @Jeffwan, @jlewi, @kkasravi, @kunmingg, and @mameshini)
bootstrap/config/kfctl_aws.yaml, line 1 at r3 (raw file):
apiVersion: kfdef.apps.kubeflow.org/v1alpha1
Maybe add a comment explaining what this config is for?
bootstrap/config/kfctl_aws_cognito.yaml, line 1 at r3 (raw file):
apiVersion: kfdef.apps.kubeflow.org/v1alpha1
Maybe add a comment at the top of this file explaining what its for?
bootstrap/config/overlays/aws/kfctl_default.yaml, line 1 at r2 (raw file):
Previously, Jeffwan (Jiaxin Shan) wrote…
Notice we need kfctl init {app_name} --config=.. since init.go check args.
bootstrap/config/{base,overlays} will give some template like this, if we want to use --config, where should we keep the preconfigured templates?
I think the current location is fine. Lets follow up in
kubeflow/manifests#241
Did you mean to retain this now that you have kfctl_aws.yaml?
Looks like this is still using old style components, packages, componentParams
bootstrap/pkg/kfapp/aws/aws.go, line 82 at r2 (raw file):
Previously, Jeffwan (Jiaxin Shan) wrote…
Move to Generate/Apply/Delete
It looks like you are still initiating the clients and session here?
/lgtm @Jeffwan I left a couple comments but in the interest of trying to get this into the next RC I'm LGTM. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jlewi 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 |
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.
Reviewable status: 14 of 16 files reviewed, 4 unresolved discussions (waiting on @Jeffwan, @jlewi, @kunmingg, and @mameshini)
bootstrap/config/overlays/aws/kfctl_default.yaml, line 1 at r2 (raw file):
Previously, jlewi (Jeremy Lewi) wrote…
I think the current location is fine. Lets follow up in
kubeflow/manifests#241Did you mean to retain this now that you have kfctl_aws.yaml?
Looks like this is still using old style components, packages, componentParams
Yes. I used it in overlay kfctl_default.yaml. After I generate config and kustomize config are backfilled, I delete all components and packages in final template. Technically, this one is unnecessary now. I will check #241 for updates.
bootstrap/pkg/kfapp/aws/aws.go, line 82 at r2 (raw file):
Previously, jlewi (Jeremy Lewi) wrote…
It looks like you are still initiating the clients and session here?
Will move entire client initiation to later steps in next revision.
I image that user want simple setups can use |
* Add AWS parameters in kfctl API * Add aws provision implementation * Add aws parameters in coordinator * Clean up logs and comments * Add config kustomization files for AWS * Update kfctl default components for aws * Update aws infra configs * Update kfctl aws settings * Clean up aws configs and boostrap process * Refactor aws.go and add aws plugin * Address feedbacks and refactor Generate/Apply * Update manifest files * Update aws kfctl config files
@@ -1,14 +0,0 @@ | |||
# privateAccess enable private access for your Amazon EKS cluster's Kubernetes API server endpoint |
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.
Hi @Jeffwan - thanks for your work on this. Did you delete this intentionally? For v0.6.1 this broke https://github.com/kubeflow/kubeflow/blob/master/scripts/aws/util.sh - which relies on cluster_features.sh
Following https://www.kubeflow.org/docs/aws/deploy/install-kubeflow/ with export KUBEFLOW_TAG=v0.6.1
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.
Oh. I see. Thanks for letting me know. This will be only used in 0.5.1 and 0.6 has few changes for this. I will update docs this week to give latest guidance.
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.
Cool - thanks!
* Add AWS parameters in kfctl API * Add aws provision implementation * Add aws parameters in coordinator * Clean up logs and comments * Add config kustomization files for AWS * Update kfctl default components for aws * Update aws infra configs * Update kfctl aws settings * Clean up aws configs and boostrap process * Refactor aws.go and add aws plugin * Address feedbacks and refactor Generate/Apply * Update manifest files * Update aws kfctl config files
* Add AWS parameters in kfctl API * Add aws provision implementation * Add aws parameters in coordinator * Clean up logs and comments * Add config kustomization files for AWS * Update kfctl default components for aws * Update aws infra configs * Update kfctl aws settings * Clean up aws configs and boostrap process * Refactor aws.go and add aws plugin * Address feedbacks and refactor Generate/Apply * Update manifest files * Update aws kfctl config files
Part of the work of #3151
This change is