-
Notifications
You must be signed in to change notification settings - Fork 41
Feature-Request: Pass namespace through #510
Comments
$ cat kedge.yml
name: web
namespace: apache
containers:
- image: centos/httpd
services:
- portMappings:
- 80
type: LoadBalancer I am using above kedge file, I would expect both the configs to be created for namespace $ kedge generate -f kedge.yml
---
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
app: web
name: web
spec:
ports:
...
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: web
name: web
namespace: apache
spec:
... I know I can define namespace in each and every object, but it is very unintuitive. What I would like to propose here is that we create a shortcut for the namespace at root level, so if root level namespace is defined it acts as global namespace for all the objects generated. A user can over-ride we populating the namespace in each every object by defining namespace explitcitly there for that object. |
@surajssd Yeah.. this needs to be addressed. If we define a namespace, it should create the service, etc associated with that file (in your example, the |
As a rule, we don't want to redefine the behavior of keys from Kubernetes artifacts. Can we come up with some new name for key defining a global namespace that will be applied to all objects? |
@kadel how about adding root level namespace to every generated Kubernetes object if it is not passed in explicitly. That is what the user will expect when he/she will be specifying namespace at the root level anyway. We are not altering the behavior, we are auto-populating. WDYT? |
That we could do. But I would rather see I don't like when namespace is hardcoded in artifacts |
I agree that namespace should not be a part of the application definition but should be a part of cluster operations passed via command line, but since ObjectMeta has namespace anyway, we could add auto population as well as a |
@containscafeine auto-population from where ? I am not sure what you mean here? |
@surajssd, what @containscafeine means is that we should do the same thing with with @containscafeine I'm ok with that as long as |
I know that this has been discussed before. However Would there be any harm in passing passing a defined metadata namespace object through to the output? If the incoming "kedge" yaml file has a metadata object with a subobject named "namespace" can that key value pair pair get sent through to the output yaml?
Thanks for your consideration.
The text was updated successfully, but these errors were encountered: