# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

imagePullSecrets: []
serviceAccount: yunikorn-admin
hostNetwork: false

priorityClassName: ""

image:
  repository: apache/yunikorn
  tag: scheduler-latest
  pullPolicy: Always

pluginImage:
  repository: apache/yunikorn
  tag: scheduler-plugin-latest
  pullPolicy: Always

nodeSelector: {}
tolerations: []
affinity: {}

configuration: null    # deprecated; use queues.yaml in yunikornDefaults
operatorPlugins: null  # deprecated; use service.operatorPlugins in yunikornDefaults
placeHolderImage: null # deprecated; use service.placeholderImage in yunikornDefaults

admissionController:
  priorityClassName: ""
  image:
    repository: apache/yunikorn
    tag: admission-latest
    pullPolicy: Always
  replicaCount: 1
  serviceAccount: yunikorn-admission-controller
  hostNetwork: true
  resources:
    requests:
      cpu: 100m
      memory: 500Mi
    limits:
      cpu: 500m
      memory: 500Mi
  goMemoryLimit: 200MiB
  goGC: 100
  nodeSelector: {}
  tolerations: []
  affinity: {}
  service:
    type: ClusterIP
  processNamespaces: null # deprecated; use admissionController.filtering.processNamespaces in yunikornDefaults
  bypassNamespaces: null  # deprecated; use admissionController.filtering.bypassNamespaces in yunikornDefaults
  labelNamespaces: null   # deprecated; use admissionController.filtering.labelNamespaces in yunikornDefaults
  noLabelNamespaces: null # deprecated; use admissionController.filtering.noLabelNamespaces in yunikornDefaults
  podLabels: {}
  podAnnotations: {}

web:
  image:
    repository: apache/yunikorn
    tag: web-latest
    pullPolicy: Always
  resources:
    requests:
      cpu: 100m
      memory: 100Mi
    limits:
      cpu: 200m
      memory: 500Mi
  goMemoryLimit: 200MiB
  goGC: 100

service:
  type: ClusterIP
  port: 9080
  portWeb: 9889

ingress:
  enabled: false
  ingressClassName: ""
  annotations: {}
  hosts:
    - host: chart-example.local
      paths: []
  pathType: Prefix
  tls: []

resources:
  requests:
    cpu: 200m
    memory: 1Gi
  limits:
    cpu: 4
    memory: 2Gi

# Go memory limit (GOMEMLIMIT) for the scheduler. This should be updated in tandem with
# resources.limits.memory to avoid OOMKilled scenarios.
goMemoryLimit: 1536MiB

# Go garbage-collection threshold (GOGC) as a percentage of freshly allocated data to
# live data remaining after the previous GC.
goGC: 100

# Bootstrap configuration for YuniKorn - will be rendered into yunikorn-defaults ConfigMap.
# Any valid options for YuniKorn may be specified here.
# Example:
# yunikornDefaults:
#   service.placeholderImage: registry.k8s.io/pause:3.7
#
yunikornDefaults: {}

# When this flag is true, the admission controller will be installed along with the scheduler.
# When this flag is false, the admission controller will not be installed.
# Once the admission controller is installed, all traffic will be routing to yunikorn.
embedAdmissionController: true

# When this flag is true, the scheduler will be deployed as Kubernetes scheduler plugin.
# When this flag is false, the scheduler will be deployed as a standalone scheduler.
enableSchedulerPlugin: false

# When this flag is true, the web service will be deployed.
# When this flag is false, the web service will not be deployed.
enableWebService: true

podLabels: {}
podAnnotations: {}
podSecurityContext: {}
schedulerSecurityContext: {}
webSecurityContext: {}
admissionPodSecurityContext: {}
admissionContainerSecurityContext: {}
