Skip to content

Add ability to set tolerations and affinities on resources generated by Karmada resources #6197

@brandonrjacobs

Description

@brandonrjacobs

What would you like to be added:
I would like to add the ability to add add explicit tolerations and affinity blocks to the underlying resources for karmada when creating a CR.

Examples of said additions could look like the following:

spec:
  components:
    etcd:
      local:
        tolerations: 
        - effect: NoSchedule
          operator: Exists
        affinity: {} # Add affinity block here 
        imagePullPolicy: IfNotPresent
        imageRepository: registry.k8s.io/etcd
        imageTag: 3.5.16-0
        priorityClassName: system-node-critical
        replicas: 1
        resources: {}
        volumeData:
          volumeClaim:
            metadata:
              name: etcd-data
            spec:
              accessModes:
              - ReadWriteOnce
              resources:
                requests:
                  storage: 3Gi
    karmadaScheduler:
      imagePullPolicy: IfNotPresent
      imageRepository: docker.io/karmada/karmada-scheduler
      imageTag: v1.13.0
      priorityClassName: system-node-critical
      replicas: 1
      resources: {}
      tolerations: 
      - effect: NoSchedule
        operator: Exists
      affinity: {} # Add affinity block here 

Why is this needed:
In some environments, when installing the control plane we have specific taints / settings on our nodes that require adding additional settings. We could solve this by injecting mutatingwebhook policies but that seems like a lot of overhead for a simple ask of supporting traditional kubernetes resource fields.

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.

Type

No type

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions