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

Tigera-operator helm chart unable to set csiNodeDriverDaemonSet resource memory/cpu requests & limits #8853

Closed
mashiofu-cafex opened this issue May 22, 2024 · 4 comments
Labels
area/operator good first issue Good for first-time contributors looking to learn about Calico impact/high kind/bug likelihood/low

Comments

@mashiofu-cafex
Copy link

I am unable to add resource limits/requests in my K8s cluster for csi-node-driver pods

Please see my config in my values.yaml file:

    csiNodeDriverDaemonSet: #Currently an issue and PR open to allow these values to be supported - https://github.com/projectcalico/calico/issues/8400
        spec:
            template:
                spec:
                    containers:
                    - name: csi-node-driver
                      resources:
                        limits:
                            memory: 100Mi
                        requests:
                            cpu: 75m

I am using projectcalico/tigera-operator v3.28.0 helm chart.

Expected Behavior

When helm installing/upgrading for csiNodeDriverDaemonSet resource limits & request, the pods and daemonset should be configured afterwards.

Current Behavior

Helm detects the change but the change is not configured, when running helm upgrade:

Comparing release=calico, chart=projectcalico/tigera-operator
tigera-operator, default, Installation (operator.tigera.io) has changed:
...
+   csiNodeDriverDaemonSet:
+     spec:
+       template:
+         spec:
+           containers:
+           - name: csi-node-driver
+             resources:
+               limits:
+                 memory: 100Mi
+               requests:
+                 cpu: 75m
    imagePullSecrets: []
...

Affected releases are:
  calico (projectcalico/tigera-operator) UPDATED

Do you really want to apply?
  Helmfile will apply all your changes, as shown above.

 [y/n]: y
Upgrading release=calico, chart=projectcalico/tigera-operator
Release "calico" has been upgraded. Happy Helming!
NAME: calico
LAST DEPLOYED: Wed May 22 18:08:40 2024
NAMESPACE: tigera-operator
STATUS: deployed
REVISION: 13
TEST SUITE: None

Listing releases matching ^calico$
calico  tigera-operator 13              2024-05-22 18:08:40.510076 -0500 CDT    deployed        tigera-operator-v3.28.0 v3.28.0    

UPDATED RELEASES:
NAME     CHART                           VERSION   DURATION
calico   projectcalico/tigera-operator   v3.28.0        50s

Yet after this is applied, the csiNodeDriver daemonSet & pods resource values are still not configured. Unfortunately, there are no errors in the logs indicating where the issue can be occurring.

There has been a couple of similar issues/PRs that claim this issue has been resolved, here are a couple:

@matthewdupre matthewdupre added kind/bug area/operator good first issue Good for first-time contributors looking to learn about Calico labels Jun 4, 2024
@mashiofu-cafex
Copy link
Author

To add a bit more context, tried both suggested containers names according to the docs (calico-csi or csi-node-driver-registrar) with helm but both give the error suggestions the support value is csi-node-driver"

Error: UPGRADE FAILED: release calico failed, and has been rolled back due to atomic being set: cannot patch "default" with kind Installation: Installation.operator.tigera.io "default" is invalid: spec.csiNodeDriverDaemonSet.spec.template.spec.containers[0].name: Unsupported value: "calico-csi": supported values: "csi-node-driver"

Error: UPGRADE FAILED: release calico failed, and has been rolled back due to atomic being set: cannot patch "default" with kind Installation: Installation.operator.tigera.io "default" is invalid: spec.csiNodeDriverDaemonSet.spec.template.spec.containers[0].name: Unsupported value: "csi-node-driver-registrar": supported values: "csi-node-driver"

@caseydavenport
Copy link
Member

I think we'll probably want logs from the tigera/operator pod to better understand if it is hitting an error applying the changes.

Additionally, output from kubectl get tigerastatus -o yaml might be helpful.

@caseydavenport
Copy link
Member

@mashiofu-cafex actually, I think you are hitting this bug: #8883

The CustomResourceDefinitions included in the helm chart failed to get updated for v3.28.

You might try manually updating the CRD to the correct one and reapplying your changes.

kubectl replace -f https://raw.githubusercontent.com/tigera/operator/v1.34.0/pkg/crds/operator/operator.tigera.io_installations.yaml

@mashiofu-cafex
Copy link
Author

Yes, I agree that we are hitting that bug. I will close this ticket for now and monitor #8883

@mashiofu-cafex mashiofu-cafex reopened this Jun 7, 2024
@mashiofu-cafex mashiofu-cafex closed this as not planned Won't fix, can't repro, duplicate, stale Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/operator good first issue Good for first-time contributors looking to learn about Calico impact/high kind/bug likelihood/low
Projects
None yet
Development

No branches or pull requests

3 participants