Support setting namespace for every deployer#852
Support setting namespace for every deployer#852dgageot merged 4 commits intoGoogleContainerTools:masterfrom
Conversation
f41a3bb to
21d3dd8
Compare
7ef1c2c to
b82c2f0
Compare
7c71ad4 to
7f25aa5
Compare
pkg/skaffold/deploy/kustomize.go
Outdated
| return bytes.NewReader(out), nil | ||
| } | ||
|
|
||
| // TODO(dgageot): this code is already in KubectlDeployer |
There was a problem hiding this comment.
why wouldn't we just add the namespace parameter to the kubectl method which we would leave as a package level utility? I'm not sure I follow why both the kustomizeDeployer and the KubeCtlDeployer need kubectl command. What is your plan here?
There was a problem hiding this comment.
I don't really have a plan. The thing is that both deployer deploy with kubectl. I wanted to embed KubeCtlDeployer into kustomizeDeployer but I'm not sure it's really better than a little duplication.
Another plan would be to extract this function and the state it requires into a shared package
There was a problem hiding this comment.
I extracted the kubectl CLI code to a separate package to make easier to share between both deployers.
| ObjectMeta: meta_v1.ObjectMeta{ | ||
| Name: namespaceName, | ||
| Namespace: namespaceName, | ||
| GenerateName: "skaffold", |
| { | ||
| description: "helm example", | ||
| args: []string{"run"}, | ||
| deployments: []testObject{ |
996c4b1 to
4f79a65
Compare
via flag or env variable. Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Support setting namespace for every deployer via
--namespaceflag orSKAFFOLD_NAMESPACEenv variable.Also :