Giter VIP home page Giter VIP logo

Comments (5)

shahidhk avatar shahidhk commented on August 23, 2024 1

@scottrobertson Another way to solve this issue is to make the controller watch all the deployments that it is responsible for and when the image key changes (say from a kubectl apply), it goes and patch the deployment with latest build tag.

Now, controller will need to track that latest build tag, which can be done by adding a new key to the Remote's status.

from gitkube.

scottrobertson avatar scottrobertson commented on August 23, 2024

One horrible hacky way would be to tag latest too and just have that in the deployment.yaml as the image, so when i run kubectl apply it does not change which image is deployed.

from gitkube.

shahidhk avatar shahidhk commented on August 23, 2024

@scottrobertson You're just in time with this question. We just released v0.2.0 and it supports such workflows.

You can set

  manifests:
    path: k8s

in your Remote Spec and when you push to the remote now, all kubernetes yaml files in k8s directory of your git repo will be kubectl apply-ed.

So, if you want to update a deployment, make the change, commit and push and gitkube will take care of building and setting the right image.

You can find more details about manifests in the docs.

To update the existing gitkube installation to v0.2.0:

kubectl -n kube-system set image deployment/gitkubed sshd=hasura/gitkubed:v0.2.0
kubectl -n kube-system set image deployment/gitkube-controller controller=hasura/gitkube-controller:v0.2.0

from gitkube.

scottrobertson avatar scottrobertson commented on August 23, 2024

That looks awesome thanks! It will work really nicely for most of my projects 👍

However, for some projects it wont work (specifically open source projects that i do not want to push Kubernetes configs to). I will have to try and think of a way around this without having to copy the image every time i want to update things.

from gitkube.

shahidhk avatar shahidhk commented on August 23, 2024

k8s conf is kept separate from code and you need to update the conf, right?

A kubectl apply flag that can ignore certain fields (image) would have been awesome.

from gitkube.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.