An Interest In:
Web News this Week
- April 2, 2024
- April 1, 2024
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
Okteto-pipelines - when you need control over your okteto
Okteto Pipelines add functionality over okteto.yaml
. It is useful in the following use-cases:
- allow configuration of how ones' Git repositories get deployed to Okteto.
- to deploy artefacts when Okteto Cloud cannot detect how to deploy your application from your deployment manifests
- when one needs more control over how application gets deployed.
okteto-pipeline.yaml
can refer to individual okteto.yaml
files through relative paths leading to modularity and decoupled control over individual microservices.
# Example
Consider the following structure
ms-app backend Dockerfile deployment.yaml okteto.yaml src app.py frontend Dockerfile okteto.yaml src app.html app.js okteto-pipeline.yaml
To work with frontend
and backend
use the individual okteto.yaml
(okteto { build | deploy | up | down } -f *end/okteto.yaml
)
To deal with ms-app
as a whole refer to okteto-pipeline.yaml
cat okteto-pipeline.yamlicon: https://www.icon-url-addr/icon.pngdeploy: - okteto build -t ashoka007/ms-app-backend:${OKTETO_GIT_COMMIT} backend - okteto build -t ashoka007/ms-app-frontend:${OKTETO_GIT_COMMIT} frontend # assume backend/deployment.yaml has updated image tag - kubectl apply -f backend/deplyment.yaml # assume frontend is already deployed and only image tag needs update - kubectl set image deployment/frontend-dep ms-app-frontend=ashoka007/ms-app-backend:${OKTETO_GIT_COMMIT} devs: - backend/okteto.yml - frontend/okteto.yml
# Note
Okteto will run an installation job that clones your Git repository, checks out the selected branch, and executes the sequence of deploy
commands. The job will fail if any of the commands in the deploy
list fails.
# More info
There are a number of environment variables (like OKTETO_GIT_COMMIT
referred above). Check the documentation for details
Original Link: https://dev.to/ashokan/okteto-pipelines-when-you-need-control-over-your-okteto-4fk
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To