How can I check if a deploymentLike object doesn't have requests? #861
-
Hi! I've discovered kube-linter and it's a really helpful tool and awesome. I've been trying to configure a custom check to ensure my deploymentLike objects have requests set. I just want to check if a deploymentLike object has set some requests for memory or CPU, regardless of its value and I don't want to check the limits. If the resource doesn't have requests a message should be shown. I've tried to use a custom-check like this:
(I have tried the same for CPU with the corresponding template, this is just an example to put you in context) With these checks the output of a lint is always an output like the following: Also, I tried to use the default check "unset-memory-requirements" but the result is the same and it also checks for the limits. If someone could help me clarify this doubt or let me know if this behavior I'm trying to add it's possible I would appreciate it 😄 Thanks in advance !! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Nevermind, after some tests I've realized that if you set just the upperBoundMB, that fits in my use case 😄 |
Beta Was this translation helpful? Give feedback.
Nevermind, after some tests I've realized that if you set just the upperBoundMB, that fits in my use case 😄