Skip to content

Values

Learn deployKF values (configs) and how to configure them.


Overview

All aspects of your deployKF platform are configured with YAML-based configs named "values". There are a very large number of values (more than 1500), but as deployKF supports in-place upgrades you can start with a few important ones, and then grow your values file over time.

See the configuring deployKF page for guides that explain common configuration tasks.

Custom Values

When you set a value, you are overriding its default. The defaults may vary between deployKF versions, and are found in the corresponding default_values.yaml file.

For example, to connect Kubeflow Pipelines to an external MySQL database, you might set the following values in your custom-values.yaml file:

kubeflow_tools:
  pipelines:
    mysql:
      useExternal: true
      host: "mysql.example.com"
      port: 3306
      auth:
        ## WARNING: in the real world, read the credentials from a secret
        ##          see https://www.deploykf.org/guides/external/mysql/
        username: my-username
        password: my-password

YAML Syntax

For a refresher on YAML syntax, we recommend the following resources:

Sample Values

Each version of deployKF has a corresponding sample-values.yaml file with all supported ML & Data tools enabled, along with some sensible security defaults. We recommend using these samples as a starting point for your custom values.

There are two main ways to use the sample values file:

  1. Directly: Copy the sample-values.yaml file and make changes directly to that file.
  2. Overrides: Include the default sample-values.yaml file first, and then include one or more "overrides" files that only contain the values you want to change.

The following command will download the sample values for the latest deployKF version:

curl -fL -o "sample-values-0.1.4.yaml" \
  "https://raw.githubusercontent.com/deployKF/deployKF/v0.1.4/sample-values.yaml"

We provide sample-values-overrides.yaml as an example of how you might structure an "overrides" file for the sample values.

Additional Values

The sample-values.yaml file is a great starting point, but it does NOT include all possible values. For your reference, ALL values and their defaults are listed on the values reference page, which is generated from the full default_values.yaml file of the latest deployKF version.

Merging Values

You may define your custom values in one or more files, which together form the complete "desired state" of your deployKF platform.

When multiple values files are used, they are merged together in the order they are passed to the deploykf command or plugin. This means that if a value is defined in multiple files, the last one wins.

Merging Lists

List values are NOT merged. If a list is redefined, the new list will replace the old one in full.

Example

This example will demonstrate how values are merged together. Including both map-type and list-type values. In this example, we have two values files:

values-1.yaml
deploykf_core:
  deploykf_auth:
    dex:
      staticPasswords:
        - email: "user1@example.com"
          password:
            value: "password1"

        - email: "user2@example.com"
          password:
            value: "password2"

kubeflow_tools:
  pipelines:
    mysql:
      host: "mysql_OLD.example.com"
values-2.yaml
deploykf_core:
  deploykf_auth:
    dex:
      staticPasswords:
        - email: "user3@example.com"
          password:
            value: "password3"

kubeflow_tools:
  pipelines:
    mysql:
      host: "mysql_NEW.example.com"

In manifests repo mode, if you pass these files to the deploykf command in the following order:

deploykf generate \
  --source-version "0.1.4" \
  --values ./values-1.yaml \
  --values ./values-2.yaml \
  --output-dir ./GENERATOR_OUTPUT

In ArgoCD plugin mode, if you pass these files under values_files in the following order:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: deploykf-app-of-apps
  namespace: argocd
  labels:
    app.kubernetes.io/name: deploykf-app-of-apps
    app.kubernetes.io/part-of: deploykf
spec:
  project: "default"
  source:

    ## source git repo configuration
    ##
    repoURL: "https://github.com/<EXAMPLE_ORG>/<EXAMPLE_REPO>.git"
    targetRevision: "main"
    path: "."

    ## plugin configuration
    ##
    plugin:
      name: "deploykf"
      parameters:

        ## the deployKF generator version
        ##
        - name: "source_version"
          string: "0.1.4"

        ## paths to values files within the `repoURL` repository
        ##
        - name: "values_files"
          array:
            - "./sample-values-0.1.4.yaml"
            - "./values-1.yaml"
            - "./values-2.yaml"

        ## a string containing the contents of a values file
        ##  - we are not using this in this example
        ##  - values defined here have the highest precedence
        ##
        #- name: "values"
        #  string: |
        #    ...
        #    values file contents
        #    ...

  destination:
    server: "https://kubernetes.default.svc"
    namespace: "argocd"

The resulting "merged" values will be as follows (with the default values omitted for brevity):

deploykf_core:
  deploykf_auth:
    dex:
      ## NOTE: list values are NOT merged, they are replaced in full
      staticPasswords:
        - email: "user3@example.com"
          password:
            value: "password3"

kubeflow_tools:
  pipelines:
    mysql:
      ## NOTE: for map values, the last one wins
      host: "mysql_NEW.example.com"

Last update: 2024-05-10
Created: 2024-05-10