### Install helm-docs Source: https://github.com/castai/helm-charts/blob/main/README.md Install the helm-docs utility using Homebrew. ```console brew install norwoodj/tap/helm-docs ``` -------------------------------- ### Install CAST AI Helm Chart Source: https://github.com/castai/helm-charts/blob/main/charts/castai-umbrella/README.md Basic installation command for the CAST AI chart. Replace placeholders for API key, URL, and provider. Select the desired mode tag (e.g., `tags.readonly=true`). ```shell helm repo add castai-helm https://castai.github.io/helm-charts helm repo update helm upgrade --install castai castai-helm/castai \ --namespace castai-agent --create-namespace \ --set global.castai.apiKey= \ --set global.castai.apiURL=https://api.cast.ai \ --set global.castai.provider= \ --set tags.readonly=true ``` -------------------------------- ### Install Kent Profile for EKS Source: https://github.com/castai/helm-charts/blob/main/charts/castai-umbrella/README.md Install the CastAI Helm chart with the Kent profile enabled for EKS clusters. Authentication uses a pre-created credentials secret. ```shell helm upgrade --install castai castai-helm/castai \ --namespace castai-agent --create-namespace \ --set global.castai.apiURL=https://api.cast.ai \ --set kent.enabled=true ``` -------------------------------- ### Install Autoscaler Anywhere Source: https://github.com/castai/helm-charts/blob/main/charts/castai-umbrella/README.md Install the CastAI Helm chart with the Autoscaler Anywhere profile enabled. This is for non-managed Kubernetes clusters. ```shell helm upgrade --install castai castai-helm/castai \ --namespace castai-agent --create-namespace \ --set global.castai.apiURL=https://api.cast.ai \ --set global.castai.apiKey= \ --set tags.autoscaler-anywhere=true \ --set autoscaler-anywhere.castai-agent.additionalEnv.ANYWHERE_CLUSTER_NAME= ``` -------------------------------- ### Configure Kent Profile Components Source: https://github.com/castai/helm-charts/blob/main/charts/castai-umbrella/README.md Configure individual components of the Kent profile using Helm values. This example enables the metrics-server and sets the replica count for the castai-live controller. ```shell helm upgrade castai castai-helm/castai \ --namespace castai-agent \ --reset-then-reuse-values \ --set kent.metrics-server.enabled=true \ --set kent.castai-live.controller.replicaCount=2 ``` -------------------------------- ### Verify Temporal Pods Source: https://github.com/castai/helm-charts/blob/main/charts/temporal/templates/NOTES.txt Use this command to check if Temporal pods have started successfully after deployment. Ensure the namespace and instance labels match your release configuration. ```bash kubectl --namespace={{ .Release.Namespace }} get pods -l "app.kubernetes.io/instance={{ .Release.Name }}" ``` -------------------------------- ### Configure Autoscaler Anywhere Component Source: https://github.com/castai/helm-charts/blob/main/charts/castai-umbrella/README.md Configure individual components of the Autoscaler Anywhere profile using Helm values. This example enables aggressive mode for the castai-evictor. ```shell helm upgrade castai castai-helm/castai \ --namespace castai-agent \ --reset-then-reuse-values \ --set autoscaler-anywhere.castai-evictor.aggressiveMode=true ``` -------------------------------- ### Configure Individual Components via Helm Set Source: https://github.com/castai/helm-charts/blob/main/charts/castai-umbrella/README.md Configure specific CastAI components by passing values prefixed with `autoscaler..*`. This example sets the replica count for `castai-agent` and memory requests for `castai-evictor`. ```shell helm upgrade --install castai castai-helm/castai \ --namespace castai-agent --create-namespace \ --set global.castai.apiKey= \ --set global.castai.apiURL=https://api.cast.ai \ --set global.castai.provider=eks \ --set tags.full=true \ --set autoscaler.castai-agent.replicaCount=2 \ --set autoscaler.castai-evictor.resources.requests.memory=256Mi ``` -------------------------------- ### Install CAST AI with External Secret Source: https://github.com/castai/helm-charts/blob/main/charts/castai-umbrella/README.md Installs the CAST AI chart using a pre-created Kubernetes secret for credentials. Ensure the secret exists in the same namespace as the Helm release and contains an `API_KEY` key. ```shell kubectl create namespace castai-agent kubectl create secret generic my-castai-credentials \ --namespace castai-agent \ --from-literal=API_KEY= helm upgrade --install castai castai-helm/castai \ --namespace castai-agent --create-namespace \ --set global.castai.apiKeySecretRef=my-castai-credentials \ --set global.castai.apiURL=https://api.cast.ai \ --set global.castai.provider= \ --set tags.readonly=true ``` -------------------------------- ### Disable a Specific Component Source: https://github.com/castai/helm-charts/blob/main/charts/castai-umbrella/README.md Exclude a component from the deployment by setting its `enabled` flag to `false`. This example disables the `castai-kvisor` component. ```shell helm upgrade castai castai-helm/castai \ --namespace castai-agent \ --reset-then-reuse-values \ --set autoscaler.castai-kvisor.enabled=false ``` -------------------------------- ### Create CastAI Credentials Secret Source: https://github.com/castai/helm-charts/blob/main/charts/castai-umbrella/README.md Create a Kubernetes secret to store your CastAI API token for authentication. This is a prerequisite for installing CastAI components. ```shell kubectl create namespace castai-agent kubectl create secret generic castai-credentials \ --namespace castai-agent \ --from-literal=TOKEN= ``` -------------------------------- ### Conditional Logic for CAST AI Deployment Modes Source: https://github.com/castai/helm-charts/blob/main/charts/castai-umbrella/templates/NOTES.txt This template snippet uses Helm's conditional logic to select the appropriate installation mode based on `.Values.kent.enabled` or specific tags within `.Values.tags`. Ensure your `values.yaml` file is configured correctly for the desired mode. ```yaml {{- if .Values.kent.enabled }} Thanks for installing CAST AI in Karpenter Enterprise mode. {{- else if index .Values.tags "autoscaler-anywhere" }} Thanks for installing CAST AI in Autoscaler Anywhere mode. {{- else if index .Values.tags "autoscaler-openshift" }} Thanks for installing CAST AI in Autoscaler OpenShift mode. {{- else if index .Values.tags "readonly" }} Thanks for installing CAST AI in Readonly mode. {{- else if index .Values.tags "node-autoscaler" }} Thanks for installing CAST AI in Node Autoscaler mode. {{- else if index .Values.tags "workload-autoscaler" }} Thanks for installing CAST AI in Workload Autoscaler mode. {{- else if index .Values.tags "full" }} Thanks for installing CAST AI. {{- else }} Thanks for installing CAST AI. {{- end }} ``` -------------------------------- ### Install CAST AI with ExternalSecrets Operator Source: https://github.com/castai/helm-charts/blob/main/charts/castai-umbrella/README.md Configuration for integrating CAST AI with External Secrets Operator (ESO). This allows provisioning the credentials secret directly from a secret store, eliminating manual secret creation. ```yaml global: castai: apiKey: "" # leave empty — ExternalSecret creates the secret apiKeySecretRef: castai-credentials # any name — must match target.name below apiURL: "https://api.cast.ai" provider: eks tags: full: true extraObjects: - apiVersion: external-secrets.io/v1beta1 kind: ExternalSecret metadata: name: castai-api-key-sync spec: refreshInterval: 1h secretStoreRef: name: my-secret-store # your SecretStore or ClusterSecretStore name kind: SecretStore target: name: castai-credentials # must match global.castai.apiKeySecretRef creationPolicy: Owner data: - secretKey: API_KEY # must be exactly this remoteRef: key: castai/api-key # path in your secret store ``` -------------------------------- ### Apply Configuration from Values File Source: https://github.com/castai/helm-charts/blob/main/charts/castai-umbrella/README.md Apply the configurations defined in a `values.yaml` file to the CastAI Helm chart. ```shell helm upgrade --install castai castai-helm/castai \ --namespace castai-agent --create-namespace \ -f values.yaml ``` -------------------------------- ### Project directory structure Source: https://github.com/castai/helm-charts/blob/main/test/e2e/RREADME.md Overview of the test/e2e directory layout for the project. ```text test/e2e/ ├── suite_test.go # Ginkgo entry point, BeforeSuite/AfterSuite ├── umbrella_test.go # All test specs (kent, autoscaler, upgrade, uninstall) ├── helpers.go # KindHelper, UmbrellaHelmHelper, PodHelper, NamespaceHelper ├── kind_helper.go # Kind cluster lifecycle ├── utils/ │ └── utils.go # Run(), GetNonEmptyLines() ├── go.mod ├── Makefile └── README.md ``` -------------------------------- ### Generate chart documentation Source: https://github.com/castai/helm-charts/blob/main/README.md Commands to generate documentation for specific charts or all charts in the repository. ```makefile make docs-{chart-name} ``` ```makefile make docs-all ``` -------------------------------- ### Configure Individual Components via Values File Source: https://github.com/castai/helm-charts/blob/main/charts/castai-umbrella/README.md Alternatively, configure individual CastAI components using a YAML values file. This approach is useful for managing complex configurations. ```yaml global: castai: apiKey: "" apiURL: "https://api.cast.ai" provider: eks tags: full: true autoscaler: castai-agent: replicaCount: 2 castai-evictor: resources: requests: memory: 256Mi ``` -------------------------------- ### Run e2e tests via Makefile Source: https://github.com/castai/helm-charts/blob/main/test/e2e/RREADME.md Commands to execute specific test suites or all tests using the project Makefile. Requires a valid CASTAI_API_KEY environment variable. ```bash # Run all test contexts (each gets its own Kind cluster) CASTAI_API_KEY= make e2e # Run only kent mode CASTAI_API_KEY= make e2e-kent # Run only autoscaler mode CASTAI_API_KEY= make e2e-autoscaler # Run only autoscaler-anywhere mode CASTAI_API_KEY= make e2e-autoscaler-anywhere # Run uninstall test CASTAI_API_KEY= make e2e-uninstall ``` -------------------------------- ### Add CAST AI Helm repository Source: https://github.com/castai/helm-charts/blob/main/README.md Register the CAST AI Helm repository to your local Helm configuration. ```console helm repo add castai-helm https://castai.github.io/helm-charts ``` -------------------------------- ### Upgrade Between Modes with Value Preservation Source: https://github.com/castai/helm-charts/blob/main/charts/castai-umbrella/README.md Use this command to upgrade the CastAI Helm chart to a new mode while preserving existing configuration. The `--reset-then-reuse-values` flag is crucial for maintaining settings. ```shell helm upgrade castai castai-helm/castai \ --namespace castai-agent \ --reset-then-reuse-values \ --set tags.readonly=false \ --set tags.full=true ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.