union-operator

by [email protected]

Helm chartv0.0.91App v0.0.91

Deploys Union Operator to onboard a k8s cluster to Union Cloud

About this chart

union-operator

Deploys Union Operator to onboard a k8s cluster to Union Cloud

Requirements

RepositoryNameVersion
https://flyteorg.github.io/flyte/union(flyte-core)v1.9.0
https://opencost.github.io/opencost-helm-chartopencostv1.19.3

SANDBOX INSTALLATION:

helm repo add unionai https://unionai.github.io/unionoperator/
helm repo update
helm install -n union-operator -f values.yaml --create-namespace union-operator unionai/union-operator

Customize your installation by changing settings in a new file values.yaml.

Then apply your changes:

helm upgrade -f values.yaml union-operator unionai/union-operator -n union-operator

CONFIGURATION NOTES:

Values

KeyTypeDefaultDescription
flyteagent.additionalContainerslist[]Appends additional containers to the deployment spec. May include template values.
flyteagent.additionalVolumeMountslist[]Appends additional volume mounts to the main container's spec. May include template values.
flyteagent.additionalVolumeslist[]Appends additional volumes to the deployment spec. May include template values.
flyteagent.affinityobject{}affinity for flyteagent deployment
flyteagent.configPathstring"/etc/flyteagent/config/*.yaml"Default regex string for searching configuration files
flyteagent.enabledboolfalse
flyteagent.extraArgsobject{}Appends extra command line arguments to the main command
flyteagent.image.pullPolicystring"IfNotPresent"Docker image pull policy
flyteagent.image.repositorystring"ghcr.io/flyteorg/flyteagent"Docker image for flyteagent deployment
flyteagent.image.tagstring"ga-v1"Docker image tag
flyteagent.nodeSelectorobject{}nodeSelector for flyteagent deployment
flyteagent.podAnnotationsobject{}Annotations for flyteagent pods
flyteagent.ports.containerPortint8000
flyteagent.ports.namestring"agent-grpc"
flyteagent.priorityClassNamestring""Sets priorityClassName for datacatalog pod(s).
flyteagent.prometheusPort.containerPortint9090
flyteagent.prometheusPort.namestring"agent-metric"
flyteagent.replicaCountint1Replicas count for flyteagent deployment
flyteagent.resourcesobject{"limits":{"cpu":"500m","ephemeral-storage":"100Mi","memory":"500Mi"},"requests":{"cpu":"10m","ephemeral-storage":"50Mi","memory":"50Mi"}}Default resources requests and limits for flyteagent deployment
flyteagent.serviceobject{"clusterIP":"None","type":"ClusterIP"}Service settings for flyteagent
flyteagent.serviceAccountobject{"annotations":{},"create":true,"imagePullSecrets":[]}Configuration for service accounts for flyteagent
flyteagent.serviceAccount.annotationsobject{}Annotations for ServiceAccount attached to flyteagent pods
flyteagent.serviceAccount.createbooltrueShould a service account be created for flyteagent
flyteagent.serviceAccount.imagePullSecretslist[]ImagePullSecrets to automatically assign to the service account
flyteagent.tolerationslist[]tolerations for flyteagent deployment
minio.affinityobject{}affinity for Minio deployment
minio.image.pullPolicystring"IfNotPresent"Docker image pull policy
minio.image.repositorystring"ecr.flyte.org/bitnami/minio"Docker image for Minio deployment
minio.image.tagstring"2021.10.13-debian-10-r0"Docker image tag
minio.nodeSelectorobject{}nodeSelector for Minio deployment
minio.persistence.enabledboolfalse
minio.persistence.persistentVolumeClaimNamestring""
minio.podAnnotationsobject{}Annotations for Minio pods
minio.replicaCountint1Replicas count for Minio deployment
minio.resourcesobject{"limits":{"cpu":"200m","memory":"512Mi"},"requests":{"cpu":"10m","memory":"128Mi"}}Default resources requests and limits for Minio deployment
minio.resources.limitsobject{"cpu":"200m","memory":"512Mi"}Limits are the maximum set of resources needed for this pod
minio.resources.requestsobject{"cpu":"10m","memory":"128Mi"}Requests are the minimum set of resources needed for this pod
minio.serviceobject{"annotations":{},"type":"ClusterIP"}Service settings for Minio
minio.tolerationslist[]tolerations for Minio deployment
opencost.fullnameOverridestring"opencost"
opencost.opencost.prometheus.external.enabledboolfalse
opencost.opencost.prometheus.internal.enabledboolfalse
opencost.opencost.ui.enabledboolfalse
union.appIdstring"<App Id from uctl create app>"
union.appSecretstring"<App Secret from uctl create app>"
union.cloudUrlstring"<Union Cloud URL>"
union.clusterNamestring""
union.cluster_resource_manager.config.cluster_resources.customData[0].production[0].projectQuotaCpu.valuestring"4096"
union.cluster_resource_manager.config.cluster_resources.customData[0].production[1].projectQuotaMemory.valuestring"2Ti"
union.cluster_resource_manager.config.cluster_resources.customData[0].production[2].projectQuotaNvidiaGpu.valuestring"256"
union.cluster_resource_manager.config.cluster_resources.customData[0].production[3].defaultUserRoleKey.valuestring"{{ tpl .Values.userRoleAnnotationKey . }}"
union.cluster_resource_manager.config.cluster_resources.customData[0].production[4].defaultUserRoleValue.valuestring"{{ tpl .Values.userRoleAnnotationValue . }}"
union.cluster_resource_manager.config.cluster_resources.customData[1].staging[0].projectQuotaCpu.valuestring"4096"
union.cluster_resource_manager.config.cluster_resources.customData[1].staging[1].projectQuotaMemory.valuestring"2Ti"
union.cluster_resource_manager.config.cluster_resources.customData[1].staging[2].projectQuotaNvidiaGpu.valuestring"256"
union.cluster_resource_manager.config.cluster_resources.customData[1].staging[3].defaultUserRoleKey.valuestring"{{ tpl .Values.userRoleAnnotationKey . }}"
union.cluster_resource_manager.config.cluster_resources.customData[1].staging[4].defaultUserRoleValue.valuestring"{{ tpl .Values.userRoleAnnotationValue . }}"
union.cluster_resource_manager.config.cluster_resources.customData[2].development[0].projectQuotaCpu.valuestring"4096"
union.cluster_resource_manager.config.cluster_resources.customData[2].development[1].projectQuotaMemory.valuestring"2Ti"
union.cluster_resource_manager.config.cluster_resources.customData[2].development[2].projectQuotaNvidiaGpu.valuestring"256"
union.cluster_resource_manager.config.cluster_resources.customData[2].development[3].defaultUserRoleKey.valuestring"{{ tpl .Values.userRoleAnnotationKey . }}"
union.cluster_resource_manager.config.cluster_resources.customData[2].development[4].defaultUserRoleValue.valuestring"{{ tpl .Values.userRoleAnnotationValue . }}"
union.cluster_resource_manager.config.cluster_resources.standaloneDeploymentbooltrue
union.cluster_resource_manager.enabledbooltrue
union.cluster_resource_manager.service_account_namestring"clustersync-resource"
union.cluster_resource_manager.standalone_deploybooltrue
union.cluster_resource_manager.templates[0]object{"key":"a_namespace.yaml","value":"apiVersion: v1\nkind: Namespace\nmetadata:\n name: {{ namespace }}\n labels:\n union.ai/namespace-type: flyte\nspec:\n finalizers:\n - kubernetes\n"}Template for namespaces resources
union.cluster_resource_manager.templates[1]object{"key":"b_default_service_account.yaml","value":"apiVersion: v1\nkind: ServiceAccount\nmetadata:\n name: default\n namespace: {{ namespace }}\n annotations:\n {{ defaultUserRoleKey }}: {{ defaultUserRoleValue }}\n"}Patch default service account
union.cluster_resource_manager.templates[2].keystring"c_project_resource_quota.yaml"
union.cluster_resource_manager.templates[2].valuestring"apiVersion: v1\nkind: ResourceQuota\nmetadata:\n name: project-quota\n namespace: {{ namespace }}\nspec:\n hard:\n limits.cpu: {{ projectQuotaCpu }}\n limits.memory: {{ projectQuotaMemory }}\n requests.nvidia.com/gpu: {{ projectQuotaNvidiaGpu }}\n"
union.collectUsages.enabledboolfalse
union.common.ingress.enabledboolfalse
union.configmapobject`{"admin":{"admin":{"clientId":"{{ tpl .Values.appId . }}","clientSecretLocation":"/etc/secrets/client_secret","endpoint":"{{- printf "dns:///%s" (.Values.cloudUrltrimPrefix "dns:///"
union.configmap.adminobject`{"admin":{"clientId":"{{ tpl .Values.appId . }}","clientSecretLocation":"/etc/secrets/client_secret","endpoint":"{{- printf "dns:///%s" (.Values.cloudUrltrimPrefix "dns:///"
union.configmap.catalogobject`{"catalog-cache":{"endpoint":"{{- printf "dns:///%s" (.Values.cloudUrltrimPrefix "dns:///"
union.configmap.coreobject{"cache":{"max_size_mbs":1024,"target_gc_percent":70},"manager":{"shard":{"shard-count":3,"type":"Hash"}},"propeller":{"event-config":{"raw-output-policy":"inline"},"gc-interval":"12h","kube-client-config":{"burst":25,"qps":100,"timeout":"30s"},"leader-election":{"enabled":false},"max-workflow-retries":50,"queue":{"batch-size":-1,"batching-interval":"1s","queue":{"base-delay":"0s","capacity":10000,"max-delay":"60s","rate":1000,"type":"maxof"},"sub-queue":{"capacity":10000,"rate":1000,"type":"bucket"},"type":"batch"},"rawoutput-prefix":"{{ tpl .Values.metadataBucketPrefix $ }}","workers":40},"webhook":{"certDir":"/etc/webhook/certs","serviceName":"flyte-pod-webhook"}}Core propeller configuration
union.configmap.core.propellerobject{"event-config":{"raw-output-policy":"inline"},"gc-interval":"12h","kube-client-config":{"burst":25,"qps":100,"timeout":"30s"},"leader-election":{"enabled":false},"max-workflow-retries":50,"queue":{"batch-size":-1,"batching-interval":"1s","queue":{"base-delay":"0s","capacity":10000,"max-delay":"60s","rate":1000,"type":"maxof"},"sub-queue":{"capacity":10000,"rate":1000,"type":"bucket"},"type":"batch"},"rawoutput-prefix":"{{ tpl .Values.metadataBucketPrefix $ }}","workers":40}Propeller config specified here. These values are chosen to match a mix of propeller config defaults (many of which are overridden in the Chart's values.yaml), along with cloud-specific settings from [here](https://github.com/flyteorg/flyte/blob/e6fa8120

Deploy union-operator with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has union-operator on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartunion-operator is pinned at v0.0.91 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply