Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add CcTolerations field to support custom tolerations in ds #511

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rayanebel
Copy link

@rayanebel rayanebel commented Mar 5, 2025

Description

👋 Team,

In our infrastructure, we need to configure tolerations for each pod we deploy. Currently, there is no option to add tolerations to the underlying DaemonSets, which prevents us from deploying Confidential Containers.

Solution

The solution is straightforward: introduce a new field called ccTolerations, allowing us to specify custom tolerations within the DaemonSets.

apiVersion: confidentialcontainers.org/v1beta1
kind: CcRuntime
metadata:
  name: ccruntime
spec:
  ccNodeSelector:
    matchLabels:
      node.kubernetes.io/worker: ""
  ccTolerations:
  - effect: NoSchedule
    key: metal
    operator: Exists
  - effect: NoSchedule
    key: protocol
    value: test
    operator: Equal

I tested this solution in our cluster, and it works as expected.

NAME                             DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR                                    AGE
cc-operator-daemon-install       1         1         1       1            1           node.kubernetes.io/worker=""                     36m
cc-operator-daemon-uninstall     0         0         0       0            0           confidentialcontainers.org/startuninstall=true   62m
cc-operator-pre-install-daemon   1         1         1       1            1           node.kubernetes.io/worker=""                     62m
kubectl get ds cc-operator-pre-install-daemon -o yaml | yq '.spec.template.spec.tolerations'

- effect: NoSchedule
  key: metal
  operator: Exists
- effect: NoSchedule
  key: protocol
  operator: Equal
  value: test

@rayanebel rayanebel requested a review from a team as a code owner March 5, 2025 15:52
@rayanebel rayanebel force-pushed the feat/ds-tolerations branch from 0a33165 to 2eaea6a Compare March 5, 2025 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant