Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

flag to deploy to specific namespace #93

Closed
surajssd opened this issue Jun 29, 2017 · 9 comments
Closed

flag to deploy to specific namespace #93

surajssd opened this issue Jun 29, 2017 · 9 comments

Comments

@surajssd
Copy link
Member

Right now kedge deploy, deploys to the current namespace that is selected. But it would be awesome to have a flag that we can use to deploy to specific namespace.

Something like following:

kedge deploy -n foo -f web.yaml
kedge deploy --namespace foo -f web.yaml
@concaf
Copy link
Collaborator

concaf commented Jul 12, 2017

ping @kedgeproject/maintainers, are we good with the UX on this before we proceed?

@concaf concaf self-assigned this Jul 12, 2017
@cdrage
Copy link
Collaborator

cdrage commented Jul 12, 2017

Yup. --namespace and -n makes sense.

@concaf
Copy link
Collaborator

concaf commented Jul 19, 2017

Do we want to scope specifying namespace using -n only to kedge deploy/apply or do want it for generate too? ObjectMeta has Namespace string as a field, so we could substitute it there for the generated artifacts.

Btw, namespace can also be specified in the kedge spec for the application alternatively since it's a part of ObjectMeta.

@surajssd
Copy link
Member Author

@containscafeine do we have ObjectMeta? I don't think we have?

@concaf
Copy link
Collaborator

concaf commented Jul 19, 2017

@surajssd totally missed that :) Yeah, so namespace cannot go in the spec the way it is right now.
WDYT about extending this to kedge generate as well?

@surajssd
Copy link
Member Author

I don't have problem in doing it in generate, but it's just that we will have to handle it when we are creating the ObjectMeta!

@kadel
Copy link
Member

kadel commented Jul 19, 2017

I don't think namespace should be there for generate.
I don't like when a namespace is hardcoded in artifacts.

If you are deploying such artifacts you have to be extra careful to deploy it to the right namespace.

@cdrage
Copy link
Collaborator

cdrage commented Jul 19, 2017

I'd agree with @kadel that --namespace should be within create / delete rather than generate (makes no sense there)

@concaf
Copy link
Collaborator

concaf commented Jul 24, 2017

ack

concaf added a commit to concaf/kedge that referenced this issue Jul 24, 2017
This commit allows running "create", "delete" and "apply" kedge
subcommands with an optional "-n/--namespace" flag, which
specifies the Kubernetes namespace to perform the given operation
on.

The ExecuteKubectl() function in pkg/cmd/kubernetes.go is
refactored to accept multiple arguments to pass to "kubectl"
instead of just one, as before.

Fixes kedgeproject#93
concaf added a commit to concaf/kedge that referenced this issue Jul 24, 2017
This commit allows running "create", "delete" and "apply" kedge
subcommands with an optional "-n/--namespace" flag, which
specifies the Kubernetes namespace to perform the given operation
on.

The ExecuteKubectl() function in pkg/cmd/kubernetes.go is
refactored to accept multiple arguments to pass to "kubectl"
instead of just one, as before.

Fixes kedgeproject#93
concaf added a commit to concaf/kedge that referenced this issue Jul 27, 2017
This commit allows running "create", "delete" and "apply" kedge
subcommands with an optional "-n/--namespace" flag, which
specifies the Kubernetes namespace to perform the given operation
on.

The ExecuteKubectl() function in pkg/cmd/kubernetes.go is
refactored to accept multiple arguments to pass to "kubectl"
instead of just one, as before.

Fixes kedgeproject#93
concaf added a commit to concaf/kedge that referenced this issue Jul 27, 2017
This commit allows running "create", "delete" and "apply" kedge
subcommands with an optional "-n/--namespace" flag, which
specifies the Kubernetes namespace to perform the given operation
on.

The ExecuteKubectl() function in pkg/cmd/kubernetes.go is
refactored to accept multiple arguments to pass to "kubectl"
instead of just one, as before.

Fixes kedgeproject#93
concaf added a commit that referenced this issue Jul 27, 2017
implement namespace specific cluster operations

This commit allows running "create", "delete" and "apply" kedge
subcommands with an optional "-n/--namespace" flag, which
specifies the Kubernetes namespace to perform the given operation
on.

The ExecuteKubectl() function in pkg/cmd/kubernetes.go is
refactored to accept multiple arguments to pass to "kubectl"
instead of just one, as before.

Fixes #93
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants