Code Monkey home page Code Monkey logo

Comments (7)

ardikabs avatar ardikabs commented on June 12, 2024 1

yeah, that is the user being explicit, if the user sets both replica and hpa, they will encounter the battle of the controllers, we can flag it, but its legal in k8s today
we could add a note similar to this https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#migrating-deployments-and-statefulsets-to-horizontal-autoscaling
saying dont set replica if hpa is set

make sense, let me adjust it then

from gateway.

arkodg avatar arkodg commented on June 12, 2024 1

hi folks @arkodg @zirain , it looks like this issue is still happening, as I observed, it looks like because we are leveraging the Update API instead of Patch API in the infra-client code, below:

if updateChecker() {
specific.SetUID(current.GetUID())
if err := cli.Client.Update(ctx, specific); err != nil {
return fmt.Errorf("for Update: %w", err)
}
}

Therefore, I tried in my local to change with Patch API, it worked as expected. Should I re-open this issue, or create a new issue?

yes please open a new issue for this ....

from gateway.

ardikabs avatar ardikabs commented on June 12, 2024

if this is reasonable, I would like to work on this

from gateway.

arkodg avatar arkodg commented on June 12, 2024

looks like we've discussed this a while ago #703 (comment)
imo the fix here is to not set any default replica, which we are doing today, this code needs to be removed

Replicas: DefaultKubernetesDeploymentReplicas(),

from gateway.

ardikabs avatar ardikabs commented on June 12, 2024

imo the fix here is to not set any default replica, which we are doing today, this code needs to be removed

However @arkodg , it seems to me that unsetting the default replica only addresses the default value behavior, but when a user accidentally sets EnvoyProxy.spec.provider.kubernetes.envoyDeployment.replicas, it will still revert to its replica value, right? wdyt?

from gateway.

arkodg avatar arkodg commented on June 12, 2024

imo the fix here is to not set any default replica, which we are doing today, this code needs to be removed

However @arkodg , it seems to me that unsetting the default replica only addresses the default value behavior, but when a user accidentally sets EnvoyProxy.spec.provider.kubernetes.envoyDeployment.replicas, it will still revert to its replica value, right? wdyt?

yeah, that is the user being explicit, if the user sets both replica and hpa, they will encounter the battle of the controllers, we can flag it, but its legal in k8s today
we could add a note similar to this https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#migrating-deployments-and-statefulsets-to-horizontal-autoscaling
saying dont set replica if hpa is set

from gateway.

ardikabs avatar ardikabs commented on June 12, 2024

hi folks @arkodg @zirain , it looks like this issue is still happening, as I observed, it looks like because we are leveraging the Update API instead of Patch API in the infra-client code, below:

if updateChecker() {
specific.SetUID(current.GetUID())
if err := cli.Client.Update(ctx, specific); err != nil {
return fmt.Errorf("for Update: %w", err)
}
}

Therefore, I tried in my local to change with Patch API, it worked as expected. Should I re-open this issue, or create a new issue?

from gateway.

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.