openshiftknative-serving

openshift knative-serving operator with quota's


I'm looking into the use of Redhat Openshift Serverless operator. We have an Openshift cluster which uses resource quota's in each namespace. I've installed the operator and setup the knative-serving namespace. Knative-serving operator is set up where we have user-container, queue-proxy, and webhooks defined under the resources. Now when I start a service in another namespace using the following yaml file:

apiVersion: serving.kanative.dev/v1
kind: Service
metadata:
  name: helloworld-python
  namespace: test
spec:
  template:
    spec:
      containers:
      -image: test/helloworld-python:latest
       resources:
         limits:
           cpu: 100m
           memory: 50Mi
         requests:
           cpu: 100m
           memory: 50Mi
       env:
         - name: TARGET
           value: "Python Sample v1"

This however fails with the error: Error creating: pods is forbidden: failed quota: compute-resources: must specify limits.memory, requests.memory

Can any of you point me in the right direction to get this working?


Regards


Solution

  • I guess it's failing because the queue-proxy isn't getting the necessary memory settings set. You can do that globally via the Knative Serving config. The values I've chosen here are just placeholders.

    apiVersion: operator.knative.dev/v1alpha1
    kind: KnativeServing
    metadata:
      name: knative-serving
    spec:
      config:
        deployment:
          queueSidecarMemoryRequest: "100Mi"
          queueSidecarMemoryLimit: "300Mi"