Giter Site home page Giter Site logo

Comments (9)

cwlbraa avatar cwlbraa commented on July 16, 2024 3

Maybe there is a way we can have the migrator task check if the istio-proxy sidecar container exists and iff it exists wait for it to become healthy.

Alternatively, it could retry-until-short-timeout to log in to the database, regardless of what errors it sees when it's trying to connect. That behavior would be correct and istio-agnostic.

from capi-k8s-release.

matt-royal avatar matt-royal commented on July 16, 2024 1

I have a branch that replaces the istio-specific logic with generic logic that waits for a DB connection to be available before running the migrations. However, it looks like we still need to explicitly kill the istio sidecar as part of the job, as the istio-proxy is still running after the run-migrations container completed. Is this expected?

from capi-k8s-release.

cf-gitbot avatar cf-gitbot commented on July 16, 2024

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/175367511

The labels on this github issue will be updated when the story is started.

from capi-k8s-release.

tcdowney avatar tcdowney commented on July 16, 2024

@mike1808 based on the concerns on the Istio issue around this using undocumented aspects of the Kubernetes Pod start-up process are you confident that Istio will be able to maintain this behavior?

I always considered their "fix" here to be less of a fix and more of a best-effort mitigation. I'm worried that across Istio upgrades (y'all test this so it's probably less risky) and Kubernetes versions this behavior might change and we'll have to add the check back in.

Maybe there is a way we can have the migrator task check if the istio-proxy sidecar container exists and iff it exists wait for it to become healthy.

from capi-k8s-release.

tcdowney avatar tcdowney commented on July 16, 2024

Yeah, that's a better idea!

from capi-k8s-release.

mike1808 avatar mike1808 commented on July 16, 2024

Currently, this issues blocks @cloudfoundry/cf-for-k8s-networking team from merging Contour work to develop in cf-for-k8s.

from capi-k8s-release.

matt-royal avatar matt-royal commented on July 16, 2024

Maybe there is a way we can have the migrator task check if the istio-proxy sidecar container exists and iff it exists wait for it to become healthy.

Alternatively, it could retry-until-short-timeout to log in to the database, regardless of what errors it sees when it's trying to connect. That behavior would be correct and istio-agnostic.

One simple way to do this: make a new rake task that spins until it can connect to the DB (and may eventually time out). The ccdb migrate job can then run rake spin-until-db-connects EXISTING_RAKE_TASKS

from capi-k8s-release.

tcdowney avatar tcdowney commented on July 16, 2024

Yeah, unfortunately for Jobs you have to explicitly kill it with that /quitquitquit endpoint. The hope is that this can be confused if/when Kubernetes ever gets something like first-class Sidecar containers (kubernetes/enhancements#753), but right now it's kinda rough.

This Istio issue talks more about it:
istio/istio#11659

from capi-k8s-release.

tcdowney avatar tcdowney commented on July 16, 2024

This is fixed now on the latest cf-for-k8s main. See:

Thanks for reporting this @mike1808 ! 🙂

from capi-k8s-release.

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.