cert-manager-operator icon indicating copy to clipboard operation
cert-manager-operator copied to clipboard

possibility to configure the nodeSelector for the resources in the "cert-manager" namespace

Open ocpvkb opened this issue 1 year ago • 4 comments

The Operator (Pod) instantiates several pods in the (by RedHat hard-coded) namespace "cert-manager". (which will be also created by the Operator Pod) We need to schedule the resources in the "cert-manager" namespace, which are created and managed by the operator, on nodes of type/role "infra". According to the CRD, the deployments of resources can be adjusted using the CR “Cert Manager”. However, this is limited to ENV, labels, request+limits and Args of the containers. See: https://github.com/openshift/cert-manager-operator/blob/master/pkg/controller/deployment/deployment_overrides.go Please add the possibility to configure the nodeSelector for the resources in the "cert-manager" namespace.

ocpvkb avatar May 16 '24 12:05 ocpvkb

+, i want to schedule 3 components with toleration/nodeSelector like this:

  unsupportedConfigOverrides:
    cainjector:
      nodeSelector:
        node-role.kubernetes.io/infra: ''
      tolerations:
        - effect: NoSchedule
          key: node-role.kubernetes.io/infra
          operator: Exists
        - effect: NoExecute
          key: node-role.kubernetes.io/infra
          operator: Exists
    controller:
      nodeSelector:
        node-role.kubernetes.io/infra: ''
      tolerations:
        - effect: NoSchedule
          key: node-role.kubernetes.io/infra
          operator: Exists
        - effect: NoExecute
          key: node-role.kubernetes.io/infra
          operator: Exists
    webhook:
      nodeSelector:
        node-role.kubernetes.io/infra: ''
      tolerations:
        - effect: NoSchedule
          key: node-role.kubernetes.io/infra
          operator: Exists
        - effect: NoExecute
          key: node-role.kubernetes.io/infra
          operator: Exists

I want to do this, without label/annotate namespace kind;

@ocpvkb, tell me, I understood your idea correctly?

WAR-S avatar May 17 '24 10:05 WAR-S

Hello @WAR-S , thank you for your answer. Your suggestion could be a possible solution (besides setting the nodeSelector for the entire "cert-manager" namespace).

The keys “nodeSelector” and “tolerations” should then also be configurable independently of each other.

Whether this configuration is now correctly placed under the item "unsupportedConfigOverrides" can be debated, since "nodeSelector" and "olerations" certainly represent k8s-compliant definitions; far from "unsupported".... When I look at the possibilities of the operator, "overrideArgs" may be "better" suited.

https://github.com/openshift/cert-manager-operator/blob/master/pkg/controller/deployment/deployment_overrides.go https://github.com/openshift/cert-manager-operator/blob/master/deploy/examples/cluster-cert-manager-overrides.yaml

ocpvkb avatar May 17 '24 11:05 ocpvkb

But yes, you understood my idea correctly.

ocpvkb avatar Jun 13 '24 10:06 ocpvkb

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot avatar Sep 12 '24 01:09 openshift-bot

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten /remove-lifecycle stale

openshift-bot avatar Oct 12 '24 08:10 openshift-bot

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen. Mark the issue as fresh by commenting /remove-lifecycle rotten. Exclude this issue from closing again by commenting /lifecycle frozen.

/close

openshift-bot avatar Nov 12 '24 00:11 openshift-bot

@openshift-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen. Mark the issue as fresh by commenting /remove-lifecycle rotten. Exclude this issue from closing again by commenting /lifecycle frozen.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

openshift-ci[bot] avatar Nov 12 '24 00:11 openshift-ci[bot]

Seems to be supported now:

https://github.com/openshift/cert-manager-operator/commit/a270f62c2af94513012ff76ab057067cc735cd02

raelga avatar Jan 15 '25 10:01 raelga

@raelga: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

Our team also needs this feature, having the possibility to define tolerations for multi-arch nodes.

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

openshift-ci[bot] avatar Jan 15 '25 10:01 openshift-ci[bot]

Hi all, this feature has been added into cert-manager-operator v1.15.0, which is planned for release later this month.

lunarwhite avatar Jan 15 '25 10:01 lunarwhite

^ this is being tracked as a part of next release in https://issues.redhat.com/browse/CM-356.

swghosh avatar Jan 15 '25 11:01 swghosh