Closed rberrelleza closed 4 years ago
Could we also remove the kustomize logic and keep the deploy action just a simple kubectl apply?
If there's nothing okteto special we should probably remove it in favor of using a standard action. what do you think?
@tullo what do you think about this changes? Would this break the way you use the action?
Could we also remove the kustomize logic and keep the deploy action just a simple kubectl apply?
If there's nothing okteto special we should probably remove it in favor of using a standard action. what do you think?
@rberrelleza we need it for completeness, at least you include the kubectl apply as part of the push action. The combined action should be:
@rberrelleza we need it for completeness, at least you include the kubectl apply as part of the push action. The combined action should be:
That flow looks a bit forced in my opinion, as it causes 2 deploys instead of one no?
I think we should support three different scenarios with the actions:
@pchico83 WDYT?
@rberrelleza for the second I would go with kubectl apply + push. Most of the time, kubectl apply does nothing because the manifest does not change. But I find it clearer to have a single way to build/push/update image tags in our actions. It is the main motivation behind okteto push
@tullo what do you think about this changes? Would this break the way you use the action?
I will have look at it tomorrow @rberrelleza need to figure out how the new image makes it into the manifest if kustomize goes away
I will have look at it tomorrow @rberrelleza need to figure out how the new image makes it into the manifest if kustomize goes away
@tullo okteto push
takes care of building the image , pushing it (using Okteto registry), and updating the deployment with the new image. It uses information in the okteto.yml file (or the --name param) to figure out which deployment and image to replace
@rberrelleza the push action is doing 3 things at once, maybe it should be renamed to CI/CD?
To get the current behaviour that allows to injects build-time arguments during image build time - how could this be done with the updated action?
Looking at https://github.com/okteto/okteto/blob/master/cmd/push.go#L135 there it could append optional build arguments as well. Is that an option for you?
@rberrelleza the push action is doing 3 things at once, maybe it should be renamed to CI/CD?
To get the current behaviour that allows to injects build-time arguments during image build time - how could this be done with the updated action?
Looking at https://github.com/okteto/okteto/blob/master/cmd/push.go#L135 there it could append optional build arguments as well. Is that an option for you?
@tullo Yes. Long term, the idea with the push action is for workflow authors to stop thinking in terms of individual steps, and instead think in terms of "I have code , and I want to run it in Okteto Cloud". Right now that involves build, push, update, deploy; later we want do more, like integrate with buildpacks, do smarter deploys, etc..
You make a good point with the buildargs. That is something that's not possible with the current version of okteto push (it is coming though). For now I'm going to close this PR, add the commands separately, but leave build and deploy as they are today (the only change will be in the auth model, since we are moving to a single login action instead of passing the token around).
Proposed changes:
You can see an example of how this would look like here: https://github.com/rberrelleza/actions-test/blob/42ab44b5e1a4b66e0190e3888a94f869dfa29c28/.github/workflows/main.yaml