Skip to content

Make it easy to have masters be schedulable #763

Closed

Description

@cgwalters

https://github.com/openshift/installer/blob/0f5ab04c23339842d58ac6a1ad1923954197b997/docs/user/customization.md#control-plane-with-no-taints
is very problematic because it encourages users to copy (fork) our systemd unit for kubelet which is going to be unsustainable.

Further, it encourages creating Ignition configs that override earlier ones and that's a hard fail in Ignition spec 3.

I see two fixes:

  1. Have /etc/kubernetes/kubelet.d which would be a drop-in directory for kubelet args (todo: I'd be surprised if this doesn't exist)
  2. Add a mastersSchedulable boolean to our existing KubeletConfig CRD

Maybe something else?

Activity

  1. cgwalters commented on May 15, 2019

    @cgwalters
    MemberAuthor
  2. runcom commented on May 15, 2019

    @runcom
    Member
    1. Have /etc/kubernetes/kubelet.d which would be a drop-in directory for kubelet args (todo: I'd be surprised if this doesn't exist)

    this is what I would prefer as a general rule on how to approach these issues let's say. Been discussing this approach lengthy with Luca and CRI-O (for example) is also going to do that

  3. derekwaynecarr commented on May 16, 2019

    @derekwaynecarr
    Member

    the issue with drop in is there is a tension with apiserver driven node config (which is not widely adopted for a few reasons) and file based config. to drop-in support, i think we would need to make upstream changes.

  4. stbenjam commented on Jun 11, 2019

    @stbenjam
    Contributor

    What would an ETA on something like this being available? We would like to get to the point relatively soon where we can contribute the baremetal IPI platform experimentally to openshift/installer and start decommissioning our fork, but to do that we need to have the NoSchedule taint removed until we have workers deployed during the install.

    Would it be ok to temporarily override the kubelet config until this issue is resolved?

  5. cgwalters commented on Jun 12, 2019

    @cgwalters
    MemberAuthor

    Or maybe add a scheduleable bool in the control plane config ?

    Or just add a new config object for this?

  6. cgwalters commented on Jun 12, 2019

    @cgwalters
    MemberAuthor

    Would it be ok to temporarily override the kubelet config until this issue is resolved?

    Yeah, definitely. But we will fix this in a better way, just have decide on the path.

  7. eparis commented on Jun 12, 2019

    @eparis
    Member

    Or maybe add a scheduleable bool in the control plane config ?

    I talked a bit with @deads2k about the idea of making the master taint itself configurable. He was quite hesistant to agree that taint management belonged in the master bits.

    So we talked out a generic declarative mechanism for labeling and tainting sets of machines. Which could not only solve the 'make masters schedulable' problem, but would also allow users to manage labels and taints on nodes generically.

    I decided to PoC such an implementation in #845

    We can decide that a generic mechanism to declaratively manage labels and taints is a bad idea, or that it should be solved a completely different way. But there seemed to be a strong fight against doing something targeted only at the master taints.

  8. cgwalters commented on Jun 12, 2019

    @cgwalters
    MemberAuthor

    I happened to stumble across roles in the GCP provider which looks related too.

  9. cgwalters commented on Jun 12, 2019

    @cgwalters
    MemberAuthor

    But there seemed to be a strong fight against doing something targeted only at the master taints.

    Understandable. But, here's an (IMO) elegant and easy solution for just that (inspired by the above GCP bit) - have the MCD have a tiny bit of code that detects the case where a node has both node-role.kubernetes.io/master: "" node-role.kubernetes.io/worker: "" and automatically removes the taint. (And readds it if master is present but not worker).

  10. cgwalters commented on Jun 12, 2019

    @cgwalters
    MemberAuthor

    PR for ⬆️ in #849

  11. eparis commented on Jun 14, 2019

    @eparis
    Member

    I got @smarterclayton @derekwaynecarr and @deads2k into a room yesterday to argue. There seemed to be agreement that the idea of a generic label/taint reconciliation concept was good, but was ahead of it's time. Derek strongly wanted to, instead, do something specific around master's schedulability.

    After we all agreed to move away to that path the question came up how to represent the fact that masters should be allowed to run workloads. The general agreement was that the scheduler top level config object should get such a field. And the scheduler operator should then reconcile the taint on nodes labeled "master" based on this top level config.

    @blomquisg took the action item to get a jira ticket onto the scheduler team and for them to implement both the top level config and the taint reconciler based on that config.

    I'm going to close my generic label/taint reconciler PR. And I think it would be best for us to close #849 as well. The MCO team should not change any templates or anything to solve this problem. New maters should come up with the taint and the reconciler will remove it if needed.

  12. 2 remaining items

  13. soltysh commented on Jun 26, 2019

    @soltysh
    Contributor

    I agree with what @blomquisg said in the previous comment, if we're trying to prove this is only for baremetal operator, let's make it here for now. If it turns out that @eparis more generic solution is needed we'll go that path.
    The fact we're trying to push scheduler operator to own this part seems weird, since it's sole purpose is to look after scheduler and make sure it's configuration is legit. It will use that information, but it is not meant for producing that information.

  14. ravisantoshgudimetla commented on Jun 26, 2019

    @ravisantoshgudimetla
    Contributor

    I agree with what @blomquisg and @soltysh said. Just to elaborate on what they said. The scope of the kube-scheduler-operator has been to get scheduler up and running and make sure scheduler react to its config changes. The config here refers to the scheduler configuration like disablePreemption etc that are scheduler specific knobs but it is never supposed to update node/pod objects so that scheduling decisions are influenced. The individual operators are responsible for updating the node and pod objects so that scheduler will place the pods onto nodes depending on the changes that are being made for those objects.

  15. cgwalters commented on Jun 26, 2019

    @cgwalters
    MemberAuthor

    We have to do something here. The code has to live somewhere with people working on it. While we have diced up the platform into a lot of smaller git repositories - for good reasons - we need to deal with "cross domain" problems.

    In this case the architects made a decision here - I don't think you're adding new arguments but we can let them comment.

    From my PoV...I would be OK carrying the MCD PR here - the role of the scheduler flag then could be just adding the worker label to the master node objects if we choose that path. If we want to have the functionality more fully integrated in the MCO that'd need some design for what the more user-facing way to do this is.

    if we're trying to prove this is only for baremetal operator,

    No, this is also relevant for CodeReady containers (single node OpenShift).

  16. ravisantoshgudimetla commented on Jun 26, 2019

    @ravisantoshgudimetla
    Contributor

    We have to do something here. The code has to live somewhere with people working on it. While we have diced up the platform into a lot of smaller git repositories - for good reasons - we need to deal with "cross domain" problems.

    I completely agree. I am not denying that we should have code somewhere but where is the question.

    In this case the architects made a decision here - I don't think you're adding new arguments but we can let them comment.

    From my PoV...I would be OK carrying the MCD PR here - the role of the scheduler flag then could be just adding the worker label to the master node objects if we choose that path. If we want to have the functionality more fully integrated in the MCO that'd need some design for what the more user-facing way to do this is.

    Tbh, that sounds reasonable to me. I have few other use-cases in my mind that can actually benefit from exposing/reconciling the information of labels/taints on the node but I think it might be outside the scope of the MCD but let's discuss if we decide to go ahead with this approach

  17. cgwalters commented on Jun 26, 2019

    @cgwalters
    MemberAuthor

    but where is the question.

    My opinion is - you guys were tossed the ball, and that means the burden by default lies on you to come up with or argue for specific alternative plan(s) as opposed to effectively just saying "no".

  18. ravisantoshgudimetla commented on Jun 27, 2019

    @ravisantoshgudimetla
    Contributor

    I believe we proposed alternatives @soltysh suggested the logic to exist in baremetal operator and I suggested that what you already have in the closed PR at #849 LGTM :)

  19. cgwalters commented on Jun 27, 2019

    @cgwalters
    MemberAuthor

    OK here's my proposal:

    • Add to or extend a CR somewhere in openshift-config that has a bool scheduleableControlPlane or so...someone with more taste than me should strawman this
    • Apply daemon: Automatically sync master taint #849
    • Add another patch to the MCO (maybe node controller, maybe MCD directly) which watches that CR and updates the worker label on master nodes
    • Ensure the installer has support for toggling that CR field after the control plane comes up
    • installer toggles it on by default for bare metal (but supports disabling it?)
    • Drop the hack in MCO so masters are still tainted by default
  20. cgwalters commented on Jun 27, 2019

    @cgwalters
    MemberAuthor

    For reference, the relevant CRC code that followed the installer doc suggestion that motivated this issue.

  21. cgwalters commented on Jul 3, 2019

    @cgwalters
    MemberAuthor

    A lot of discussion on this. Current status seems to be that scheduler/workloads team adds an entry in their CRD that supports effectively turning this on/off, although it will be future-proofed as an "intOrString" type (to support e.g. 50%), but the scheduler will only accept on/off to start.

    MCO team would write the reconciler, which should probably live in the node controller. (If this was a simple on/off it could be in the MCD as before, but if we support partial then it's only the node controller that watches all nodes, and we also have to care about interaction with when we take the "otherwise schedulable" master down for updates)

    Other discussion is ongoing about the "day 1" aspect and how the installer woudl be changed, etc.

  22. ravisantoshgudimetla commented on Jul 8, 2019

    @ravisantoshgudimetla
    Contributor

    An update: We're still planning to have the reconciliation logic in MCC but the field to make masters schedulable in scheduler CR will be bool instead of intstr.

  23. added a commit that references this issue on May 15, 2026
    cbc009e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions