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

resource quota in tenant namespace is failing because of initcontainer for the log pod #1287

Closed
vjvel opened this issue Sep 14, 2022 · 6 comments
Assignees

Comments

@vjvel
Copy link

vjvel commented Sep 14, 2022

We are using latest minio image docker pull minio/minio:RELEASE.2022-09-07T22-25-02Z and latest minio-operator v4.3.7

we have enabled quota for the minio tenant namespace.

Getting the below error, Initcontainer for this pod minio-log is not having resource (limit/request). in tenant only having option to set resource request limits for the log container not the initcontainer.

Warning  FailedCreate      6m50s (x34 over 22m)  statefulset-controller  create Pod prod-minio-log-0 in StatefulSet prod-minio-log failed error: pods "prod-minio-log-0" is forbidden: failed quota: minio-quota: must specify limits.cpu,limits.memory,requests.cpu,requests.memory

can you please update the resource option for init container or update by default ?

@vjvel vjvel changed the title resource quota in tenant namespace is failing because of initcontainer for the log resource quota in tenant namespace is failing because of initcontainer for the log pod Sep 14, 2022
@dvaldivia
Copy link
Collaborator

What version of kubernetes are you using? where did you specify the quota? did you create it yourself?

@vjvel
Copy link
Author

vjvel commented Sep 14, 2022

What version of kubernetes are you using? where did you specify the quota? did you create it yourself?
1.21
namespace where the tenant has created.

apiVersion: v1
kind: ResourceQuota
metadata:
  name: minio-quota
  namespace: preprod-minio
spec:
  hard:
    requests.cpu: "8"
    requests.memory: 16Gi
    limits.cpu: "10"
    limits.memory: 20Gi
    pods: "12"
    replicationcontrollers: "10"

if container or init container has no resource request/limit is assigned its not allowed to create it in the namespace. I don't see any option to provide resource for the initcontainer for the log pod.. In tenant I can add resource for the main container only.. If we have this limits or request for this initContainer it will work..

All other pods were started for the minio(it has the request/limits)

@stale
Copy link

stale bot commented Dec 24, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.

@allanrogerr
Copy link
Contributor

In minio operator version 5.0.13, containers minio, sidecar and validate-arguments (init) have entries for resources: {}. This is resolved.

@rajasekharbh
Copy link

rajasekharbh commented Aug 10, 2024

with the operator helm charts(5.0.13 or 6.0.1) the sidecar and validate-arguments containers are getting resource empty and values.yaml doesn't have the resources set for the init and sidecar. if we don't set the values validation webhook is not allowing to create the pod.

warning FailedCreate 20s (x17 over 5m49s) statefulset-controller create Pod myminio-tenant-pool-0-0 in StatefulSet myminio-tenant-pool-0-0 failed
error: admission webhook "validating-webhook.openpolicyagent.org" denied the request:
   the pod "myminio-tenant-pool-0-0", in namespace "minio-tenant", did not specify cpu limits resources,
   the pod "myminio-tenant-pool-0-0", in namespace "minio-tenant", did not specify cpu requests,
   the pod "myminio-tenant-pool-0-0", in namespace: "minio-tenant", did not specify memory limits resources,
   the pod "myminio-tenant-pool-0-0", in namespace: "monio-tenant", did not specify memory request resources.

https://github.com/minio/operator/blob/v5.0.13/helm/operator/values.yaml

if we set the resourcequota at namespace level, we are getting below error.

Warning FailedCreate 100s (x17 over 7m8s) statefulset-controller create Pod myminio-tenant-pool-0-0 in StatefulSet myminio-pool-0 failed
error: pod "myminio-tenant-pool-0-0" is forbidden:
  failed quots: minio-quota: must specify limits.cpu for : sidecar,validate-arguments;
  limits,memory for : sidecar,validat-arguments;
  requests,cpu for sidecar,validate-arguments;
  requestss,memory for: sidecar,validat-arguments

can you please check this error.

@rajasekharbh
Copy link

@triage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants