-
Notifications
You must be signed in to change notification settings - Fork 38.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update update-demo example to use kubectl #3576
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
kind: ReplicationController | ||
id: update-demo-kitten | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since you're running this through sed anyway, why not parameterize kitten vs. nautilus (e.g., IMAGE_VERSION)? Really we should be using jinja, jq, or something, but sed will work and doesn't create additional package dependencies. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I want a separate schema for the replacement controller, so it can omit #replicas and inherit #replicas from the running controller. Doesn't seem to be a benefit to further parameterizing unless we are merging the 2 schemas. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, right. Missed that. Ok. |
||
apiVersion: v1beta1 | ||
desiredState: | ||
replicaSelector: | ||
name: update-demo | ||
version: kitten | ||
podTemplate: | ||
desiredState: | ||
manifest: | ||
containers: | ||
- name: update-demo | ||
image: DOCKER_HUB_USER/update-demo:kitten | ||
ports: | ||
- hostPort: 8080 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto hostPort question |
||
containerPort: 80 | ||
protocol: TCP | ||
labels: | ||
name: update-demo | ||
version: kitten |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
kind: ReplicationController | ||
id: update-demo-nautilus | ||
apiVersion: v1beta1 | ||
desiredState: | ||
replicas: 2 | ||
replicaSelector: | ||
name: update-demo | ||
version: nautilus | ||
podTemplate: | ||
desiredState: | ||
manifest: | ||
containers: | ||
- name: update-demo | ||
image: DOCKER_HUB_USER/update-demo:nautilus | ||
ports: | ||
- hostPort: 8080 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @roberthbailey mentioned in another example we shouldn't be using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think hostPort is fine for examples. It's easy to understand and setup firewall rules for, and keeps this example simple (just creates rc, no need to also create a service with external loadbalancer). |
||
containerPort: 80 | ||
protocol: TCP | ||
labels: | ||
name: update-demo | ||
version: nautilus |
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.
Maybe a silly question: why leave
set -x
here but remove it elsewhere?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.
I initially thought the sed command showing up in output was messy, but
set -x
output is one command per line, so it's fine. Put it back elsewhere.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.
An optional nit would be to be consistent about where it's set, i.e. before/after export groups. But this is getting into minutia.