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

Move basic auth username/password to ENV #2713

Merged
merged 16 commits into from Mar 20, 2019
Merged

Conversation

gabrielwen
Copy link
Contributor

@gabrielwen gabrielwen commented Mar 15, 2019

Relates to #2661


This change is Reviewable

@gabrielwen
Copy link
Contributor Author

/assign @jlewi

@gabrielwen
Copy link
Contributor Author

/assign @kunmingg

@jlewi
Copy link
Contributor

jlewi commented Mar 15, 2019

@gabrielwen Can you look at why the test failed and open an issue if the failure is unrelated to this PR?

@kunmingg
Copy link
Contributor

Can we pass them during apply instead of save as ENV?
These might be too sensitive to save locally

@gabrielwen
Copy link
Contributor Author

/test kubeflow-presubmit

@gabrielwen
Copy link
Contributor Author

failure doesn't make sense to me, rerunning it.

Cloning into '/mnt/test-data-volume/kubeflow-presubmit-kfctl-go-2713-66ab02d-6331-e948/src/kubeflow/tf-operator'...
error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

@gabrielwen
Copy link
Contributor Author

seems like something wrong with deepcopy:

util.py                     71 INFO     Makefile:72: recipe for target 'pkg/apis/apps/gcp/v1alpha1/zz_generated.deepcopy.go' failed
util.py                     71 INFO     make: *** [pkg/apis/apps/gcp/v1alpha1/zz_generated.deepcopy.go] Error 255
util.py                     45 INFO     Running: make build-kfctl
cwd=/mnt/test-data-volume/kubeflow-presubmit-kfctl-go-2713-66ab02d-6337-0d08/src/kubeflow/kubeflow/bootstrap
util.py                     60 INFO     Subprocess output:
util.py                     71 INFO     /root/go/bin/deepcopy-gen -i github.com/kubeflow/kubeflow/bootstrap/pkg/apis/apps/gcp/... -O zz_g
enerated.deepcopy
util.py                     71 INFO     F0315 20:26:27.057077    8649 deepcopy.go:126] Failed loading boilerplate: open k8s.io/code-gener
ator/hack/boilerplate.go.txt: no such file or directory
util.py                     71 INFO     Makefile:72: recipe for target 'pkg/apis/apps/gcp/v1alpha1/zz_generated.deepcopy.go' failed
util.py                     71 INFO     make: *** [pkg/apis/apps/gcp/v1alpha1/zz_generated.deepcopy.go] Error 255
util.py                     45 INFO     Running: make build-kfctl
cwd=/mnt/test-data-volume/kubeflow-presubmit-kfctl-go-2713-66ab02d-6337-0d08/src/kubeflow/kubeflow/bootstrap
util.py                     60 INFO     Subprocess output:
util.py                     71 INFO     /root/go/bin/deepcopy-gen -i github.com/kubeflow/kubeflow/bootstrap/pkg/apis/apps/gcp/... -O zz_g
enerated.deepcopy
util.py                     71 INFO     F0315 20:26:37.651054    9499 deepcopy.go:126] Failed loading boilerplate: open k8s.io/code-gener
ator/hack/boilerplate.go.txt: no such file or directory
util.py                     71 INFO     Makefile:72: recipe for target 'pkg/apis/apps/gcp/v1alpha1/zz_generated.deepcopy.go' failed
util.py                     71 INFO     make: *** [pkg/apis/apps/gcp/v1alpha1/zz_generated.deepcopy.go] Error 255
util.py                     45 INFO     Running: make build-kfctl
cwd=/mnt/test-data-volume/kubeflow-presubmit-kfctl-go-2713-66ab02d-6337-0d08/src/kubeflow/kubeflow/bootstrap
util.py                     60 INFO     Subprocess output:
util.py                     71 INFO     /root/go/bin/deepcopy-gen -i github.com/kubeflow/kubeflow/bootstrap/pkg/apis/apps/gcp/... -O zz_g
enerated.deepcopy
util.py                     71 INFO     F0315 20:26:48.012311   10346 deepcopy.go:126] Failed loading boilerplate: open k8s.io/code-gener
ator/hack/boilerplate.go.txt: no such file or directory
util.py                     71 INFO     Makefile:72: recipe for target 'pkg/apis/apps/gcp/v1alpha1/zz_generated.deepcopy.go' failed
util.py                     71 INFO     make: *** [pkg/apis/apps/gcp/v1alpha1/zz_generated.deepcopy.go] Error 255
generated xml file: /mnt/test-data-volume/kubeflow-presubmit-kfctl-go-2713-66ab02d-6337-0d08/output/artifacts/junit_kfctl-build-test.xml
========================== 1 failed in 143.72 seconds ==========================

