-
Notifications
You must be signed in to change notification settings - Fork 40k
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 guestbook example to use replication controller instead of a naked pod. #4267
Conversation
Tests failed with:
|
Thanks @rsokolowski! @ddysher could you take a look? |
Sure, I'll take a look. |
@@ -46,7 +54,7 @@ Use the file `examples/guestbook/redis-master.json` which describes a single pod | |||
Create the redis pod in your Kubernetes cluster by running: | |||
|
|||
```shell | |||
$ cluster/kubectl.sh create -f examples/guestbook/redis-master.json | |||
$ cluster/kubectl.sh create -f examples/guestbook/redis-master-controller.json | |||
``` | |||
|
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.
Also show that using cluster/kubectl.sh get rc
will list the replication controller.
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.
@rsokolowski Thanks! I haven't looked at kubectl unittest yet. But I think you'll also need to fix guestbook.sh in e2e-suite. Can you fix it, rebase/squash? |
988985b
to
19ef840
Compare
Thanks for comments @ddysher. PTAL. |
NAME IMAGE(S) HOST LABELS STATUS | ||
redis-master dockerfile/redis kubernetes-minion-2.c.myproject.internal/130.211.156.189 name=redis-master Running | ||
POD IP CONTAINER(S) IMAGE(S) HOST LABELS STATUS | ||
redis-master-controller-gb50a 10.244.3.7 redis-master dockerfile/redis kubernetes-minion-4.c.hazel-mote-834.internal/104.154.54.203 app=redis,name=redis-master Running |
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.
This is slightly out-dated. Minion name is not numbered anymore, it has a random suffix. E.g. kubernetes-minion-7yx6 instead of kubernetes-minion-1, etc. This is for idempotent creation I believe.
Just do a simple replace string will suffix:
s/kubernetes-minion-1/kubernetes-minion-7yx6
s/kubernetes-minion-2/kubernetes-minion-eatx
....
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.
It's actually because the minions are now created as part of Managed Instance Groups members of which just have unique IDs versus counts.
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.
Ah, really, I thought it's follow up work for this #3789 Thanks
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.
Updated.
Looks good, some minor comments. Need a rebase. |
19ef840
to
3839f1f
Compare
3839f1f
to
50ba0ab
Compare
Thanks for comments @ddysher . Applied them and rebased/squashed. I also fixed hack/test-cmd.sh which was broken. |
508b747
to
6e3bfab
Compare
6e3bfab
to
d784f9d
Compare
Ping, I again synced to head. |
Have you ran e2e test? Just for precaution even though this is an example update. I believe a some places in e2e touches the directory. You seem to touch very hot files. |
d784f9d
to
8f7e5ef
Compare
The relevant e2e tests are passing. There is not that much dependency on examples/guestbook: mainly test-cmd.sh and guestbook.sh |
Have you commented on this? |
351ede8
to
125d1e9
Compare
Oops, I've missed the comment - replied. |
LGTM, will merge after final rebase. N.B. can you put a comment on the conflict part so I don't have to go through the whole commit, thx. |
125d1e9
to
635281e
Compare
kubectl get pods "${kube_flags[@]}" -lname=redis-master | grep -q 'redis-master' | ||
[ ! $(kubectl delete pods --all pods -l name=redis-master "${kube_flags[@]}" ) ] # not --all and label selector together | ||
kubectl get pods "${kube_flags[@]}" -lname=valid-pod | grep -q 'valid-pod' | ||
[ ! $(kubectl delete pods --all pods -l name=valid-pod "${kube_flags[@]}" ) ] # not --all and label selector together |
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.
Latest conflict was here due to 29aae75
Thanks for review @ddysher . Rebased, resolved conflict and added comment as requested. |
Update guestbook example to use replication controller instead of a naked pod.
Bunch of changes in addition and also to make the change work: