Kustomize

Intro

Rok and Kubeflow use Kustomize to define, configure and deploy their manifests in a customizable and GitOps-friendly way. This document aims to familiarize you with the ways we use kustomize.

Installing multiple kustomizations

To ease the GitOps process, we have developed a Kustomize plugin that allows for combining different kustomizations together into a single-toplevel one. Currently our manifests ship two separate toplevel kustomizations: one for installing Rok standalone, and one for installing Kubeflow on top of Rok.

This plugin introduces a custom generator, KustomizeInflator, which takes multiple kustomization paths as input and emits the result of kustomize build as output. The example below is a snippet taken from Rok’s generator:

apiVersion: builtin
kind: KustomizeInflator
metadata:
  name: rok
kustomizationPaths:
# Rok Namespaces
- ../../rok/rok-namespaces/overlays/deploy
# Rok External Services
- ../../rok/rok-external-services/etcd/overlays/deploy
- ../../rok/rok-external-services/postgresql/overlays/deploy
- ../../rok/rok-external-services/redis/overlays/deploy
# Rok Components
...

The generator above is actually the plugin’s configuration file, which is the only thing declared in the kustomization.yaml.