@gabrielwen
Copy link
Contributor Author

gabrielwen commented Mar 15, 2019

Issue filed: #2715

@gabrielwen
Copy link
Contributor Author

/retest

@gabrielwen
Copy link
Contributor Author

Fixes #2715

Copy link
Contributor

@jlewi jlewi left a comment

Choose a reason for hiding this comment

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

#2705 E2E test should be submitted first. That way the test can then be used to verify this PR is working.

Reviewable status: 0 of 5 files reviewed, 3 unresolved discussions (waiting on @ellis-bigelow, @gabrielwen, and @kkasravi)


bootstrap/cmd/kfctl/cmd/init.go, line 56 at r2 (raw file):

		if useBasicAuth && (os.Getenv(kftypes.BASIC_AUTH_USERNAME) == "" ||
			os.Getenv(kftypes.BASIC_AUTH_PASSWORD) == "") {
			// Printing warning message instead of bailing out as both ENV are used in apply,

The comment isn't clear to me. Can you explain?

If we only need these env for apply and not init; can we check what the command is and only error out if we are running the command that requires it?


bootstrap/cmd/kfctl/cmd/init.go, line 58 at r2 (raw file):

			// Printing warning message instead of bailing out as both ENV are used in apply,
			// not init.
			log.Warnf("If using basic auth, need to set ENV %v and %v when running kfctl apply",

"you need to set the environment variable %s to the username you want to use to login and variable %s to the password you want to use."


bootstrap/pkg/apis/apps/group.go, line 51 at r2 (raw file):

	DefaultGkeApiVer    = "v1beta1"
	DefaultAppLabel     = "app.kubernetes.io/name"
	BASIC_AUTH_USERNAME = "BASIC_AUTH_USERNAME"

Lets call the environment variables
KUBEFLOW_USERNAME
KUBEFLOW_PASSWORD

@gabrielwen
Copy link
Contributor Author

/retest

Copy link
Contributor

@jlewi jlewi left a comment

Choose a reason for hiding this comment

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

#2705 Is merged. Can you rebase? You'll need to update the test to work with this change.

Reviewable status: 0 of 5 files reviewed, 3 unresolved discussions (waiting on @ellis-bigelow, @gabrielwen, and @kkasravi)

Copy link
Contributor Author

@gabrielwen gabrielwen left a 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 6 files reviewed, 3 unresolved discussions (waiting on @ellis-bigelow, @jlewi, and @kkasravi)


bootstrap/cmd/kfctl/cmd/init.go, line 56 at r2 (raw file):

Previously, jlewi (Jeremy Lewi) wrote…

The comment isn't clear to me. Can you explain?

If we only need these env for apply and not init; can we check what the command is and only error out if we are running the command that requires it?

this is merely a friendly reminder to set the ENV variables.


bootstrap/cmd/kfctl/cmd/init.go, line 58 at r2 (raw file):

Previously, jlewi (Jeremy Lewi) wrote…

"you need to set the environment variable %s to the username you want to use to login and variable %s to the password you want to use."

Done.


bootstrap/pkg/apis/apps/group.go, line 51 at r2 (raw file):

Previously, jlewi (Jeremy Lewi) wrote…

Lets call the environment variables
KUBEFLOW_USERNAME
KUBEFLOW_PASSWORD

Done.

@kunmingg
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kunmingg

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

@k8s-ci-robot k8s-ci-robot merged commit 5f66d6e into kubeflow:master Mar 20, 2019
@gabrielwen gabrielwen deleted the env branch March 20, 2019 02:32
saffaalvi pushed a commit to StatCan/kubeflow that referenced this pull request Feb 11, 2021
* disable kustomize

* remove username/password from params

* remove CliOption

* add check in init

* use ENV

* remove from spec

* revert comment

* add GOPATH to fix test

* rebase

* update test for ENV username/password

* add some logs

* update

* update

* update naming
saffaalvi pushed a commit to StatCan/kubeflow that referenced this pull request Feb 12, 2021
* disable kustomize

* remove username/password from params

* remove CliOption

* add check in init

* use ENV

* remove from spec

* revert comment

* add GOPATH to fix test

* rebase

* update test for ENV username/password

* add some logs

* update

* update

* update naming
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.

None yet

5 participants