-
Notifications
You must be signed in to change notification settings - Fork 40
Changing structure? (Kedge v2) - Creating controllers section #541
Comments
/cc @pradeepto @containscafeine |
I agree with all the points. I actually can't find the issue at the moment. But I believe we talked about this a while while back when we were discussing the general YAML format for the files. I totally agree that we should do Benefits:
We already use this for I do agree however that some things should stay as a global variable. For example, including As a release manager, we should make this a breaking change in whatever next release we do and make sure that we update all possible examples and documentation. |
Introducing this would mean that we -
I'm not sure if this betters the user experience. The technical problems that we're facing should not deter the user experience. I'm torn on this one 😕 |
Yes with new approach it should be possible to have only one schema file.
Problem is that they are not root level fields, but fields for controller object.
We had to hack around one file per application anyway (with
My arguments are mostly from user experience view. Solving some of the technicals problems is just nice side-effect. I'm actually convinced that this will be better user experience. It will be more consistent and easier to understand. |
This will also bring clarity on Kubernetes-specific parameters that are added, for example: controller: job
name: pival
containers:
- image: perl
command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
restartPolicy: Never
parallelism: 3 Would become: name: pival
jobs:
containers:
- image: perl
command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
restartPolicy: Never
parallelism: 3
# Ignore this, just an example of formatting
services:
- name: wordpress
ports:
- port: 8080
targetPort: 80
portMappings:
- 90:9090/tcp |
Related to older discussions at #119 |
I'm not very opposed to having the controller fields separate from other objects, e.g. deployments and jobs and services and ingresses are all at the same level, unlike our discussions previously in #119 We need to be careful and brainstorm if we're breaking any shortcuts or auto populations. |
Another point for discussion should be (if we are going to change structure) how and if we are going to ensure backward compatibility. |
We will discuss this issue in an online meeting on Monday, January 8th, 2018 at 13:30 GMT Anyone interested can join via https://bluejeans.com/980816040 |
The conclusion is that we are doing this. There were no arguments against this. It will have a lot of benefits, the only downside is that the structure of a file will change. But we are still at the point where we don't have any users, we should do changes like this until we can. |
So going through your examples in your PR @kadel and got a bit confused when containers is being defined.. ex: name: web
deployments:
- containers:
- image: nginx
# Extending the Kedge file using:
# https://v1-6.docs.kubernetes.io/docs/api-reference/v1.6/#container-v1-core
livenessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 20
timeoutSeconds: 5
EDIT: We should use Example: name: web
deployments:
- name: nginx
containers:
- image: nginx
# Extending the Kedge file using:
# https://v1-6.docs.kubernetes.io/docs/api-reference/v1.6/#container-v1-core
livenessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 20
timeoutSeconds: 5
services:
- name: nginx
type: NodePort
# Using a Kedge-specific 'shortcut'
portMappings:
- 8080:80 |
I'm a bit confused here. |
@kadel Yeah, sorry, I ended up clarifying later in the examples but I didn't update the descriptions. Yes, it should be an array, not an actual key (defining multiple). For the examples however, we should use |
I agree that it looks better, but |
We are starting to see some cases that are complicated because of our decisions to have controller objects on the root level.
I was thinking if it would make sense to change the structure a bit, and put controllers in separate sections the same way we have
services
,ingresses
,configMaps
....., This will also make easier to distinguish between global and local (object specific) values.Generic structure would look like this:
Root level
ObjectMeta
will be always merged with localObjectMeta
for given object.That way we can define the common name, global labels and annotations.
It would look like this:
Benefits:
---
"hack") - better UXWe should also introduce
formatVersion
, orkedgeVersion
field to allow kedge spec versioning.The text was updated successfully, but these errors were encountered: