[bitnami/kuberay] feat: 🎉 Add chart (#21517)

* [bitnami/kuberay] feat: 🎉 Add chart

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>

* fix: 🚨 Add license header and vpa

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>

* fix: 🐛 Set service port in endpoint

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>

* chore: ✏️ Set proper appVersion

Signed-off-by: Javier J. Salmerón-García <jsalmeron@vmware.com>

* docs: 📝 Update README.md

Signed-off-by: Javier J. Salmerón-García <jsalmeron@vmware.com>

* chore: 🔧 Update runtime-parameters.yaml

Signed-off-by: Javier J. Salmerón-García <jsalmeron@vmware.com>

* fix: 🐛 Apply requested changes

Changes:
- docs: 📝 Adapt README.md to structure
- chore: 💡 Add raycluster origin
- fix: 🐛 Set correct reference to cluster in serviceAccount helper
- fix: 🐛 Set correct reference to cluster in service-account object
- chore: 🔥 Remove reference to updateStrategy in RayCluster
- fix: 🐛 Set proper reference in cluster SA imageRoot
- fix: 🐛 Add missing references to custom probes in RayCluster
- chore: 🔥 Remove non-existent head.replicaCount value
- fix: 🐛 Set correct reference in apiserver metrics
- fix: 🐛 Set correct reference in operator metrics
- fix: 🐛 Add missing ingress objects

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>

* docs: 🚨 Fix lint issue

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>

* fix: 🐛 Add missing references to watchNamespaces

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>

* chore: 🔥 Remove unused existingConfigmap helper reference

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>

* fix: 🐛 Set proper annotations for services when enabling metrics

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>

* test:  Set watchAllNamespaces to false

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>

* fix: 🐛 Add missing values for probes in head

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>

* fix: 🐛 Add missing enableBatchScheduler value

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>

---------

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>
Signed-off-by: Javier J. Salmerón-García <jsalmeron@vmware.com>
This commit is contained in:
Javier J. Salmerón-García
2023-12-14 11:52:07 +01:00
committed by GitHub
parent 6cbad4731f
commit 51e27b38aa
49 changed files with 52333 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

View File

@@ -0,0 +1,6 @@
dependencies:
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
version: 2.13.3
digest: sha256:9a971689db0c66ea95ac2e911c05014c2b96c6077c991131ff84f2982f88fb83
generated: "2023-10-25T05:55:48.853010235Z"

View File

@@ -0,0 +1,28 @@
# Copyright VMware, Inc.
# SPDX-License-Identifier: APACHE-2.0
annotations:
category: Infrastructure
licenses: Apache-2.0
apiVersion: v2
appVersion: 1.0.0
dependencies:
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
tags:
- bitnami-common
version: 2.x.x
description: KubeRay is a Kubernetes operator for deploying and management of Ray applications on Kubernetes using CustomResourceDefinitions.
home: https://bitnami.com
icon: https://bitnami.com/assets/stacks/kuberay/img/kuberay-stack-220x234.png
keywords:
- ray
- machine-learning
- kuberay
maintainers:
- name: VMware, Inc.
url: https://github.com/bitnami/charts
name: kuberay
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/kuberay
version: 0.1.0

570
bitnami/kuberay/README.md Normal file
View File

@@ -0,0 +1,570 @@
<!--- app-name: KubeRay -->
# KubeRay packaged by Bitnami
KubeRay is a Kubernetes operator for deploying and management of Ray applications on Kubernetes using CustomResourceDefinitions.
[Overview of KubeRay](https://www.ray.io/)
Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.
## TL;DR
```console
helm install my-release oci://registry-1.docker.io/bitnamicharts/kuberay
```
Looking to use KubeRay in production? Try [VMware Tanzu Application Catalog](https://bitnami.com/enterprise), the enterprise edition of Bitnami Application Catalog.
## Introduction
This chart bootstraps a [KubeRay](https://github.com/bitnami/containers/tree/main/bitnami/kuberay) deployment on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
Bitnami charts can be used with [Kubeapps](https://kubeapps.dev/) for deployment and management of Helm Charts in clusters.
## Prerequisites
- Kubernetes 1.23+
- Helm 3.8.0+
## Installing the Chart
To install the chart with the release name `my-release`:
```console
helm install my-release REGISTRY_NAME/REPOSITORY_NAME/kuberay
```
> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
The command deploys kuberay on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation.
> **Tip**: List all releases using `helm list`
## Uninstalling the Chart
To uninstall/delete the `my-release` deployment:
```console
helm delete my-release
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
## Parameters
### Global parameters
| Name | Description | Value |
| ------------------------- | ----------------------------------------------- | ----- |
| `global.imageRegistry` | Global Docker image registry | `""` |
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` |
| `global.storageClass` | Global StorageClass for Persistent Volume(s) | `""` |
### Common parameters
| Name | Description | Value |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------- |
| `kubeVersion` | Override Kubernetes version | `""` |
| `nameOverride` | String to partially override common.names.name | `""` |
| `fullnameOverride` | String to fully override common.names.fullname | `""` |
| `namespaceOverride` | String to fully override common.names.namespace | `""` |
| `commonLabels` | Labels to add to all deployed objects | `{}` |
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` |
| `clusterDomain` | Kubernetes cluster domain name | `cluster.local` |
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` |
| `diagnosticMode.enabled` | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | `false` |
| `diagnosticMode.command` | Command to override all containers in the deployment | `["sleep"]` |
| `diagnosticMode.args` | Args to override all containers in the deployment | `["infinity"]` |
| `rayImage.registry` | Ray registry | `REGISTRY_NAME` |
| `rayImage.repository` | Ray repository | `REPOSITORY_NAME/ray` |
| `rayImage.digest` | Kuberay Ray digest in the way sha256:aa.... Please note this parameter, if set, will override the tag image tag (immutable tags are recommended) | `""` |
| `rayImage.pullPolicy` | Kuberay Ray pull policy | `IfNotPresent` |
| `rayImage.pullSecrets` | Kuberay Ray pull secrets | `[]` |
| `rayImage.debug` | Enable Kuberay Ray debug mode | `false` |
### Kuberay Operator Parameters
| Name | Description | Value |
| ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| `operator.enabled` | Enable Kuberay Operator | `true` |
| `operator.image.registry` | Kuberay Operator image registry | `REGISTRY_NAME` |
| `operator.image.repository` | Kuberay Operator image repository | `REPOSITORY_NAME/kuberay-operator` |
| `operator.image.digest` | Kuberay Operator image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag image tag (immutable tags are recommended) | `""` |
| `operator.image.pullPolicy` | Kuberay Operator image pull policy | `IfNotPresent` |
| `operator.image.pullSecrets` | Kuberay Operator image pull secrets | `[]` |
| `operator.image.debug` | Enable Kuberay Operator image debug mode | `false` |
| `operator.replicaCount` | Number of Kuberay Operator replicas to deploy | `1` |
| `operator.containerPorts.metrics` | Kuberay Operator metrics container port | `8080` |
| `operator.containerPorts.health` | Kuberay Operator health container port | `8082` |
| `operator.livenessProbe.enabled` | Enable livenessProbe on Kuberay Operator containers | `true` |
| `operator.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `5` |
| `operator.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` |
| `operator.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` |
| `operator.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `5` |
| `operator.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
| `operator.readinessProbe.enabled` | Enable readinessProbe on Kuberay Operator containers | `true` |
| `operator.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `5` |
| `operator.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` |
| `operator.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `5` |
| `operator.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `5` |
| `operator.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
| `operator.startupProbe.enabled` | Enable startupProbe on Kuberay Operator containers | `false` |
| `operator.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `5` |
| `operator.startupProbe.periodSeconds` | Period seconds for startupProbe | `10` |
| `operator.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `5` |
| `operator.startupProbe.failureThreshold` | Failure threshold for startupProbe | `5` |
| `operator.startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
| `operator.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
| `operator.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
| `operator.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` |
| `operator.watchAllNamespaces` | Watch for KubeRay resources in all namespaces | `true` |
| `operator.watchNamespaces` | Watch for KubeRay resources in the given namespaces | `[]` |
| `operator.enableBatchScheduler` | Enable batch scheduler component | `false` |
| `operator.resources.limits` | The resources limits for the Kuberay Operator containers | `{}` |
| `operator.resources.requests` | The requested resources for the Kuberay Operator containers | `{}` |
| `operator.podSecurityContext.enabled` | Enabled Kuberay Operator pods' Security Context | `true` |
| `operator.podSecurityContext.fsGroup` | Set Kuberay Operator pod's Security Context fsGroup | `1001` |
| `operator.containerSecurityContext.enabled` | Enabled containers' Security Context | `true` |
| `operator.containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` |
| `operator.containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` |
| `operator.containerSecurityContext.privileged` | Set container's Security Context privileged | `false` |
| `operator.containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` |
| `operator.containerSecurityContext.allowPrivilegeEscalation` | Set container's Security Context allowPrivilegeEscalation | `false` |
| `operator.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` |
| `operator.containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` |
| `operator.command` | Override default container command (useful when using custom images) | `[]` |
| `operator.args` | Override default container args (useful when using custom images) | `[]` |
| `operator.hostAliases` | Kuberay Operator pods host aliases | `[]` |
| `operator.podLabels` | Extra labels for Kuberay Operator pods | `{}` |
| `operator.podAnnotations` | Annotations for Kuberay Operator pods | `{}` |
| `operator.podAffinityPreset` | Pod affinity preset. Ignored if `server.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `operator.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `server.affinity` is set. Allowed values: `soft` or `hard` | `soft` |
| `operator.pdb.create` | Enable/disable a Pod Disruption Budget creation | `false` |
| `operator.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `1` |
| `operator.pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable | `""` |
| `operator.nodeAffinityPreset.type` | Node affinity preset type. Ignored if `server.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `operator.nodeAffinityPreset.key` | Node label key to match. Ignored if `server.affinity` is set | `""` |
| `operator.nodeAffinityPreset.values` | Node label values to match. Ignored if `server.affinity` is set | `[]` |
| `operator.affinity` | Affinity for Kuberay Operator pods assignment | `{}` |
| `operator.nodeSelector` | Node labels for Kuberay Operator pods assignment | `{}` |
| `operator.tolerations` | Tolerations for Kuberay Operator pods assignment | `[]` |
| `operator.updateStrategy.type` | Kuberay Operator statefulset strategy type | `RollingUpdate` |
| `operator.priorityClassName` | Kuberay Operator pods' priorityClassName | `""` |
| `operator.topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `[]` |
| `operator.schedulerName` | Name of the k8s scheduler (other than default) for Kuberay Operator pods | `""` |
| `operator.terminationGracePeriodSeconds` | Seconds Redmine pod needs to terminate gracefully | `""` |
| `operator.lifecycleHooks` | for the Kuberay Operator container(s) to automate configuration before or after startup | `{}` |
| `operator.extraEnvVars` | Array with extra environment variables to add to Kuberay Operator nodes | `[]` |
| `operator.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for Kuberay Operator nodes | `""` |
| `operator.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for Kuberay Operator nodes | `""` |
| `operator.extraVolumes` | Optionally specify extra list of additional volumes for the Kuberay Operator pod(s) | `[]` |
| `operator.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Kuberay Operator container(s) | `[]` |
| `operator.sidecars` | Add additional sidecar containers to the Kuberay Operator pod(s) | `[]` |
| `operator.initContainers` | Add additional init containers to the Kuberay Operator pod(s) | `[]` |
| `operator.autoscaling.vpa.enabled` | Enable VPA | `false` |
| `operator.autoscaling.vpa.annotations` | Annotations for VPA resource | `{}` |
| `operator.autoscaling.vpa.controlledResources` | VPA List of resources that the vertical pod autoscaler can control. Defaults to cpu and memory | `[]` |
| `operator.autoscaling.vpa.maxAllowed` | VPA Max allowed resources for the pod | `{}` |
| `operator.autoscaling.vpa.minAllowed` | VPA Min allowed resources for the pod | `{}` |
| `operator.autoscaling.vpa.updatePolicy.updateMode` | Autoscaling update policy Specifies whether recommended updates are applied when a Pod is started and whether recommended updates are applied during the life of a Pod | `Auto` |
| `operator.autoscaling.hpa.enabled` | Enable autoscaling for operator | `false` |
| `operator.autoscaling.hpa.minReplicas` | Minimum number of operator replicas | `""` |
| `operator.autoscaling.hpa.maxReplicas` | Maximum number of operator replicas | `""` |
| `operator.autoscaling.hpa.targetCPU` | Target CPU utilization percentage | `""` |
| `operator.autoscaling.hpa.targetMemory` | Target Memory utilization percentage | `""` |
### Kuberay Operator Traffic Exposure Parameters
| Name | Description | Value |
| ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| `operator.service.type` | Kuberay Operator service type | `ClusterIP` |
| `operator.service.ports.metrics` | Kuberay Operator service HTTP port | `80` |
| `operator.service.nodePorts.metrics` | Node port for HTTP | `""` |
| `operator.service.clusterIP` | Kuberay Operator service Cluster IP | `""` |
| `operator.service.loadBalancerIP` | Kuberay Operator service Load Balancer IP | `""` |
| `operator.service.loadBalancerSourceRanges` | Kuberay Operator service Load Balancer sources | `[]` |
| `operator.service.externalTrafficPolicy` | Kuberay Operator service external traffic policy | `Cluster` |
| `operator.service.annotations` | Additional custom annotations for Kuberay Operator service | `{}` |
| `operator.service.extraPorts` | Extra ports to expose in Kuberay Operator service (normally used with the `sidecars` value) | `[]` |
| `operator.service.sessionAffinity` | Control where web requests go, to the same pod or round-robin | `None` |
| `operator.service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` |
| `operator.ingress.enabled` | Enable ingress record generation for Kuberay | `false` |
| `operator.ingress.pathType` | Ingress path type | `ImplementationSpecific` |
| `operator.ingress.apiVersion` | Force Ingress API version (automatically detected if not set) | `""` |
| `operator.ingress.hostname` | Default host for the ingress record | `kuberay-operator.local` |
| `operator.ingress.ingressClassName` | IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) | `""` |
| `operator.ingress.path` | Default path for the ingress record | `/` |
| `operator.ingress.annotations` | Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations. | `{}` |
| `operator.ingress.tls` | Enable TLS configuration for the host defined at `client.ingress.hostname` parameter | `false` |
| `operator.ingress.selfSigned` | Create a TLS secret for this ingress record using self-signed certificates generated by Helm | `false` |
| `operator.ingress.extraHosts` | An array with additional hostname(s) to be covered with the ingress record | `[]` |
| `operator.ingress.extraPaths` | An array with additional arbitrary paths that may need to be added to the ingress under the main host | `[]` |
| `operator.ingress.extraTls` | TLS configuration for additional hostname(s) to be covered with this ingress record | `[]` |
| `operator.ingress.secrets` | Custom TLS certificates as secrets | `[]` |
| `operator.ingress.extraRules` | Additional rules to be covered with this ingress record | `[]` |
### Kuberay Operator RBAC Parameters
| Name | Description | Value |
| ------------------------------------------------------ | ---------------------------------------------------------------- | ------ |
| `operator.rbac.create` | Specifies whether RBAC resources should be created | `true` |
| `operator.rbac.rules` | Custom RBAC rules to set | `[]` |
| `operator.serviceAccount.create` | Specifies whether a ServiceAccount should be created | `true` |
| `operator.serviceAccount.name` | The name of the ServiceAccount to use. | `""` |
| `operator.serviceAccount.annotations` | Additional Service Account annotations (evaluated as a template) | `{}` |
| `operator.serviceAccount.automountServiceAccountToken` | Automount service account token for the server service account | `true` |
### Kuberay Operator Metrics Parameters
| Name | Description | Value |
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ------- |
| `operator.metrics.enabled` | Enable the export of Prometheus metrics | `false` |
| `operator.metrics.annotations` | Annotations for the server service in order to scrape metrics | `{}` |
| `operator.metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` |
| `operator.metrics.serviceMonitor.namespace` | Namespace in which Prometheus is running | `""` |
| `operator.metrics.serviceMonitor.annotations` | Additional custom annotations for the ServiceMonitor | `{}` |
| `operator.metrics.serviceMonitor.labels` | Extra labels for the ServiceMonitor | `{}` |
| `operator.metrics.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in Prometheus | `""` |
| `operator.metrics.serviceMonitor.honorLabels` | honorLabels chooses the metric's labels on collisions with target labels | `false` |
| `operator.metrics.serviceMonitor.interval` | Interval at which metrics should be scraped. | `""` |
| `operator.metrics.serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended | `""` |
| `operator.metrics.serviceMonitor.metricRelabelings` | Specify additional relabeling of metrics | `[]` |
| `operator.metrics.serviceMonitor.relabelings` | Specify general relabeling | `[]` |
| `operator.metrics.serviceMonitor.selector` | Prometheus instance selector labels | `{}` |
### Kuberay API Server Parameters
| Name | Description | Value |
| ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
| `apiserver.enabled` | Enable Kuberay API Server | `true` |
| `apiserver.image.registry` | Kuberay API Server image registry | `REGISTRY_NAME` |
| `apiserver.image.repository` | Kuberay API Server image repository | `REPOSITORY_NAME/kuberay-apiserver` |
| `apiserver.image.digest` | Kuberay API Server image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag image tag (immutable tags are recommended) | `""` |
| `apiserver.image.pullPolicy` | Kuberay API Server image pull policy | `IfNotPresent` |
| `apiserver.image.pullSecrets` | Kuberay API Server image pull secrets | `[]` |
| `apiserver.image.debug` | Enable Kuberay API Server image debug mode | `false` |
| `apiserver.replicaCount` | Number of Kuberay API Server replicas to deploy | `1` |
| `apiserver.containerPorts.http` | Kuberay API Server http container port | `8888` |
| `apiserver.containerPorts.grpc` | Kuberay API Server internal (HTTPS) container port | `8887` |
| `apiserver.livenessProbe.enabled` | Enable livenessProbe on Kuberay API Server containers | `true` |
| `apiserver.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `5` |
| `apiserver.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` |
| `apiserver.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` |
| `apiserver.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `5` |
| `apiserver.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
| `apiserver.readinessProbe.enabled` | Enable readinessProbe on Kuberay API Server containers | `true` |
| `apiserver.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `5` |
| `apiserver.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` |
| `apiserver.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `5` |
| `apiserver.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `5` |
| `apiserver.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
| `apiserver.startupProbe.enabled` | Enable startupProbe on Kuberay API Server containers | `false` |
| `apiserver.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `5` |
| `apiserver.startupProbe.periodSeconds` | Period seconds for startupProbe | `10` |
| `apiserver.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `5` |
| `apiserver.startupProbe.failureThreshold` | Failure threshold for startupProbe | `5` |
| `apiserver.startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
| `apiserver.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
| `apiserver.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
| `apiserver.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` |
| `apiserver.watchAllNamespaces` | Watch for KubeRay resources in all namespaces | `true` |
| `apiserver.watchNamespaces` | Watch for KubeRay resources in the given namespaces | `[]` |
| `apiserver.resources.limits` | The resources limits for the Kuberay API Server containers | `{}` |
| `apiserver.resources.requests` | The requested resources for the Kuberay API Server containers | `{}` |
| `apiserver.podSecurityContext.enabled` | Enabled Kuberay API Server pods' Security Context | `true` |
| `apiserver.podSecurityContext.fsGroup` | Set Kuberay API Server pod's Security Context fsGroup | `1001` |
| `apiserver.containerSecurityContext.enabled` | Enabled containers' Security Context | `true` |
| `apiserver.containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` |
| `apiserver.containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` |
| `apiserver.containerSecurityContext.privileged` | Set container's Security Context privileged | `false` |
| `apiserver.containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` |
| `apiserver.containerSecurityContext.allowPrivilegeEscalation` | Set container's Security Context allowPrivilegeEscalation | `false` |
| `apiserver.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` |
| `apiserver.containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` |
| `apiserver.command` | Override default container command (useful when using custom images) | `[]` |
| `apiserver.args` | Override default container args (useful when using custom images) | `[]` |
| `apiserver.hostAliases` | Kuberay API Server pods host aliases | `[]` |
| `apiserver.podLabels` | Extra labels for Kuberay API Server pods | `{}` |
| `apiserver.podAnnotations` | Annotations for Kuberay API Server pods | `{}` |
| `apiserver.podAffinityPreset` | Pod affinity preset. Ignored if `server.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `apiserver.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `server.affinity` is set. Allowed values: `soft` or `hard` | `soft` |
| `apiserver.pdb.create` | Enable/disable a Pod Disruption Budget creation | `false` |
| `apiserver.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `1` |
| `apiserver.pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable | `""` |
| `apiserver.nodeAffinityPreset.type` | Node affinity preset type. Ignored if `server.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `apiserver.nodeAffinityPreset.key` | Node label key to match. Ignored if `server.affinity` is set | `""` |
| `apiserver.nodeAffinityPreset.values` | Node label values to match. Ignored if `server.affinity` is set | `[]` |
| `apiserver.affinity` | Affinity for Kuberay API Server pods assignment | `{}` |
| `apiserver.nodeSelector` | Node labels for Kuberay API Server pods assignment | `{}` |
| `apiserver.tolerations` | Tolerations for Kuberay API Server pods assignment | `[]` |
| `apiserver.updateStrategy.type` | Kuberay API Server statefulset strategy type | `RollingUpdate` |
| `apiserver.priorityClassName` | Kuberay API Server pods' priorityClassName | `""` |
| `apiserver.topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `[]` |
| `apiserver.schedulerName` | Name of the k8s scheduler (other than default) for Kuberay API Server pods | `""` |
| `apiserver.terminationGracePeriodSeconds` | Seconds Redmine pod needs to terminate gracefully | `""` |
| `apiserver.lifecycleHooks` | for the Kuberay API Server container(s) to automate configuration before or after startup | `{}` |
| `apiserver.extraEnvVars` | Array with extra environment variables to add to Kuberay API Server nodes | `[]` |
| `apiserver.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for Kuberay API Server nodes | `""` |
| `apiserver.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for Kuberay API Server nodes | `""` |
| `apiserver.extraVolumes` | Optionally specify extra list of additional volumes for the Kuberay API Server pod(s) | `[]` |
| `apiserver.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Kuberay API Server container(s) | `[]` |
| `apiserver.sidecars` | Add additional sidecar containers to the Kuberay API Server pod(s) | `[]` |
| `apiserver.initContainers` | Add additional init containers to the Kuberay API Server pod(s) | `[]` |
| `apiserver.autoscaling.vpa.enabled` | Enable VPA | `false` |
| `apiserver.autoscaling.vpa.annotations` | Annotations for VPA resource | `{}` |
| `apiserver.autoscaling.vpa.controlledResources` | VPA List of resources that the vertical pod autoscaler can control. Defaults to cpu and memory | `[]` |
| `apiserver.autoscaling.vpa.maxAllowed` | VPA Max allowed resources for the pod | `{}` |
| `apiserver.autoscaling.vpa.minAllowed` | VPA Min allowed resources for the pod | `{}` |
| `apiserver.autoscaling.vpa.updatePolicy.updateMode` | Autoscaling update policy Specifies whether recommended updates are applied when a Pod is started and whether recommended updates are applied during the life of a Pod | `Auto` |
| `apiserver.autoscaling.hpa.enabled` | Enable autoscaling for apiserver | `false` |
| `apiserver.autoscaling.hpa.minReplicas` | Minimum number of apiserver replicas | `""` |
| `apiserver.autoscaling.hpa.maxReplicas` | Maximum number of apiserver replicas | `""` |
| `apiserver.autoscaling.hpa.targetCPU` | Target CPU utilization percentage | `""` |
| `apiserver.autoscaling.hpa.targetMemory` | Target Memory utilization percentage | `""` |
### Kuberay API Server Traffic Exposure Parameters
| Name | Description | Value |
| -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------- |
| `apiserver.service.type` | Kuberay API Server service type | `ClusterIP` |
| `apiserver.service.ports.http` | Kuberay API Server service HTTP port | `80` |
| `apiserver.service.ports.grpc` | Kuberay API Server service HTTP port | `8887` |
| `apiserver.service.nodePorts.http` | Node port for HTTP | `""` |
| `apiserver.service.nodePorts.grpc` | Node port for GRPC | `""` |
| `apiserver.service.clusterIP` | Kuberay API Server service Cluster IP | `""` |
| `apiserver.service.loadBalancerIP` | Kuberay API Server service Load Balancer IP | `""` |
| `apiserver.service.loadBalancerSourceRanges` | Kuberay API Server service Load Balancer sources | `[]` |
| `apiserver.service.externalTrafficPolicy` | Kuberay API Server service external traffic policy | `Cluster` |
| `apiserver.service.annotations` | Additional custom annotations for Kuberay API Server service | `{}` |
| `apiserver.service.extraPorts` | Extra ports to expose in Kuberay API Server service (normally used with the `sidecars` value) | `[]` |
| `apiserver.service.sessionAffinity` | Control where web requests go, to the same pod or round-robin | `None` |
| `apiserver.service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` |
| `apiserver.ingress.enabled` | Enable ingress record generation for Kuberay | `false` |
| `apiserver.ingress.pathType` | Ingress path type | `ImplementationSpecific` |
| `apiserver.ingress.apiVersion` | Force Ingress API version (automatically detected if not set) | `""` |
| `apiserver.ingress.hostname` | Default host for the ingress record | `kuberay-apiserver.local` |
| `apiserver.ingress.ingressClassName` | IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) | `""` |
| `apiserver.ingress.path` | Default path for the ingress record | `/` |
| `apiserver.ingress.annotations` | Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations. | `{}` |
| `apiserver.ingress.tls` | Enable TLS configuration for the host defined at `client.ingress.hostname` parameter | `false` |
| `apiserver.ingress.selfSigned` | Create a TLS secret for this ingress record using self-signed certificates generated by Helm | `false` |
| `apiserver.ingress.extraHosts` | An array with additional hostname(s) to be covered with the ingress record | `[]` |
| `apiserver.ingress.extraPaths` | An array with additional arbitrary paths that may need to be added to the ingress under the main host | `[]` |
| `apiserver.ingress.extraTls` | TLS configuration for additional hostname(s) to be covered with this ingress record | `[]` |
| `apiserver.ingress.secrets` | Custom TLS certificates as secrets | `[]` |
| `apiserver.ingress.extraRules` | Additional rules to be covered with this ingress record | `[]` |
### Kuberay API Server RBAC Parameters
| Name | Description | Value |
| ------------------------------------------------------- | ---------------------------------------------------------------- | ------ |
| `apiserver.rbac.create` | Specifies whether RBAC resources should be created | `true` |
| `apiserver.rbac.rules` | Custom RBAC rules to set | `[]` |
| `apiserver.serviceAccount.create` | Specifies whether a ServiceAccount should be created | `true` |
| `apiserver.serviceAccount.name` | The name of the ServiceAccount to use. | `""` |
| `apiserver.serviceAccount.annotations` | Additional Service Account annotations (evaluated as a template) | `{}` |
| `apiserver.serviceAccount.automountServiceAccountToken` | Automount service account token for the server service account | `true` |
### Kuberay API Server Metrics Parameters
| Name | Description | Value |
| ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | ------- |
| `apiserver.metrics.enabled` | Enable the export of Prometheus metrics | `false` |
| `apiserver.metrics.annotations` | Annotations for the server service in order to scrape metrics | `{}` |
| `apiserver.metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus API Server ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` |
| `apiserver.metrics.serviceMonitor.namespace` | Namespace in which Prometheus is running | `""` |
| `apiserver.metrics.serviceMonitor.annotations` | Additional custom annotations for the ServiceMonitor | `{}` |
| `apiserver.metrics.serviceMonitor.labels` | Extra labels for the ServiceMonitor | `{}` |
| `apiserver.metrics.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in Prometheus | `""` |
| `apiserver.metrics.serviceMonitor.honorLabels` | honorLabels chooses the metric's labels on collisions with target labels | `false` |
| `apiserver.metrics.serviceMonitor.interval` | Interval at which metrics should be scraped. | `""` |
| `apiserver.metrics.serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended | `""` |
| `apiserver.metrics.serviceMonitor.metricRelabelings` | Specify additional relabeling of metrics | `[]` |
| `apiserver.metrics.serviceMonitor.relabelings` | Specify general relabeling | `[]` |
| `apiserver.metrics.serviceMonitor.selector` | Prometheus instance selector labels | `{}` |
### Ray Cluster Parameters
| Name | Description | Value |
| --------------------- | ------------------------ | -------------- |
| `cluster.enabled` | Deploy Ray Cluster | `true` |
| `cluster.serviceType` | Set cluster service type | `LoadBalancer` |
### Ray Cluster Head Parameters
| Name | Description | Value |
| ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | ---------------- |
| `cluster.head.rayStartParams` | Set Ray start parameters | `{}` |
| `cluster.head.resources.limits` | The resources limits for the Ray Cluster Worker (common) containers | `{}` |
| `cluster.head.resources.requests` | The requested resources for the Ray Cluster Worker (common) containers | `{}` |
| `cluster.head.podSecurityContext.enabled` | Enabled Ray Cluster Worker (common) pods' Security Context | `true` |
| `cluster.head.podSecurityContext.fsGroup` | Set Ray Cluster Worker (common) pod's Security Context fsGroup | `1001` |
| `cluster.head.containerSecurityContext.enabled` | Enabled containers' Security Context | `true` |
| `cluster.head.containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` |
| `cluster.head.containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` |
| `cluster.head.containerSecurityContext.privileged` | Set container's Security Context privileged | `false` |
| `cluster.head.containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` |
| `cluster.head.containerSecurityContext.allowPrivilegeEscalation` | Set container's Security Context allowPrivilegeEscalation | `false` |
| `cluster.head.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` |
| `cluster.head.containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` |
| `cluster.head.command` | Override default container command (useful when using custom images) | `[]` |
| `cluster.head.args` | Override default container args (useful when using custom images) | `[]` |
| `cluster.head.hostAliases` | Ray Cluster Worker (common) pods host aliases | `[]` |
| `cluster.head.podLabels` | Extra labels for Ray Cluster Worker (common) pods | `{}` |
| `cluster.head.podAnnotations` | Annotations for Ray Cluster Worker (common) pods | `{}` |
| `cluster.head.podAffinityPreset` | Pod affinity preset. Ignored if `server.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `cluster.head.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `server.affinity` is set. Allowed values: `soft` or `hard` | `soft` |
| `cluster.head.nodeAffinityPreset.type` | Node affinity preset type. Ignored if `server.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `cluster.head.nodeAffinityPreset.key` | Node label key to match. Ignored if `server.affinity` is set | `""` |
| `cluster.head.nodeAffinityPreset.values` | Node label values to match. Ignored if `server.affinity` is set | `[]` |
| `cluster.head.affinity` | Affinity for Ray Cluster Worker (common) pods assignment | `{}` |
| `cluster.head.nodeSelector` | Node labels for Ray Cluster Worker (common) pods assignment | `{}` |
| `cluster.head.tolerations` | Tolerations for Ray Cluster Worker (common) pods assignment | `[]` |
| `cluster.head.priorityClassName` | Ray Cluster Worker (common) pods' priorityClassName | `""` |
| `cluster.head.topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `[]` |
| `cluster.head.schedulerName` | Name of the k8s scheduler (other than default) for Ray Cluster Worker (common) pods | `""` |
| `cluster.head.terminationGracePeriodSeconds` | Seconds Redmine pod needs to terminate gracefully | `""` |
| `cluster.head.lifecycleHooks` | for the Ray Cluster Worker (common) container(s) to automate configuration before or after startup | `{}` |
| `cluster.head.extraEnvVars` | Array with extra environment variables to add to Ray Cluster Worker (common) nodes | `[]` |
| `cluster.head.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for Ray Cluster Worker (common) nodes | `""` |
| `cluster.head.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for Ray Cluster Worker (common) nodes | `""` |
| `cluster.head.extraVolumes` | Optionally specify extra list of additional volumes for the Ray Cluster Worker (common) pod(s) | `[]` |
| `cluster.head.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Ray Cluster Worker (common) container(s) | `[]` |
| `cluster.head.sidecars` | Add additional sidecar containers to the Ray Cluster Worker (common) pod(s) | `[]` |
| `cluster.head.initContainers` | Add additional init containers to the Ray Cluster Worker (common) pod(s) | `[]` |
| `cluster.head.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
| `cluster.head.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
| `cluster.head.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` |
### Ray Cluster Worker Parameters
| Name | Description | Value |
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | ---------------- |
| `cluster.worker.common.rayStartParams` | Set Ray start parameters | `{}` |
| `cluster.worker.common.replicaCount` | Number of Ray Cluster Worker (common) replicas to deploy | `1` |
| `cluster.worker.common.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
| `cluster.worker.common.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
| `cluster.worker.common.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` |
| `cluster.worker.common.resources.limits` | The resources limits for the Ray Cluster Worker (common) containers | `{}` |
| `cluster.worker.common.resources.requests` | The requested resources for the Ray Cluster Worker (common) containers | `{}` |
| `cluster.worker.common.podSecurityContext.enabled` | Enabled Ray Cluster Worker (common) pods' Security Context | `true` |
| `cluster.worker.common.podSecurityContext.fsGroup` | Set Ray Cluster Worker (common) pod's Security Context fsGroup | `1001` |
| `cluster.worker.common.containerSecurityContext.enabled` | Enabled containers' Security Context | `true` |
| `cluster.worker.common.containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` |
| `cluster.worker.common.containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` |
| `cluster.worker.common.containerSecurityContext.privileged` | Set container's Security Context privileged | `false` |
| `cluster.worker.common.containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` |
| `cluster.worker.common.containerSecurityContext.allowPrivilegeEscalation` | Set container's Security Context allowPrivilegeEscalation | `false` |
| `cluster.worker.common.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` |
| `cluster.worker.common.containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` |
| `cluster.worker.common.command` | Override default container command (useful when using custom images) | `[]` |
| `cluster.worker.common.args` | Override default container args (useful when using custom images) | `[]` |
| `cluster.worker.common.hostAliases` | Ray Cluster Worker (common) pods host aliases | `[]` |
| `cluster.worker.common.podLabels` | Extra labels for Ray Cluster Worker (common) pods | `{}` |
| `cluster.worker.common.podAnnotations` | Annotations for Ray Cluster Worker (common) pods | `{}` |
| `cluster.worker.common.podAffinityPreset` | Pod affinity preset. Ignored if `server.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `cluster.worker.common.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `server.affinity` is set. Allowed values: `soft` or `hard` | `soft` |
| `cluster.worker.common.nodeAffinityPreset.type` | Node affinity preset type. Ignored if `server.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `cluster.worker.common.nodeAffinityPreset.key` | Node label key to match. Ignored if `server.affinity` is set | `""` |
| `cluster.worker.common.nodeAffinityPreset.values` | Node label values to match. Ignored if `server.affinity` is set | `[]` |
| `cluster.worker.common.affinity` | Affinity for Ray Cluster Worker (common) pods assignment | `{}` |
| `cluster.worker.common.nodeSelector` | Node labels for Ray Cluster Worker (common) pods assignment | `{}` |
| `cluster.worker.common.tolerations` | Tolerations for Ray Cluster Worker (common) pods assignment | `[]` |
| `cluster.worker.common.priorityClassName` | Ray Cluster Worker (common) pods' priorityClassName | `""` |
| `cluster.worker.common.topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `[]` |
| `cluster.worker.common.schedulerName` | Name of the k8s scheduler (other than default) for Ray Cluster Worker (common) pods | `""` |
| `cluster.worker.common.terminationGracePeriodSeconds` | Seconds Redmine pod needs to terminate gracefully | `""` |
| `cluster.worker.common.lifecycleHooks` | for the Ray Cluster Worker (common) container(s) to automate configuration before or after startup | `{}` |
| `cluster.worker.common.extraEnvVars` | Array with extra environment variables to add to Ray Cluster Worker (common) nodes | `[]` |
| `cluster.worker.common.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for Ray Cluster Worker (common) nodes | `""` |
| `cluster.worker.common.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for Ray Cluster Worker (common) nodes | `""` |
| `cluster.worker.common.extraVolumes` | Optionally specify extra list of additional volumes for the Ray Cluster Worker (common) pod(s) | `[]` |
| `cluster.worker.common.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Ray Cluster Worker (common) container(s) | `[]` |
| `cluster.worker.common.sidecars` | Add additional sidecar containers to the Ray Cluster Worker (common) pod(s) | `[]` |
| `cluster.worker.common.initContainers` | Add additional init containers to the Ray Cluster Worker (common) pod(s) | `[]` |
| `cluster.worker.groupSpecs` | Set worker groupspec parameters | `[]` |
| `cluster.serviceAccount.create` | Specifies whether a ServiceAccount should be created | `true` |
| `cluster.serviceAccount.name` | The name of the ServiceAccount to use. | `""` |
| `cluster.serviceAccount.annotations` | Additional Service Account annotations (evaluated as a template) | `{}` |
| `cluster.serviceAccount.automountServiceAccountToken` | Automount service account token for the server service account | `false` |
The above parameters map to the env variables defined in [bitnami/kuberay](https://github.com/bitnami/containers/tree/main/bitnami/kuberay). For more information please refer to the [bitnami/kuberay](https://github.com/bitnami/containers/tree/main/bitnami/kuberay) image documentation.
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```console
helm install my-release \
--set apiserver.enabled=true \
REGISTRY_NAME/REPOSITORY_NAME/kuberay
```
The above command enables the KubeRay API Server.
> NOTE: Once this chart is deployed, it is not possible to change the application's access credentials, such as usernames or passwords, using Helm. To change these application credentials after deployment, delete any persistent volumes (PVs) used by the chart and re-deploy it, or use the application's built-in administrative tools if available.
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
```console
helm install my-release -f values.yaml REGISTRY_NAME/REPOSITORY_NAME/kuberay
```
> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
> **Tip**: You can use the default [values.yaml](https://github.com/bitnami/charts/tree/main/bitnami/kuberay/values.yaml)
## Configuration and installation details
### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/)
It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
### Additional environment variables
In case you want to add extra environment variables (useful for advanced operations like custom init scripts), you can use the `extraEnvVars` property inside the `operator`, `apiserver` and `cluster` sections.
```yaml
operator:
extraEnvVars:
- name: LOG_LEVEL
value: error
```
Alternatively, you can use a ConfigMap or a Secret with the environment variables. To do so, use the `extraEnvVarsCM` or the `extraEnvVarsSecret` values inside the `operator`, `apiserver` and `cluster` sections.
### Sidecars
If additional containers are needed in the same pod as kuberay (such as additional metrics or logging exporters), they can be defined using the `sidecars` parameter inside the `operator`, `apiserver` and `cluster` sections. If these sidecars export extra ports, extra port definitions can be added using the `service.extraPorts` parameter. [Learn more about configuring and using sidecar containers](https://docs.bitnami.com/kubernetes/apps/kuberay/administration/configure-use-sidecars/).
If additional containers are needed in the same pod as kuberay (such as additional metrics or logging exporters), they can be defined using the `sidecars` parameter inside the `operator`, `apiserver` and `cluster` sections. If these sidecars export extra ports, extra port definitions can be added using the `service.extraPorts` parameter. [Learn more about configuring and using sidecar containers](https://docs.bitnami.com/kubernetes/apps/kuberay/administration/configure-use-sidecars/).
### Deploying Ray Cluster
The Bitnami KubeRay chart allows deploying a RayCluster object. It is possible to define the head parameters under the `cluster.head` section, as well as the properties of the workers using the `cluster.worker` section. It is possible to describe different groupspecs under the `cluster.worker.groupSpecs` section (any parameter not defined will be taken from the `cluster.worker.common` section).
### Pod affinity
This chart allows you to set your custom affinity using the `affinity` parameter. Find more information about Pod affinity in the [kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity).
As an alternative, use one of the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the [bitnami/common](https://github.com/bitnami/charts/tree/main/bitnami/common#affinities) chart. To do so, set the `podAffinityPreset`, `podAntiAffinityPreset`, or `nodeAffinityPreset` parameters inside the `operator`, `apiserver` and `cluster` sections.
## Troubleshooting
Find more information about how to deal with common errors related to Bitnami's Helm charts in [this troubleshooting guide](https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues).
## License
Copyright &copy; 2023 VMware, Inc.
Licensed 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.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,47 @@
CHART NAME: {{ .Chart.Name }}
CHART VERSION: {{ .Chart.Version }}
APP VERSION: {{ .Chart.AppVersion }}
** Please be patient while the chart is being deployed **
{{- if .Values.diagnosticMode.enabled }}
The chart has been deployed in diagnostic mode. All probes have been disabled and the command has been overwritten with:
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 4 }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 4 }}
Get the list of pods by executing:
kubectl get pods --namespace {{ include "common.names.namespace" . | quote }} -l app.kubernetes.io/instance={{ .Release.Name }}
Access the pod you want to debug by executing
kubectl exec --namespace {{ include "common.names.namespace" . | quote }} -ti <NAME OF THE POD> -- bash
{{- else }}
The following controllers have been deployed:
{{- if .Values.operator.enabled }}
- operator
{{- end }}
{{- if .Values.apiserver.enabled }}
- apiserver
{{- end }}
{{- if .Values.cluster.enabled }}
- cluster
{{- end }}
{{- end }}
Check the status of the pods by running this command:
kubectl get pods --namespace {{ include "common.names.namespace" . | quote }} -l app.kubernetes.io/instance={{ .Release.Name }}
Check the Kuberay documentation for instructions on how to deploy RayClusters, RayJobs or RayServices:
https://docs.ray.io/en/latest/cluster/kubernetes/getting-started.html
{{- include "common.warnings.rollingTag" .Values.operator.image }}
{{- include "common.warnings.rollingTag" .Values.apiserver.image }}
{{- include "common.warnings.rollingTag" .Values.rayImage }}
{{- include "kuberay.validateValues" . }}

View File

@@ -0,0 +1,123 @@
{{/*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{/*
Return the proper Docker Image Registry Secret Names
*/}}
{{- define "kuberay.imagePullSecrets" -}}
{{- include "common.images.pullSecrets" (dict "images" (list .Values.operator.image .Values.apiserver.image .Values.rayImage ) "global" .Values.global) -}}
{{- end -}}
{{/*
Return the proper Kuberay Operator fullname
*/}}
{{- define "kuberay.operator.fullname" -}}
{{- printf "%s-%s" (include "common.names.fullname" .) "operator" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Return the proper Kuberay Operator fullname (with namespace)
*/}}
{{- define "kuberay.operator.fullname.namespace" -}}
{{- printf "%s-%s" (include "common.names.fullname.namespace" .) "operator" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Return the proper Kuberay Operator image name
*/}}
{{- define "kuberay.operator.image" -}}
{{ include "common.images.image" (dict "imageRoot" .Values.operator.image "global" .Values.global) }}
{{- end -}}
{{/*
Create the name of the service account to use (Kuberay Operator)
*/}}
{{- define "kuberay.operator.serviceAccountName" -}}
{{- if .Values.operator.serviceAccount.create -}}
{{ default (include "kuberay.operator.fullname" .) .Values.operator.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.operator.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{/*
Return the proper Kuberay Kubernetes API Server fullname
*/}}
{{- define "kuberay.apiserver.fullname" -}}
{{- printf "%s-%s" (include "common.names.fullname" .) "apiserver" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Return the proper Kuberay Kubernetes API Server fullname (with namespace)
(removing image- prefix to avoid name length issues)
*/}}
{{- define "kuberay.apiserver.fullname.namespace" -}}
{{- printf "%s-%s" (include "common.names.fullname.namespace" .) "apiserver" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Return the proper Kuberay Kubernetes API Server image name
*/}}
{{- define "kuberay.apiserver.image" -}}
{{ include "common.images.image" (dict "imageRoot" .Values.apiserver.image "global" .Values.global) }}
{{- end -}}
{{/*
Create the name of the service account to use (Kuberay API Server)
*/}}
{{- define "kuberay.apiserver.serviceAccountName" -}}
{{- if .Values.apiserver.serviceAccount.create -}}
{{ default (include "kuberay.apiserver.fullname" .) .Values.apiserver.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.apiserver.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{/*
Return the proper Kuberay Kubernetes API Server image name
*/}}
{{- define "kuberay.ray.image" -}}
{{ include "common.images.image" (dict "imageRoot" .Values.rayImage "global" .Values.global) }}
{{- end -}}
{{/*
Return the proper Ray Cluster fullname
*/}}
{{- define "kuberay.cluster.fullname" -}}
{{- printf "%s-%s" (include "common.names.fullname" .) "cluster" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create the name of the service account to use (Kuberay Operator)
*/}}
{{- define "kuberay.cluster.serviceAccountName" -}}
{{- if .Values.cluster.serviceAccount.create -}}
{{ default (include "kuberay.cluster.fullname" .) .Values.cluster.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.cluster.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{/*
Validate values for Kuberay.
*/}}
{{- define "kuberay.validateValues" -}}
{{- $messages := list -}}
{{- $messages := append $messages (include "kuberay.validateValues.controllers" .) -}}
{{- $messages := without $messages "" -}}
{{- $message := join "\n" $messages -}}
{{- if $message -}}
{{- printf "\nVALUES VALIDATION:\n%s" $message -}}
{{- end -}}
{{- end -}}
{{/*
Function to validate the controller deployment
*/}}
{{- define "kuberay.validateValues.controllers" -}}
{{- if not (or .Values.operator.enabled .Values.apiserver.enabled) -}}
kuberay: Missing controllers. At least one controller should be enabled.
{{- end -}}
{{- end -}}

View File

@@ -0,0 +1,27 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.apiserver.enabled .Values.apiserver.rbac.create .Values.apiserver.watchAllNamespaces }}
kind: ClusterRoleBinding
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ include "kuberay.apiserver.fullname.namespace" . }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.apiserver.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: apiserver
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "kuberay.apiserver.fullname.namespace" . }}
subjects:
- kind: ServiceAccount
name: {{ template "kuberay.apiserver.serviceAccountName" . }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- end }}

View File

@@ -0,0 +1,62 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.apiserver.enabled .Values.apiserver.rbac.create .Values.apiserver.watchAllNamespaces }}
kind: ClusterRole
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ include "kuberay.apiserver.fullname.namespace" . | trunc 63 | trimSuffix "-" }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.apiserver.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: apiserver
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
rules:
- apiGroups:
- ray.io
resources:
- rayclusters
- rayjobs
- rayservices
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- configmaps
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- namespaces
verbs:
- list
- apiGroups:
- ""
resources:
- events
verbs:
- get
- list
{{- if .Values.apiserver.rbac.rules }}
{{- include "common.tplvalues.render" ( dict "value" .Values.apiserver.rbac.rules "context" $ ) | nindent 2 }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,164 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.apiserver.enabled }}
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ template "kuberay.apiserver.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.apiserver.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: apiserver
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if not .Values.apiserver.autoscaling.hpa.enabled }}
replicas: {{ .Values.apiserver.replicaCount }}
{{- end }}
{{- if .Values.apiserver.updateStrategy }}
strategy: {{- toYaml .Values.apiserver.updateStrategy | nindent 4 }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.apiserver.podLabels .Values.commonLabels $versionLabel ) "context" . ) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: apiserver
template:
metadata:
{{- if .Values.apiserver.podAnnotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.apiserver.podAnnotations "context" $) | nindent 8 }}
{{- end }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: apiserver
spec:
serviceAccountName: {{ template "kuberay.apiserver.serviceAccountName" . }}
{{- include "kuberay.imagePullSecrets" . | nindent 6 }}
{{- if .Values.apiserver.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.apiserver.hostAliases "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.apiserver.affinity }}
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.apiserver.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.apiserver.podAffinityPreset "component" "apiserver" "customLabels" $podLabels "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.apiserver.podAntiAffinityPreset "component" "apiserver" "customLabels" $podLabels "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.apiserver.nodeAffinityPreset.type "key" .Values.apiserver.nodeAffinityPreset.key "values" .Values.apiserver.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.apiserver.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.apiserver.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.apiserver.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.apiserver.tolerations "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.apiserver.priorityClassName }}
priorityClassName: {{ .Values.apiserver.priorityClassName | quote }}
{{- end }}
{{- if .Values.apiserver.schedulerName }}
schedulerName: {{ .Values.apiserver.schedulerName | quote }}
{{- end }}
{{- if .Values.apiserver.topologySpreadConstraints }}
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.apiserver.topologySpreadConstraints "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.apiserver.podSecurityContext.enabled }}
securityContext: {{- omit .Values.apiserver.podSecurityContext "enabled" | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.apiserver.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ .Values.apiserver.terminationGracePeriodSeconds }}
{{- end }}
{{- if .Values.apiserver.initContainers }}
initContainers:
{{- include "common.tplvalues.render" (dict "value" .Values.apiserver.initContainers "context" $) | nindent 8 }}
{{- end }}
containers:
- name: kuberay-apiserver
image: {{ template "kuberay.apiserver.image" . }}
imagePullPolicy: {{ .Values.apiserver.image.pullPolicy }}
{{- if .Values.apiserver.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.apiserver.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.diagnosticMode.enabled }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
{{- else if .Values.apiserver.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.apiserver.command "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.diagnosticMode.enabled }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
{{- else if .Values.apiserver.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.apiserver.args "context" $) | nindent 12 }}
{{- else }}
args:
- -rpcPortFlag=:{{ .Values.apiserver.containerPorts.grpc }}
- -httpPortFlag=:{{ .Values.apiserver.containerPorts.http }}
{{- end }}
{{- if .Values.apiserver.extraEnvVars }}
env: {{- include "common.tplvalues.render" (dict "value" .Values.apiserver.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
envFrom:
{{- if .Values.apiserver.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.apiserver.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.apiserver.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.apiserver.extraEnvVarsSecret "context" $) }}
{{- end }}
{{- if .Values.apiserver.resources }}
resources: {{- toYaml .Values.apiserver.resources | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: {{ .Values.apiserver.containerPorts.http }}
- name: grpc
containerPort: {{ .Values.apiserver.containerPorts.grpc }}
{{- if not .Values.diagnosticMode.enabled }}
{{- if .Values.apiserver.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.apiserver.customLivenessProbe "context" $) | nindent 12 }}
{{- else if .Values.apiserver.livenessProbe.enabled }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.apiserver.livenessProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: /healthz
port: http
{{- end }}
{{- if .Values.apiserver.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.apiserver.customReadinessProbe "context" $) | nindent 12 }}
{{- else if .Values.apiserver.readinessProbe.enabled }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.apiserver.readinessProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: /healthz
port: http
{{- end }}
{{- if .Values.apiserver.customStartupProbe }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.apiserver.customStartupProbe "context" $) | nindent 12 }}
{{- else if .Values.apiserver.startupProbe.enabled }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.apiserver.startupProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: /healthz
port: http
{{- end }}
{{- end }}
{{- if .Values.apiserver.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.apiserver.lifecycleHooks "context" $) | nindent 12 }}
{{- end }}
volumeMounts:
- name: tmp
mountPath: /tmp
{{- if .Values.apiserver.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.apiserver.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.apiserver.sidecars }}
{{- include "common.tplvalues.render" ( dict "value" .Values.apiserver.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
- name: tmp
emptyDir: {}
{{- if .Values.apiserver.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.apiserver.extraVolumes "context" $) | nindent 8 }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,50 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.apiserver.autoscaling.hpa.enabled }}
apiVersion: {{ include "common.capabilities.hpa.apiVersion" ( dict "context" $ ) }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "kuberay.apiserver.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.apiserver.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
scaleTargetRef:
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
name: {{ template "kuberay.apiserver.fullname" . }}
minReplicas: {{ .Values.apiserver.autoscaling.hpa.minReplicas }}
maxReplicas: {{ .Values.apiserver.autoscaling.hpa.maxReplicas }}
metrics:
{{- if .Values.apiserver.autoscaling.hpa.targetCPU }}
- type: Resource
resource:
name: cpu
{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }}
targetAverageUtilization: {{ .Values.apiserver.autoscaling.hpa.targetCPU }}
{{- else }}
target:
type: Utilization
averageUtilization: {{ .Values.apiserver.autoscaling.hpa.targetCPU }}
{{- end }}
{{- end }}
{{- if .Values.apiserver.autoscaling.hpa.targetMemory }}
- type: Resource
resource:
name: memory
{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }}
targetAverageUtilization: {{ .Values.apiserver.autoscaling.hpa.targetMemory }}
{{- else }}
target:
type: Utilization
averageUtilization: {{ .Values.apiserver.autoscaling.hpa.targetMemory }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,50 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.apiserver.ingress.enabled }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.apiserver.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
{{- if .Values.apiserver.ingress.secrets }}
{{- range .Values.apiserver.ingress.secrets }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .name }}
namespace: {{ include "common.names.namespace" $ | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: apiserver
{{- if $.Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: kubernetes.io/tls
data:
tls.crt: {{ .certificate | b64enc }}
tls.key: {{ .key | b64enc }}
---
{{- end }}
{{- end }}
{{- if and .Values.apiserver.ingress.tls .Values.apiserver.ingress.selfSigned }}
{{- $secretName := printf "%s-tls" .Values.apiserver.ingress.hostname }}
{{- $ca := genCA "kuberay-apiserver-ca" 365 }}
{{- $cert := genSignedCert .Values.apiserver.ingress.hostname nil (list .Values.apiserver.ingress.hostname) 365 $ca }}
apiVersion: v1
kind: Secret
metadata:
name: {{ $secretName }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: apiserver
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: kubernetes.io/tls
data:
tls.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.crt" "defaultValue" $cert.Cert "context" $) }}
tls.key: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.key" "defaultValue" $cert.Key "context" $) }}
ca.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "ca.crt" "defaultValue" $ca.Cert "context" $) }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,63 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.apiserver.enabled .Values.apiserver.ingress.enabled }}
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ template "kuberay.apiserver.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.apiserver.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: apiserver
{{- if or .Values.apiserver.ingress.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.apiserver.ingress.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.apiserver.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }}
ingressClassName: {{ .Values.apiserver.ingress.ingressClassName | quote }}
{{- end }}
rules:
{{- if .Values.apiserver.ingress.hostname }}
- host: {{ .Values.apiserver.ingress.hostname }}
http:
paths:
{{- if .Values.apiserver.ingress.extraPaths }}
{{- toYaml .Values.apiserver.ingress.extraPaths | nindent 10 }}
{{- end }}
- path: {{ .Values.apiserver.ingress.path }}
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
pathType: {{ .Values.apiserver.ingress.pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "kuberay.apiserver.fullname" . | trunc 63 | trimSuffix "-") "servicePort" "http" "context" $) | nindent 14 }}
{{- end }}
{{- range .Values.apiserver.ingress.extraHosts }}
- host: {{ .name | quote }}
http:
paths:
- path: {{ default "/" .path }}
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
pathType: {{ default "ImplementationSpecific" .pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "kuberay.apiserver.fullname" $ | trunc 63 | trimSuffix "-") "servicePort" "http" "context" $) | nindent 14 }}
{{- end }}
{{- if .Values.apiserver.ingress.extraRules }}
{{- include "common.tplvalues.render" (dict "value" .Values.apiserver.ingress.extraRules "context" $) | nindent 4 }}
{{- end }}
{{- if or (and .Values.apiserver.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.apiserver.ingress.annotations )) .Values.apiserver.ingress.selfSigned)) .Values.apiserver.ingress.extraTls }}
tls:
{{- if and .Values.apiserver.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.apiserver.ingress.annotations )) .Values.apiserver.ingress.selfSigned) }}
- hosts:
- {{ .Values.apiserver.ingress.hostname | quote }}
secretName: {{ printf "%s-tls" .Values.apiserver.ingress.hostname }}
{{- end }}
{{- if .Values.apiserver.ingress.extraTls }}
{{- include "common.tplvalues.render" (dict "value" .Values.apiserver.ingress.extraTls "context" $) | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,32 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.apiserver.pdb.create }}
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ template "kuberay.apiserver.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.apiserver.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: apiserver
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.apiserver.pdb.minAvailable }}
minAvailable: {{ .Values.apiserver.pdb.minAvailable }}
{{- end }}
{{- if .Values.apiserver.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.apiserver.pdb.maxUnavailable }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.apiserver.podLabels .Values.commonLabels ) "context" . ) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: apiserver
{{- end }}

View File

@@ -0,0 +1,67 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.apiserver.enabled .Values.apiserver.rbac.create (not .Values.apiserver.watchAllNamespaces) }}
{{- $watchNamespaces := default (list (include "common.names.namespace" .)) .Values.apiserver.watchNamespaces }}
{{- range $namespace := $watchNamespaces }}
---
kind: Role
apiVersion: {{ include "common.capabilities.rbac.apiVersion" $ }}
metadata:
name: {{ include "kuberay.apiserver.fullname" $ | trunc 63 | trimSuffix "-" }}
namespace: {{ $namespace | quote }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" $.Values.apiserver.image "chart" $.Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list $.Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: apiserver
{{- if $.Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
rules:
- apiGroups:
- ray.io
resources:
- rayclusters
- rayjobs
- rayservices
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- configmaps
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- namespaces
verbs:
- list
- apiGroups:
- ""
resources:
- events
verbs:
- get
- list
{{- if $.Values.apiserver.rbac.rules }}
{{- include "common.tplvalues.render" ( dict "value" $.Values.apiserver.rbac.rules "context" $ ) | nindent 2 }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,32 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.apiserver.enabled .Values.apiserver.rbac.create (not .Values.apiserver.watchAllNamespaces) }}
{{- $watchNamespaces := default (list (include "common.names.namespace" .)) .Values.apiserver.watchNamespaces }}
{{- range $namespace := $watchNamespaces }}
---
kind: RoleBinding
apiVersion: {{ include "common.capabilities.rbac.apiVersion" $ }}
metadata:
name: {{ include "kuberay.apiserver.fullname" $ | trunc 63 | trimSuffix "-" }}
namespace: {{ $namespace | quote }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" $.Values.apiserver.image "chart" $.Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list $.Values.commonLabels $versionLabel ) "context" $ ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: apiserver
{{- if $.Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "kuberay.apiserver.fullname" $ | trunc 63 | trimSuffix "-" }}
subjects:
- kind: ServiceAccount
name: {{ template "kuberay.apiserver.serviceAccountName" $ }}
namespace: {{ include "common.names.namespace" $ | quote }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,20 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.apiserver.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "kuberay.apiserver.serviceAccountName" . }}
namespace: {{ .Release.Namespace | quote }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.apiserver.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
{{- if or .Values.apiserver.serviceAccount.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.apiserver.serviceAccount.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.apiserver.serviceAccount.automountServiceAccountToken }}
{{- end }}

View File

@@ -0,0 +1,73 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.apiserver.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "kuberay.apiserver.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.apiserver.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: apiserver
{{- if or .Values.apiserver.service.annotations .Values.commonAnnotations (and .Values.apiserver.metrics.enabled .Values.apiserver.metrics.annotations) }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.apiserver.service.annotations .Values.commonAnnotations ) "context" . ) }}
annotations:
{{- if or .Values.apiserver.service.annotations .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
{{- if and .Values.apiserver.metrics.enabled .Values.apiserver.metrics.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.apiserver.metrics.annotations "context" $) | nindent 4 }}
{{- end }}
{{- end }}
spec:
type: {{ .Values.apiserver.service.type }}
{{- if and .Values.apiserver.service.clusterIP (eq .Values.apiserver.service.type "ClusterIP") }}
clusterIP: {{ .Values.apiserver.service.clusterIP }}
{{- end }}
{{- if .Values.apiserver.service.sessionAffinity }}
sessionAffinity: {{ .Values.apiserver.service.sessionAffinity }}
{{- end }}
{{- if .Values.apiserver.service.sessionAffinityConfig }}
sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.apiserver.service.sessionAffinityConfig "context" $) | nindent 4 }}
{{- end }}
{{- if or (eq .Values.apiserver.service.type "LoadBalancer") (eq .Values.apiserver.service.type "NodePort") }}
externalTrafficPolicy: {{ .Values.apiserver.service.externalTrafficPolicy | quote }}
{{- end }}
{{- if and (eq .Values.apiserver.service.type "LoadBalancer") (not (empty .Values.apiserver.service.loadBalancerSourceRanges)) }}
loadBalancerSourceRanges: {{ .Values.apiserver.service.loadBalancerSourceRanges }}
{{- end }}
{{- if and (eq .Values.apiserver.service.type "LoadBalancer") (not (empty .Values.apiserver.service.loadBalancerIP)) }}
loadBalancerIP: {{ .Values.apiserver.service.loadBalancerIP }}
{{- end }}
ports:
- name: http
port: {{ .Values.apiserver.service.ports.http }}
protocol: TCP
{{- if and (or (eq .Values.apiserver.service.type "NodePort") (eq .Values.apiserver.service.type "LoadBalancer")) (not (empty .Values.apiserver.service.nodePorts.http)) }}
nodePort: {{ .Values.apiserver.service.nodePorts.http }}
{{- else if eq .Values.apiserver.service.type "ClusterIP" }}
nodePort: null
{{- end }}
targetPort: http
- name: grpc
port: {{ .Values.apiserver.service.ports.grpc }}
protocol: TCP
{{- if and (or (eq .Values.apiserver.service.type "NodePort") (eq .Values.apiserver.service.type "LoadBalancer")) (not (empty .Values.apiserver.service.nodePorts.grpc)) }}
nodePort: {{ .Values.apiserver.service.nodePorts.grpc }}
{{- else if eq .Values.apiserver.service.type "ClusterIP" }}
nodePort: null
{{- end }}
targetPort: grpc
{{- if .Values.apiserver.service.extraPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.apiserver.service.extraPorts "context" $) | nindent 4 }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.apiserver.podLabels .Values.commonLabels ) "context" . ) }}
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: apiserver
{{- end }}

