1

Using OpenShift Origin (v3.9.0). How do I set the quality of service (QoS) tier of a pod. Specifically, what yaml key path do I use to specify this value in a DeploymentConfig yaml template?

There is endless docs describing and viewing QoS settings but literally nothing to actually specify it in a config file:

https://github.com/openshift/openshift-docs/blob/master/dev_guide/compute_resources.adoc#quality-of-service-tiers

# Example yaml template..so where do I specify QoS settings in here?
- kind: DeploymentConfig
  apiVersion: v1
  metadata:
    name: ${NAME}
  spec:
    strategy:
      type: Rolling
    triggers:
      - type: ConfigChange
    replicas: 3
    selector:
      name: ${NAME}
    template:
      metadata:
        labels:
          name: ${NAME}
      spec:
        securityContext:
          runAsUser: 1000
        containers:
        - env:
          image: ${IMAGE}
...

Most importantly where can I get a full description of the DeploymentConfig schema? I want to see every single possible key available and all default values when optional settings are left out.

Alex Ethier
  • 497
  • 2
  • 7
  • 18

2 Answers2

2

Quotas and Limitranges are what you're looking for. The "QoS-Settings" are nothing you put into the DeploymentConfig-Part of a template - it is part of the configuration of the project you're running your deployments in. I'd refer to the OpenShift Documentation for this. This is also really helpful

Regarding all available keys for the DeploymentConfig object, I'd also refer to the OpenShift Documentation regarding the Object Schema.

John
  • 111
  • 5
  • [Overcommitting](https://docs.openshift.com/container-platform/3.9/admin_guide/overcommit.html#qos-classes) states that each pod can be assigned one of three different QoS classes which is what I want to do. And this assignment is determined by the project the pod is in? So I need to edit my project in a way where any pods spawned in that namespace will automatically have the QoS class attached? If I'm understanding it correctly [Quotas](https://docs.openshift.com/container-platform/3.9/dev_guide/compute_resources.html) is for limiting the number of pods spawned with a particular QoS. – Alex Ethier Feb 06 '19 at 20:43
  • I think I understand it now. The section on [limits](https://docs.openshift.com/container-platform/3.9/dev_guide/compute_resources.html#quality-of-service-tiers) says that I have to specify the limits of a container and then the QoS is a derived value based on the limits and the project's quotas. I was thrown off because I usually associate limits with the minimum required cpu/mem to run an application, not it's priority for eviction. Anyways, I will experiment with this but may need a different approach to make our critical pods have fewer evictions. – Alex Ethier Feb 06 '19 at 20:55
2

This SO post is the same question but for kubernetes. Missed it on my initial googling. The Kubernetes docs provides an exact step by step guide.

Alex Ethier
  • 497
  • 2
  • 7
  • 18