-
Notifications
You must be signed in to change notification settings - Fork 35
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
wait until deploy completes #26
Comments
This should be satisfied by #24 as you can run that command after |
It might also be a good idea to re-open #25 to use the |
I understand #24 is very flexible, but if there are a some common workflows/tasks related to the deploy, it might be better to be implemented once by the plugin vs implemented by each app owner. |
I would consider this a bug, not an optional thing that devs might choose to do. The drone deploy should succeed/fail based on the success/failure of the k8s deploy. Is #25 necessary for this to work? i.e. it would run in a separate container than the apply? |
I can see this being a separate feature, will mark it as so. It isn't a bug because this isn't a feature of The plugin will currently fail when the resource config spec fails, the same conditions as doing it via the command line. |
I don't agree: the drone-gke plugin claims to "deploy container images to Kubernetes on Google Container Engine" -- not "run kubectl apply, which starts the deploy but doesn't wait for it to succeed or fail." kubectl apply isn't even mentioned in the doc, so a successful plugin execution but failed deploy looks like a bug. See the conversation in #gke from 2/24. "I know I’ve personally misconfigured my own app and only found out because I checked the logs." |
The The behavior that person described is the same as when using I do not see the intersection between the plugin's claim and the behavior of Kubernetes. Maybe it should be "configure Kubernetes resources on Google Container Engine" instead to clarify? |
I'll test how rollout behaves when other resources are in the kube files. I assumed it would know what to do (ignore) since it has The plugin does not say anywhere that it is a wrapper for kubectl, so I'm not sure how a user would intuit this behavior. My point is that if convergence fails, the deployment tool should not indicate a successful deploy. |
Yes, it's a separate step/plugin. |
that doesn't sound like it will address the discussion we've been having above. |
@tonglil, @balser and I talked about this. I'd like to implement optional parameters to this plugin to do Are you working on something that contradicts this? |
Sorry @jrynyt didn't see this until now. Check in with @chuhlomin, he did this recently (minus the I am ok with this, as long as the user is aware that if they have multiple Deployment resources it will only watch one (unless the implementation infers/accepts multiple). Last I checked, With the pipeline design of Drone 0.5+, I was thinking that checking for rollout status can be done in a following step, and the user can choose to watch the rollout of multiple resources (eg n Deployments, m DaemonSets, and i StatefulSets) like: wait:
image: tonglil/auth-gke
environment:
- PROJECT=xyz
- ZONE=abc
- CLUSTER=cluster
secrets:
- source: GCP_JSON_KEY
target: TOKEN
commands:
- auth-gke
- kubectl rollout status deploy/xxx
- kubectl rollout status daemonset/yyy
- kubectl rollout status statefulset/zzz |
Hi, that's right, I've implemented optional rollout check with option timeout for this: develop...chuhlomin:develop
Example output:
I didn't think about deamonset or statefulset, but it would be easy to add this functionality. |
@chuhlomin that's great -- can you open a PR and add team/deliveryengineering as reviewers? |
Done, but I cannot set reviewers. |
Closing. Please create a new issue for additional features (such as |
Ideally
kubectl apply
would have something like a--wait
option, so you know the actual rollout of Pods (etc) completed successfully, but it doesn't. So the success of adeploy
here doesn't actually indicate the deploy succeeded, as the rollout happens asynchronously.We could use
kubectl rollout status
after thekubectl apply
, which blocks on deployment completion. It looks like you can even use-f
to track all the resources in the config file.The text was updated successfully, but these errors were encountered: