-
Notifications
You must be signed in to change notification settings - Fork 40
Conversation
b6a76ba
to
df5f39b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is creating a job, then maybe a better name for the flag would be --job
what do you think?
It would be better if the the output is correct, but looks a bit weird in this order
|
The thing is that output of kedge init should be human consumable. The expectation is that users will edit and add stuff to it so it should be well formatted. |
Yeah true that, the golang template was being hard to maintain and add more things to it. |
Then
|
But output from this PR is complicating life for Kedge users, as generated kedge.yaml is going to be confusing to edit. Especially when we add more to it. Templating might be better here, even if it is pain to maintain. |
|
@kadel how can I generate output of the yaml marshaller that is consistent with the structs that are backing it, any pointers? |
Ah, you are right. Than we dont need restart flag for deployment. The best thing would be to have this only for Job controller. I think that it is better to have option that explicitly says that Job will be creted, rather than deciding what will be created based on restart flag. |
don't understand the question :-( |
df5f39b
to
ad48cda
Compare
@kadel yeah make sense what you said, so removing the flag --restart rather adding flag --controller. |
ad48cda
to
1415c48
Compare
+1 for replacing template with structs |
works for me & LGTM |
+1 for for It would be great to at least have right now it looks like this: containers:
- image: foobar
controller: DeploymentConfig
name: foobar
services:
- portMappings:
- 80
- 88 this would be much better: name: foobar
controller: DeploymentConfig
containers:
- image: foobar
services:
- portMappings:
- 80
- 88 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please extend user guide and add more information about kedge init
? Especially --controller
flag
1415c48
to
895ddbc
Compare
done |
not sure how do I do that because right now I am marshalling all those structs into yaml, not sure how to make the yaml library |
I'm not sure what to do with this :-( It makes our code a bit better, but on the other side it worsens User Experience a bit :-( |
docs/user-guide.md
Outdated
@@ -101,10 +101,32 @@ kedge version | |||
|
|||
## `kedge init` | |||
|
|||
Initialize kedge file | |||
### Basic getting started |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think "getting start" should suffice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
docs/user-guide.md
Outdated
kedge init --name web --image centos/httpd --ports 80 | ||
``` | ||
|
||
This will create a `kedge.yml` file for a long running application running inside |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need "long running" here?
How about, "file for an httpd web server with container image centos/httpd"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
docs/user-guide.md
Outdated
|
||
### Create a different controller type | ||
|
||
By default the controller type that is created is Kubernetes Deployments, which |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"is a Kubernetes Deployment" - also a link to Kubernetes Deployment docs would help
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
docs/user-guide.md
Outdated
which is Kubernetes Job, you can do that using the flag `--controller`. | ||
|
||
```bash | ||
kedge init --name myjob --image jobimage --controller Job |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lowercase "J" in job?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both are valid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
docs/user-guide.md
Outdated
### Create a different file | ||
|
||
```bash | ||
kedge init --file myapp.yml --name web --image centos/httpd --ports 80 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ kedge init --file myapp.yml --name web --image centos/httpd --ports 80
Error: unknown flag: --file
Usage:
kedge init [flags]
Flags:
-c, --controller string The type of controller this application is. Legal values [Deployment, Job, DeploymentConfig]. Default 'Deployment'.
-i, --image string The image for the container to run
-n, --name string The name of service
-o, --out string Output filename (default "kedge.yml")
-p, --ports intSlice The ports that this container exposes
Global Flags:
--provider string Specify a provider. Kubernetes or OpenShift. (default "kubernetes")
-v, --verbose verbose output
unknown flag: --file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch!
You can choose what type of controller is created using flag `--controller`. The values you can give it are [Deployment, DeploymentConfig, Job].
895ddbc
to
a68b39c
Compare
@kadel about the UX part, I think |
If this flag is specified with value being
OnFailure
orNever
,a controller of type
Job
is created.Fixes #325