View File

@@ -0,0 +1,50 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.apiserver.metrics.enabled .Values.apiserver.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "kuberay.apiserver.fullname" . }}
namespace: {{ default (include "common.names.namespace" .) .Values.apiserver.metrics.serviceMonitor.namespace | quote }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.apiserver.metrics.serviceMonitor.labels .Values.commonLabels ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: apiserver
{{- if or .Values.apiserver.metrics.serviceMonitor.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.apiserver.metrics.serviceMonitor.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec:
jobLabel: {{ .Values.apiserver.metrics.serviceMonitor.jobLabel | quote }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: apiserver
{{- if .Values.apiserver.metrics.serviceMonitor.selector }}
{{- include "common.tplvalues.render" (dict "value" .Values.apiserver.metrics.serviceMonitor.selector "context" $) | nindent 6 }}
{{- end }}
endpoints:
- port: http
path: "/metrics"
{{- if .Values.apiserver.metrics.serviceMonitor.interval }}
interval: {{ .Values.apiserver.metrics.serviceMonitor.interval }}
{{- end }}
{{- if .Values.apiserver.metrics.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.apiserver.metrics.serviceMonitor.scrapeTimeout }}
{{- end }}
{{- if .Values.apiserver.metrics.serviceMonitor.honorLabels }}
honorLabels: {{ .Values.apiserver.metrics.serviceMonitor.honorLabels }}
{{- end }}
{{- if .Values.apiserver.metrics.serviceMonitor.metricRelabelings }}
metricRelabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.apiserver.metrics.serviceMonitor.metricRelabelings "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.apiserver.metrics.serviceMonitor.relabelings }}
relabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.apiserver.metrics.serviceMonitor.relabelings "context" $) | nindent 8 }}
{{- end }}
namespaceSelector:
matchNames:
- {{ include "common.names.namespace" . | quote }}
{{- end }}

View File

@@ -0,0 +1,47 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and (.Capabilities.APIVersions.Has "autoscaling.k8s.io/v1/VerticalPodAutoscaler") .Values.apiserver.autoscaling.vpa.enabled }}
apiVersion: {{ include "common.capabilities.vpa.apiVersion" . }}
kind: VerticalPodAutoscaler
metadata:
name: {{ include "kuberay.apiserver.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.apiserver.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: apiserver
{{- if or .Values.apiserver.autoscaling.vpa.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.apiserver.autoscaling.vpa.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec:
resourcePolicy:
containerPolicies:
- containerName: kuberay-apiserver
{{- with .Values.apiserver.autoscaling.vpa.controlledResources }}
controlledResources:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.apiserver.autoscaling.vpa.maxAllowed }}
maxAllowed:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.apiserver.autoscaling.vpa.minAllowed }}
minAllowed:
{{- toYaml . | nindent 8 }}
{{- end }}
targetRef:
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
name: {{ include "kuberay.apiserver.fullname" . }}
{{- if .Values.apiserver.autoscaling.vpa.updatePolicy }}
updatePolicy:
{{- with .Values.apiserver.autoscaling.vpa.updatePolicy.updateMode }}
updateMode: {{ . }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,279 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.cluster.enabled }}
apiVersion: ray.io/v1
kind: RayCluster
metadata:
name: {{ template "kuberay.cluster.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.rayImage "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: cluster
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
headGroupSpec:
serviceType: {{ .Values.cluster.serviceType }}
{{- if .Values.cluster.head.rayStartParams }}
rayStartParams: {{- include "common.tplvalues.render" ( dict "value" .Values.cluster.head.rayStartParams "context" $ ) | nindent 6 }}
{{- else }}
rayStartParams: {}
{{- end }}
template:
metadata:
{{- if .Values.cluster.head.podAnnotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.cluster.head.podAnnotations "context" $) | nindent 10 }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.cluster.head.podLabels .Values.commonLabels ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 10 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: cluster-head
spec:
{{- include "kuberay.imagePullSecrets" . | nindent 8 }}
serviceAccountName: {{ template "kuberay.cluster.serviceAccountName" . }}
{{- if .Values.cluster.head.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.cluster.head.hostAliases "context" $) | nindent 10 }}
{{- end }}
{{- if .Values.cluster.head.affinity }}
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.cluster.head.affinity "context" $) | nindent 10 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.cluster.head.podAffinityPreset "component" "cluster-head" "customLabels" $podLabels "context" $) | nindent 12 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.cluster.head.podAntiAffinityPreset "component" "cluster-head" "customLabels" $podLabels "context" $) | nindent 12 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.cluster.head.nodeAffinityPreset.type "key" .Values.cluster.head.nodeAffinityPreset.key "values" .Values.cluster.head.nodeAffinityPreset.values) | nindent 12 }}
{{- end }}
{{- if .Values.cluster.head.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.cluster.head.nodeSelector "context" $) | nindent 10 }}
{{- end }}
{{- if .Values.cluster.head.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.cluster.head.tolerations "context" .) | nindent 10 }}
{{- end }}
{{- if .Values.cluster.head.priorityClassName }}
priorityClassName: {{ .Values.cluster.head.priorityClassName | quote }}
{{- end }}
{{- if .Values.cluster.head.schedulerName }}
schedulerName: {{ .Values.cluster.head.schedulerName | quote }}
{{- end }}
{{- if .Values.cluster.head.topologySpreadConstraints }}
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.cluster.head.topologySpreadConstraints "context" .) | nindent 10 }}
{{- end }}
{{- if .Values.cluster.head.podSecurityContext.enabled }}
securityContext: {{- omit .Values.cluster.head.podSecurityContext "enabled" | toYaml | nindent 10 }}
{{- end }}
{{- if .Values.cluster.head.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ .Values.cluster.head.terminationGracePeriodSeconds }}
{{- end }}
{{- if .Values.cluster.head.initContainers }}
initContainers: {{- include "common.tplvalues.render" (dict "value" .Values.cluster.head.initContainers "context" $) | nindent 10 }}
{{- end }}
containers:
- name: ray-head
image: {{ template "kuberay.ray.image" . }}
imagePullPolicy: {{ .Values.rayImage.pullPolicy }}
{{- if .Values.cluster.head.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.cluster.head.containerSecurityContext "enabled" | toYaml | nindent 14 }}
{{- end }}
{{- if .Values.diagnosticMode.enabled }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 14 }}
{{- else if .Values.cluster.head.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.cluster.head.command "context" $) | nindent 14 }}
{{- end }}
{{- if .Values.diagnosticMode.enabled }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 14 }}
{{- else if .Values.cluster.head.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.cluster.head.args "context" $) | nindent 14 }}
{{- end }}
{{- if .Values.cluster.head.extraEnvVars }}
env: {{- include "common.tplvalues.render" (dict "value" .Values.cluster.head.extraEnvVars "context" $) | nindent 14 }}
{{- end }}
envFrom:
{{- if .Values.cluster.head.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.cluster.head.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.cluster.head.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.cluster.head.extraEnvVarsSecret "context" $) }}
{{- end }}
{{- if .Values.cluster.head.resources }}
resources: {{- toYaml .Values.cluster.head.resources | nindent 14 }}
{{- end }}
{{- if .Values.cluster.head.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.cluster.head.lifecycleHooks "context" $) | nindent 14 }}
{{- end }}
volumeMounts:
- name: tmp
mountPath: /tmp
{{- if .Values.cluster.head.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.cluster.head.extraVolumeMounts "context" $) | nindent 14 }}
{{- end }}
{{- if .Values.cluster.head.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.cluster.head.customLivenessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.cluster.head.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.cluster.head.customReadinessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.cluster.head.customStartupProbe }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.cluster.head.customStartupProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.cluster.head.sidecars }}
{{- include "common.tplvalues.render" ( dict "value" .Values.cluster.head.sidecars "context" $) | nindent 10 }}
{{- end }}
volumes:
- name: tmp
emptyDir: {}
{{- if .Values.cluster.head.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.cluster.head.extraVolumes "context" $) | nindent 10 }}
{{- end }}
workerGroupSpecs:
{{- range $workergroup := .Values.cluster.worker.groupSpecs }}
- groupName: {{ .groupName }}
{{- $rayStartParams := coalesce .rayStartParams $.Values.cluster.worker.common.rayStartParams }}
{{- if $rayStartParams }}
rayStartParams: {{- include "common.tplvalues.render" ( dict "value" $rayStartParams "context" $ ) | nindent 8 }}
{{- else }}
rayStartParams: {}
{{- end }}
replicas: {{ coalesce .replicaCount $.Values.cluster.worker.common.replicaCount }}
template:
metadata:
{{- $podAnnotations := coalesce .podAnnotations $.Values.cluster.worker.common.podAnnotations }}
{{- if $podAnnotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" $podAnnotations "context" $) | nindent 12 }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list (coalesce .podLabels $.Values.cluster.worker.common.podLabels) $.Values.commonLabels ) "context" $) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 12 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: {{ printf "cluster-worker-%s" .groupName }}
spec:
{{- include "kuberay.imagePullSecrets" $ | nindent 10 }}
serviceAccountName: {{ template "kuberay.cluster.serviceAccountName" $ }}
{{- $hostAliases := coalesce .hostAliases $.Values.cluster.worker.common.hostAliases }}
{{- if $hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" $hostAliases "context" $) | nindent 12 }}
{{- end }}
{{- $affinity := coalesce .affinity $.Values.cluster.worker.common.affinity }}
{{- if $affinity }}
affinity: {{- include "common.tplvalues.render" ( dict "value" $affinity "context" $) | nindent 12 }}
{{- else }}
affinity:
{{- $podAffinityPreset := coalesce .podAffinityPreset $.Values.cluster.worker.common.podAffinityPreset }}
podAffinity: {{- include "common.affinities.pods" (dict "type" $podAffinityPreset "component" (printf "cluster-worker-%s" .groupName) "customLabels" $podLabels "context" $) | nindent 14 }}
{{- $podAntiAffinityPreset := coalesce .podAntiAffinityPreset $.Values.cluster.worker.common.podAntiAffinityPreset }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" $podAntiAffinityPreset "component" (printf "cluster-worker-%s" .groupName) "customLabels" $podLabels "context" $) | nindent 14 }}
{{- $nodeAffinityPreset := coalesce .nodeAffinityPreset $.Values.cluster.worker.common.nodeAffinityPreset }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" $nodeAffinityPreset.type "key" $nodeAffinityPreset.key "values" $nodeAffinityPreset.values) | nindent 12 }}
{{- end }}
{{- $nodeSelector := coalesce .nodeSelector $.Values.cluster.worker.common.nodeSelector }}
{{- if $nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" $nodeSelector "context" $) | nindent 12 }}
{{- end }}
{{- $tolerations := coalesce .tolerations $.Values.cluster.worker.common.tolerations }}
{{- if $tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" $tolerations "context" $) | nindent 12 }}
{{- end }}
{{- $priorityClassName := coalesce .priorityClassName $.Values.cluster.worker.common.priorityClassName }}
{{- if $priorityClassName }}
priorityClassName: {{ $priorityClassName | quote }}
{{- end }}
{{- $schedulerName := coalesce .schedulerName $.Values.cluster.worker.common.schedulerName }}
{{- if $schedulerName }}
schedulerName: {{ $schedulerName | quote }}
{{- end }}
{{- $topologySpreadConstraints := coalesce .topologySpreadConstraints $.Values.cluster.worker.common.topologySpreadConstraints }}
{{- if $topologySpreadConstraints }}
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" $topologySpreadConstraints "context" .) | nindent 12 }}
{{- end }}
{{- $podSecurityContext := coalesce .podSecurityContext $.Values.cluster.worker.common.podSecurityContext }}
{{- if $podSecurityContext }}
securityContext: {{- omit $podSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- $terminationGracePeriodSeconds := coalesce .terminationGracePeriodSeconds $.Values.cluster.worker.common.terminationGracePeriodSeconds }}
{{- if $terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ $terminationGracePeriodSeconds }}
{{- end }}
{{- $initContainers := coalesce .initContainers $.Values.cluster.worker.common.initContainers }}
{{- if $initContainers }}
initContainers: {{- include "common.tplvalues.render" (dict "value" $initContainers "context" $) | nindent 12 }}
{{- end }}
containers:
- name: ray-worker
image: {{ template "kuberay.ray.image" $ }}
imagePullPolicy: {{ $.Values.rayImage.pullPolicy }}
{{- $containerSecurityContext := coalesce .containerSecurityContext $.Values.cluster.worker.common.containerSecurityContext }}
{{- if $containerSecurityContext.enabled }}
securityContext: {{- omit $containerSecurityContext "enabled" | toYaml | nindent 16 }}
{{- end }}
{{- $command := coalesce .command $.Values.cluster.worker.common.command }}
{{- if $.Values.diagnosticMode.enabled }}
command: {{- include "common.tplvalues.render" (dict "value" $.Values.diagnosticMode.command "context" $) | nindent 16 }}
{{- else if $command }}
command: {{- include "common.tplvalues.render" (dict "value" $command "context" $) | nindent 16 }}
{{- end }}
{{- $args := coalesce .args $.Values.cluster.worker.common.args }}
{{- if $.Values.diagnosticMode.enabled }}
args: {{- include "common.tplvalues.render" (dict "value" $.Values.diagnosticMode.args "context" $) | nindent 16 }}
{{- else if $args }}
args: {{- include "common.tplvalues.render" (dict "value" $args "context" $) | nindent 16 }}
{{- end }}
{{- $extraEnvVars := coalesce .extraEnvVars $.Values.cluster.worker.common.extraEnvVars }}
{{- if $extraEnvVars }}
env: {{- include "common.tplvalues.render" (dict "value" $extraEnvVars "context" $) | nindent 16 }}
{{- end }}
envFrom:
{{- $extraEnvVarsCM := coalesce .extraEnvVarsCM $.Values.cluster.worker.common.extraEnvVarsCM }}
{{- if $extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" $extraEnvVarsCM "context" $) }}
{{- end }}
{{- $extraEnvVarsSecret := coalesce .extraEnvVarsSecret $.Values.cluster.worker.common.extraEnvVarsSecret }}
{{- if $extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" $extraEnvVarsSecret "context" $) }}
{{- end }}
{{- $resources := coalesce .resources $.Values.cluster.worker.common.resources }}
{{- if $resources }}
resources: {{- toYaml $resources | nindent 16 }}
{{- end }}
{{- $customLivenessProbe := coalesce .customLivenessProbe $.Values.cluster.worker.common.customLivenessProbe }}
{{- if $customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" $customLivenessProbe "context" $) | nindent 12 }}
{{- end }}
{{- $customReadinessProbe := coalesce .customReadinessProbe $.Values.cluster.worker.common.customReadinessProbe }}
{{- if $customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" $customReadinessProbe "context" $) | nindent 12 }}
{{- end }}
{{- $customStartupProbe := coalesce .customStartupProbe $.Values.cluster.worker.common.customStartupProbe }}
{{- if $customStartupProbe }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" $customStartupProbe "context" $) | nindent 12 }}
{{- end }}
{{- $lifecycleHooks := coalesce .lifecycleHooks $.Values.cluster.worker.common.lifecycleHooks }}
{{- if $lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" $lifecycleHooks "context" $) | nindent 16 }}
{{- end }}
volumeMounts:
- name: tmp
mountPath: /tmp
{{- $extraVolumeMounts := coalesce .extraVolumeMounts $.Values.cluster.worker.common.extraVolumeMounts }}
{{- if $extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" $extraVolumeMounts "context" $) | nindent 16 }}
{{- end }}
{{- $sidecars := coalesce .sidecars $.Values.cluster.worker.common.sidecars }}
{{- if $sidecars }}
{{- include "common.tplvalues.render" ( dict "value" $sidecars "context" $) | nindent 12 }}
{{- end }}
volumes:
- name: tmp
emptyDir: {}
{{- $extraVolumes := coalesce .extraVolumes $.Values.cluster.worker.common.extraVolumes }}
{{- if $extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" $extraVolumes "context" $) | nindent 12 }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,20 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.cluster.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "kuberay.cluster.serviceAccountName" . }}
namespace: {{ .Release.Namespace | quote }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.rayImage "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
{{- if or .Values.cluster.serviceAccount.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.cluster.serviceAccount.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.cluster.serviceAccount.automountServiceAccountToken }}
{{- end }}

View File

@@ -0,0 +1,9 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- range .Values.extraDeploy }}
---
{{ include "common.tplvalues.render" (dict "value" . "context" $) }}
{{- end }}

View File

@@ -0,0 +1,113 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.operator.enabled .Values.operator.rbac.create }}
{{- if .Values.operator.watchAllNamespaces }}
kind: ClusterRoleBinding
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ include "kuberay.operator.fullname.namespace" . }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.operator.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "kuberay.operator.fullname.namespace" . }}
subjects:
- kind: ServiceAccount
name: {{ template "kuberay.operator.serviceAccountName" . }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- end }}
---
kind: ClusterRoleBinding
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ printf "%s-edit-rayjob" (include "kuberay.operator.fullname.namespace" .) | trunc 63 | trimSuffix "-" }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.operator.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ printf "%s-edit-rayjob" (include "kuberay.operator.fullname.namespace" .) | trunc 63 | trimSuffix "-" }}
subjects:
- kind: ServiceAccount
name: {{ template "kuberay.operator.serviceAccountName" . }}
namespace: {{ include "common.names.namespace" . | quote }}
---
kind: ClusterRoleBinding
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ printf "%s-view-rayjob" (include "kuberay.operator.fullname.namespace" .) | trunc 63 | trimSuffix "-" }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.operator.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ printf "%s-view-rayjob" (include "kuberay.operator.fullname.namespace" .) | trunc 63 | trimSuffix "-" }}
subjects:
- kind: ServiceAccount
name: {{ template "kuberay.operator.serviceAccountName" . }}
namespace: {{ include "common.names.namespace" . | quote }}
---
kind: ClusterRoleBinding
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ printf "%s-edit-rayservice" (include "kuberay.operator.fullname.namespace" .) | trunc 63 | trimSuffix "-" }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.operator.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ printf "%s-edit-rayservice" (include "kuberay.operator.fullname.namespace" .) | trunc 63 | trimSuffix "-" }}
subjects:
- kind: ServiceAccount
name: {{ template "kuberay.operator.serviceAccountName" . }}
namespace: {{ include "common.names.namespace" . | quote }}
---
kind: ClusterRoleBinding
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ printf "%s-view-rayservice" (include "kuberay.operator.fullname.namespace" .) | trunc 63 | trimSuffix "-" }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.operator.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ printf "%s-view-rayservice" (include "kuberay.operator.fullname.namespace" .) | trunc 63 | trimSuffix "-" }}
subjects:
- kind: ServiceAccount
name: {{ template "kuberay.operator.serviceAccountName" . }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- end }}

View File

@@ -0,0 +1,391 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.operator.enabled .Values.operator.rbac.create }}
{{- if .Values.operator.watchAllNamespaces }}
kind: ClusterRole
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ include "kuberay.operator.fullname.namespace" . | trunc 63 | trimSuffix "-" }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.operator.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
rules:
- apiGroups:
- batch
resources:
- jobs
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- create
- get
- list
- update
- apiGroups:
- ""
resources:
- events
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- pods
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- pods/status
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- create
- delete
- get
- list
- watch
- apiGroups:
- ""
resources:
- services
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- services/status
verbs:
- get
- patch
- update
- apiGroups:
- extensions
resources:
- ingresses
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- networking.k8s.io
resources:
- ingressclasses
verbs:
- get
- list
- watch
- apiGroups:
- networking.k8s.io
resources:
- ingresses
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ray.io
resources:
- rayclusters
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ray.io
resources:
- rayclusters/finalizers
verbs:
- update
- apiGroups:
- ray.io
resources:
- rayclusters/status
verbs:
- get
- patch
- update
- apiGroups:
- ray.io
resources:
- rayjobs
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ray.io
resources:
- rayjobs/finalizers
verbs:
- update
- apiGroups:
- ray.io
resources:
- rayjobs/status
verbs:
- get
- patch
- update
- apiGroups:
- ray.io
resources:
- rayservices
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ray.io
resources:
- rayservices/finalizers
verbs:
- update
- apiGroups:
- ray.io
resources:
- rayservices/status
verbs:
- get
- patch
- update
- apiGroups:
- rbac.authorization.k8s.io
resources:
- rolebindings
verbs:
- create
- delete
- get
- list
- watch
- apiGroups:
- rbac.authorization.k8s.io
resources:
- roles
verbs:
- create
- delete
- get
- list
- update
- watch
- apiGroups:
- route.openshift.io
resources:
- routes
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
{{- if .Values.operator.enableBatchScheduler }}
- apiGroups:
- scheduling.volcano.sh
resources:
- podgroups
verbs:
- create
- delete
- get
- list
- update
- watch
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- get
{{- end }}
{{- end }}
---
kind: ClusterRole
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ printf "%s-edit-rayjob" (include "kuberay.operator.fullname.namespace" .) | trunc 63 | trimSuffix "-" }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.operator.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
rules:
- apiGroups:
- ray.io
resources:
- rayservices
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ray.io
resources:
- rayservices/status
verbs:
- get
---
kind: ClusterRole
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ printf "%s-view-rayjob" (include "kuberay.operator.fullname.namespace" .) | trunc 63 | trimSuffix "-" }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.operator.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
rules:
- apiGroups:
- ray.io
resources:
- rayservices
verbs:
- get
- list
- watch
- apiGroups:
- ray.io
resources:
- rayservices/status
verbs:
- get
---
kind: ClusterRole
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ printf "%s-edit-rayservice" (include "kuberay.operator.fullname.namespace" .) | trunc 63 | trimSuffix "-" }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.operator.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
rules:
- apiGroups:
- ray.io
resources:
- rayservices
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ray.io
resources:
- rayservices/status
verbs:
- get
---
kind: ClusterRole
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ printf "%s-view-rayservice" (include "kuberay.operator.fullname.namespace" .) | trunc 63 | trimSuffix "-" }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.operator.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
rules:
- apiGroups:
- ray.io
resources:
- rayservices
verbs:
- get
- list
- watch
- apiGroups:
- ray.io
resources:
- rayservices/status
verbs:
- get
{{- end }}

View File

@@ -0,0 +1,168 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.operator.enabled }}
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ template "kuberay.operator.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.operator.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if not .Values.operator.autoscaling.hpa.enabled }}
replicas: {{ .Values.operator.replicaCount }}
{{- end }}
{{- if .Values.operator.updateStrategy }}
strategy: {{- toYaml .Values.operator.updateStrategy | nindent 4 }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.operator.podLabels .Values.commonLabels $versionLabel ) "context" . ) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
template:
metadata:
{{- if .Values.operator.podAnnotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.operator.podAnnotations "context" $) | nindent 8 }}
{{- end }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
spec:
serviceAccountName: {{ template "kuberay.operator.serviceAccountName" . }}
{{- include "kuberay.imagePullSecrets" . | nindent 6 }}
{{- if .Values.operator.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.operator.hostAliases "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.operator.affinity }}
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.operator.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.operator.podAffinityPreset "component" "operator" "customLabels" $podLabels "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.operator.podAntiAffinityPreset "component" "operator" "customLabels" $podLabels "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.operator.nodeAffinityPreset.type "key" .Values.operator.nodeAffinityPreset.key "values" .Values.operator.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.operator.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.operator.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.operator.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.operator.tolerations "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.operator.priorityClassName }}
priorityClassName: {{ .Values.operator.priorityClassName | quote }}
{{- end }}
{{- if .Values.operator.schedulerName }}
schedulerName: {{ .Values.operator.schedulerName | quote }}
{{- end }}
{{- if .Values.operator.topologySpreadConstraints }}
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.operator.topologySpreadConstraints "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.operator.podSecurityContext.enabled }}
securityContext: {{- omit .Values.operator.podSecurityContext "enabled" | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.operator.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ .Values.operator.terminationGracePeriodSeconds }}
{{- end }}
{{- if .Values.operator.initContainers }}
initContainers:
{{- include "common.tplvalues.render" (dict "value" .Values.operator.initContainers "context" $) | nindent 8 }}
{{- end }}
containers:
- name: kuberay-operator
image: {{ template "kuberay.operator.image" . }}
imagePullPolicy: {{ .Values.operator.image.pullPolicy }}
{{- if .Values.operator.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.operator.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.diagnosticMode.enabled }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
{{- else if .Values.operator.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.operator.command "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.diagnosticMode.enabled }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
{{- else if .Values.operator.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.operator.args "context" $) | nindent 12 }}
{{- else }}
args:
- --metrics-addr=:{{ .Values.operator.containerPorts.metrics }}
- --health-probe-bind-address=:{{ .Values.operator.containerPorts.health }}
{{- if not .Values.operator.watchAllNamespaces }}
{{- $namespaces := default (list (include "common.names.namespace" .)) .Values.operator.watchNamespaces }}
- --watch-namespace={{ join "," $namespaces }}
{{- end }}
{{- end }}
{{- if .Values.operator.extraEnvVars }}
env: {{- include "common.tplvalues.render" (dict "value" .Values.operator.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
envFrom:
{{- if .Values.operator.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.operator.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.operator.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.operator.extraEnvVarsSecret "context" $) }}
{{- end }}
{{- if .Values.operator.resources }}
resources: {{- toYaml .Values.operator.resources | nindent 12 }}
{{- end }}
ports:
- name: http-metrics
containerPort: {{ .Values.operator.containerPorts.metrics }}
- name: http-health
containerPort: {{ .Values.operator.containerPorts.health }}
{{- if not .Values.diagnosticMode.enabled }}
{{- if .Values.operator.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.operator.customLivenessProbe "context" $) | nindent 12 }}
{{- else if .Values.operator.livenessProbe.enabled }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.operator.livenessProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: /healthz
port: http-health
{{- end }}
{{- if .Values.operator.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.operator.customReadinessProbe "context" $) | nindent 12 }}
{{- else if .Values.operator.readinessProbe.enabled }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.operator.readinessProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: /healthz
port: http-health
{{- end }}
{{- if .Values.operator.customStartupProbe }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.operator.customStartupProbe "context" $) | nindent 12 }}
{{- else if .Values.operator.startupProbe.enabled }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.operator.startupProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: /healthz
port: http-health
{{- end }}
{{- end }}
{{- if .Values.operator.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.operator.lifecycleHooks "context" $) | nindent 12 }}
{{- end }}
volumeMounts:
- name: tmp
mountPath: /tmp
{{- if .Values.operator.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.operator.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.operator.sidecars }}
{{- include "common.tplvalues.render" ( dict "value" .Values.operator.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
- name: tmp
emptyDir: {}
{{- if .Values.operator.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.operator.extraVolumes "context" $) | nindent 8 }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,50 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.operator.autoscaling.hpa.enabled }}
apiVersion: {{ include "common.capabilities.hpa.apiVersion" ( dict "context" $ ) }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "kuberay.operator.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.operator.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
scaleTargetRef:
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
name: {{ template "kuberay.operator.fullname" . }}
minReplicas: {{ .Values.operator.autoscaling.hpa.minReplicas }}
maxReplicas: {{ .Values.operator.autoscaling.hpa.maxReplicas }}
metrics:
{{- if .Values.operator.autoscaling.hpa.targetCPU }}
- type: Resource
resource:
name: cpu
{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }}
targetAverageUtilization: {{ .Values.operator.autoscaling.hpa.targetCPU }}
{{- else }}
target:
type: Utilization
averageUtilization: {{ .Values.operator.autoscaling.hpa.targetCPU }}
{{- end }}
{{- end }}
{{- if .Values.operator.autoscaling.hpa.targetMemory }}
- type: Resource
resource:
name: memory
{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }}
targetAverageUtilization: {{ .Values.operator.autoscaling.hpa.targetMemory }}
{{- else }}
target:
type: Utilization
averageUtilization: {{ .Values.operator.autoscaling.hpa.targetMemory }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,50 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.operator.ingress.enabled }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.operator.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
{{- if .Values.operator.ingress.secrets }}
{{- range .Values.operator.ingress.secrets }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .name }}
namespace: {{ include "common.names.namespace" $ | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- if $.Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: kubernetes.io/tls
data:
tls.crt: {{ .certificate | b64enc }}
tls.key: {{ .key | b64enc }}
---
{{- end }}
{{- end }}
{{- if and .Values.operator.ingress.tls .Values.operator.ingress.selfSigned }}
{{- $secretName := printf "%s-tls" .Values.operator.ingress.hostname }}
{{- $ca := genCA "kuberay-operator-ca" 365 }}
{{- $cert := genSignedCert .Values.operator.ingress.hostname nil (list .Values.operator.ingress.hostname) 365 $ca }}
apiVersion: v1
kind: Secret
metadata:
name: {{ $secretName }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: kubernetes.io/tls
data:
tls.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.crt" "defaultValue" $cert.Cert "context" $) }}
tls.key: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.key" "defaultValue" $cert.Key "context" $) }}
ca.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "ca.crt" "defaultValue" $ca.Cert "context" $) }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,63 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.operator.enabled .Values.operator.ingress.enabled }}
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ template "kuberay.operator.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.operator.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- if or .Values.operator.ingress.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.operator.ingress.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.operator.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }}
ingressClassName: {{ .Values.operator.ingress.ingressClassName | quote }}
{{- end }}
rules:
{{- if .Values.operator.ingress.hostname }}
- host: {{ .Values.operator.ingress.hostname }}
http:
paths:
{{- if .Values.operator.ingress.extraPaths }}
{{- toYaml .Values.operator.ingress.extraPaths | nindent 10 }}
{{- end }}
- path: {{ .Values.operator.ingress.path }}
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
pathType: {{ .Values.operator.ingress.pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "kuberay.operator.fullname" . | trunc 63 | trimSuffix "-") "servicePort" "http-metrics" "context" $) | nindent 14 }}
{{- end }}
{{- range .Values.operator.ingress.extraHosts }}
- host: {{ .name | quote }}
http:
paths:
- path: {{ default "/" .path }}
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
pathType: {{ default "ImplementationSpecific" .pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "kuberay.operator.fullname" $ | trunc 63 | trimSuffix "-") "servicePort" "http-metrics" "context" $) | nindent 14 }}
{{- end }}
{{- if .Values.operator.ingress.extraRules }}
{{- include "common.tplvalues.render" (dict "value" .Values.operator.ingress.extraRules "context" $) | nindent 4 }}
{{- end }}
{{- if or (and .Values.operator.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.operator.ingress.annotations )) .Values.operator.ingress.selfSigned)) .Values.operator.ingress.extraTls }}
tls:
{{- if and .Values.operator.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.operator.ingress.annotations )) .Values.operator.ingress.selfSigned) }}
- hosts:
- {{ .Values.operator.ingress.hostname | quote }}
secretName: {{ printf "%s-tls" .Values.operator.ingress.hostname }}
{{- end }}
{{- if .Values.operator.ingress.extraTls }}
{{- include "common.tplvalues.render" (dict "value" .Values.operator.ingress.extraTls "context" $) | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,32 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.operator.pdb.create }}
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ template "kuberay.operator.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.operator.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.operator.pdb.minAvailable }}
minAvailable: {{ .Values.operator.pdb.minAvailable }}
{{- end }}
{{- if .Values.operator.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.operator.pdb.maxUnavailable }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.operator.podLabels .Values.commonLabels ) "context" . ) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- end }}

View File

@@ -0,0 +1,316 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.operator.enabled .Values.operator.rbac.create }}
kind: Role
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ printf "%s-leader-election" (include "kuberay.operator.fullname" .) | trunc 63 | trimSuffix "-" }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.operator.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- configmaps/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- create
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- create
- get
- list
- update
{{- if not .Values.operator.watchAllNamespaces }}
{{- $watchNamespaces := default (list (include "common.names.namespace" .)) .Values.operator.watchNamespaces }}
{{- range $namespace := $watchNamespaces }}
---
kind: Role
apiVersion: {{ include "common.capabilities.rbac.apiVersion" $ }}
metadata:
name: {{ include "kuberay.operator.fullname" $ | trunc 63 | trimSuffix "-" }}
namespace: {{ $namespace | quote }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" $.Values.operator.image "chart" $.Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list $.Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- if $.Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
rules:
- apiGroups:
- batch
resources:
- jobs
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- create
- get
- list
- update
- apiGroups:
- ""
resources:
- events
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- pods
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- pods/status
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- create
- delete
- get
- list
- watch
- apiGroups:
- ""
resources:
- services
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- services/status
verbs:
- get
- patch
- update
- apiGroups:
- extensions
resources:
- ingresses
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- networking.k8s.io
resources:
- ingressclasses
verbs:
- get
- list
- watch
- apiGroups:
- networking.k8s.io
resources:
- ingresses
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ray.io
resources:
- rayclusters
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ray.io
resources:
- rayclusters/finalizers
verbs:
- update
- apiGroups:
- ray.io
resources:
- rayclusters/status
verbs:
- get
- patch
- update
- apiGroups:
- ray.io
resources:
- rayjobs
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ray.io
resources:
- rayjobs/finalizers
verbs:
- update
- apiGroups:
- ray.io
resources:
- rayjobs/status
verbs:
- get
- patch
- update
- apiGroups:
- ray.io
resources:
- rayservices
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ray.io
resources:
- rayservices/finalizers
verbs:
- update
- apiGroups:
- ray.io
resources:
- rayservices/status
verbs:
- get
- patch
- update
- apiGroups:
- rbac.authorization.k8s.io
resources:
- rolebindings
verbs:
- create
- delete
- get
- list
- watch
- apiGroups:
- rbac.authorization.k8s.io
resources:
- roles
verbs:
- create
- delete
- get
- list
- update
- watch
{{- if $.Values.operator.enableBatchScheduler }}
- apiGroups:
- scheduling.volcano.sh
resources:
- podgroups
verbs:
- create
- delete
- get
- list
- update
- watch
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- get
{{- end }}
{{- if $.Values.operator.rbac.rules }}
{{- include "common.tplvalues.render" ( dict "value" $.Values.operator.rbac.rules "context" $ ) | nindent 2 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,55 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.operator.enabled .Values.operator.rbac.create }}
kind: RoleBinding
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ printf "%s-leader-election" (include "kuberay.operator.fullname" .) | trunc 63 | trimSuffix "-" }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.operator.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ printf "%s-leader-election" (include "kuberay.operator.fullname" .) | trunc 63 | trimSuffix "-" }}
subjects:
- kind: ServiceAccount
name: {{ template "kuberay.operator.serviceAccountName" . }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- if not .Values.operator.watchAllNamespaces }}
{{- $watchNamespaces := default (list (include "common.names.namespace" .)) .Values.operator.watchNamespaces }}
{{- range $namespace := $watchNamespaces }}
---
kind: RoleBinding
apiVersion: {{ include "common.capabilities.rbac.apiVersion" $ }}
metadata:
name: {{ include "kuberay.operator.fullname" $ | trunc 63 | trimSuffix "-" }}
namespace: {{ $namespace | quote }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" $.Values.operator.image "chart" $.Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list $.Values.commonLabels $versionLabel ) "context" $ ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- if $.Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "kuberay.operator.fullname" $ | trunc 63 | trimSuffix "-" }}
subjects:
- kind: ServiceAccount
name: {{ template "kuberay.operator.serviceAccountName" $ }}
namespace: {{ include "common.names.namespace" $ | quote }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,20 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.operator.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "kuberay.operator.serviceAccountName" . }}
namespace: {{ .Release.Namespace | quote }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.operator.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
{{- if or .Values.operator.serviceAccount.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.operator.serviceAccount.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.operator.serviceAccount.automountServiceAccountToken }}
{{- end }}

View File

@@ -0,0 +1,64 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.operator.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "kuberay.operator.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.operator.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- if or .Values.operator.service.annotations .Values.commonAnnotations (and .Values.operator.metrics.enabled .Values.operator.metrics.annotations) }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.operator.service.annotations .Values.commonAnnotations ) "context" . ) }}
annotations:
{{- if or .Values.operator.service.annotations .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
{{- if and .Values.operator.metrics.enabled .Values.operator.metrics.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.operator.metrics.annotations "context" $) | nindent 4 }}
{{- end }}
{{- end }}
spec:
type: {{ .Values.operator.service.type }}
{{- if and .Values.operator.service.clusterIP (eq .Values.operator.service.type "ClusterIP") }}
clusterIP: {{ .Values.operator.service.clusterIP }}
{{- end }}
{{- if .Values.operator.service.sessionAffinity }}
sessionAffinity: {{ .Values.operator.service.sessionAffinity }}
{{- end }}
{{- if .Values.operator.service.sessionAffinityConfig }}
sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.operator.service.sessionAffinityConfig "context" $) | nindent 4 }}
{{- end }}
{{- if or (eq .Values.operator.service.type "LoadBalancer") (eq .Values.operator.service.type "NodePort") }}
externalTrafficPolicy: {{ .Values.operator.service.externalTrafficPolicy | quote }}
{{- end }}
{{- if and (eq .Values.operator.service.type "LoadBalancer") (not (empty .Values.operator.service.loadBalancerSourceRanges)) }}
loadBalancerSourceRanges: {{ .Values.operator.service.loadBalancerSourceRanges }}
{{- end }}
{{- if and (eq .Values.operator.service.type "LoadBalancer") (not (empty .Values.operator.service.loadBalancerIP)) }}
loadBalancerIP: {{ .Values.operator.service.loadBalancerIP }}
{{- end }}
ports:
- name: http-metrics
port: {{ .Values.operator.service.ports.metrics }}
protocol: TCP
{{- if and (or (eq .Values.operator.service.type "NodePort") (eq .Values.operator.service.type "LoadBalancer")) (not (empty .Values.operator.service.nodePorts.metrics)) }}
nodePort: {{ .Values.operator.service.nodePorts.metrics }}
{{- else if eq .Values.operator.service.type "ClusterIP" }}
nodePort: null
{{- end }}
targetPort: http-metrics
{{- if .Values.operator.service.extraPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.operator.service.extraPorts "context" $) | nindent 4 }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.operator.podLabels .Values.commonLabels ) "context" . ) }}
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- end }}

View File

@@ -0,0 +1,50 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.operator.metrics.enabled .Values.operator.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "kuberay.operator.fullname" . }}
namespace: {{ default (include "common.names.namespace" .) .Values.operator.metrics.serviceMonitor.namespace | quote }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.operator.metrics.serviceMonitor.labels .Values.commonLabels ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- if or .Values.operator.metrics.serviceMonitor.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.operator.metrics.serviceMonitor.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec:
jobLabel: {{ .Values.operator.metrics.serviceMonitor.jobLabel | quote }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- if .Values.operator.metrics.serviceMonitor.selector }}
{{- include "common.tplvalues.render" (dict "value" .Values.operator.metrics.serviceMonitor.selector "context" $) | nindent 6 }}
{{- end }}
endpoints:
- port: http-metrics
path: "/metrics"
{{- if .Values.operator.metrics.serviceMonitor.interval }}
interval: {{ .Values.operator.metrics.serviceMonitor.interval }}
{{- end }}
{{- if .Values.operator.metrics.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.operator.metrics.serviceMonitor.scrapeTimeout }}
{{- end }}
{{- if .Values.operator.metrics.serviceMonitor.honorLabels }}
honorLabels: {{ .Values.operator.metrics.serviceMonitor.honorLabels }}
{{- end }}
{{- if .Values.operator.metrics.serviceMonitor.metricRelabelings }}
metricRelabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.operator.metrics.serviceMonitor.metricRelabelings "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.operator.metrics.serviceMonitor.relabelings }}
relabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.operator.metrics.serviceMonitor.relabelings "context" $) | nindent 8 }}
{{- end }}
namespaceSelector:
matchNames:
- {{ include "common.names.namespace" . | quote }}
{{- end }}

View File

@@ -0,0 +1,47 @@
{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and (.Capabilities.APIVersions.Has "autoscaling.k8s.io/v1/VerticalPodAutoscaler") .Values.operator.autoscaling.vpa.enabled }}
apiVersion: {{ include "common.capabilities.vpa.apiVersion" . }}
kind: VerticalPodAutoscaler
metadata:
name: {{ include "kuberay.operator.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.operator.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kuberay
app.kubernetes.io/component: operator
{{- if or .Values.operator.autoscaling.vpa.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.operator.autoscaling.vpa.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec:
resourcePolicy:
containerPolicies:
- containerName: kuberay-operator
{{- with .Values.operator.autoscaling.vpa.controlledResources }}
controlledResources:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.operator.autoscaling.vpa.maxAllowed }}
maxAllowed:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.operator.autoscaling.vpa.minAllowed }}
minAllowed:
{{- toYaml . | nindent 8 }}
{{- end }}
targetRef:
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
name: {{ include "kuberay.operator.fullname" . }}
{{- if .Values.operator.autoscaling.vpa.updatePolicy }}
updatePolicy:
{{- with .Values.operator.autoscaling.vpa.updatePolicy.updateMode }}
updateMode: {{ . }}
{{- end }}
{{- end }}
{{- end }}

1629
bitnami/kuberay/values.yaml Normal file

File diff suppressed because it is too large Load Diff