Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Overview

This document will cover the steps required to configure a cluster with a defined version.

When configuring a cluster's deployment we will be defining the following:

  • Version of helm charts and images
  • Components to be installed.
  • Custom configurations/overrides

Background

Our components are deployed using Flux.

Flux is a tool that allows us to define the components to install on a cluster. After initial installation, Flux will poll the source(GitLab) and apply any changes.


In our configuration, we use GitLab as our source for defining multiple Helm Releases. A Helm Release defines the helm chart and configuration values to use for a particular component. 


Releases

Using Kustomize, we can package our components into releases. This is done by applying overrides on top of the base layer. 



Cluster Layer

The cluster layer defines what release to use and the overrides to apply for the specific cluster.

These overrides include such things as:

  • Helm Chart and Container Registry
  • Host Aliases
  • Cluster specific values


Code Block
languageyml
titleclusters/acm/onprem/components/kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# ---------------------------------------------------------------------------
# Resources
# core    - contains core components
# infra   - contains nginx-ingress controller used in develop and test environments
# extras  - contains extra components used in develop and test environments
# monitoring - contains components used for monitoring
# usecases - contains etls for the various use cases
#
# additional helmreleases can be included in the custom folder
# and referenced under resources.
# ---------------------------------------------------------------------------
resources:
  - ../../../../releases/2023-02-03_22.0.1-2525403/onprem/core
  - ../../../../releases/2023-02-03_22.0.1-2525403/onprem/infra
  - ../../../../releases/2023-02-03_22.0.1-2525403/onprem/extras
#  - ../../../../releases/2023-01-16_22.0.1-2473477/onprem/monitoring

# use cases
#  - ../../../../usecases/onprem/helmrelease-etlflow-1301-ncom-data-enrichment.yaml

# custom
#  - ./custom/helmrelease_sample.yaml

# ---------------------------------------------------------------------------
# PatchesStrategicMerge
# define overrides specific for a cluster
# ---------------------------------------------------------------------------
patchesStrategicMerge:

#core
  - ./overrides/core/helmrepo-ncyd-helm-virtual.yaml
  - ./overrides/core/ckaf-connect.yaml
  - ./overrides/core/ckaf-connect-configurator.yaml
  - ./overrides/core/ckaf-kafka.yaml
  - ./overrides/core/fluent-bit.yaml
  - ./overrides/core/kafka-azure-sink.yaml
  - ./overrides/core/nginx-proxy.yaml
  - ./overrides/core/topology-adapter.yaml

# extras
  - ./overrides/extras/azuremockapi.yaml
  - ./overrides/extras/ckaf-rest.yaml
  - ./overrides/extras/ckaf-schema-registry.yaml
  - ./overrides/extras/jira.yaml
  - ./overrides/extras/kowl.yaml
  - ./overrides/extras/mock-server.yaml
  - ./overrides/extras/ssh-server.yaml

# infra
  - ./overrides/infra/ingress-nginx.yaml

# monitoring
#  - ./overrides/monitoring/file.yaml

#usecases
#  - ./overrides/usecases/helmrelease-etlflow-1301-ncom-data-enrichment.yaml

Release Layer

A release specifies the base resources to use and applies a version/tag to the helm chart and images using an patch file defined under the patchesStrategicMerge section.

Code Block
languageyml
titlereleases/2023-01-16_22.0.1.../onprem/core/kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
  - ../../../base/onprem/core/helmrepo-ncyd-helm-virtual.yaml
  - ../../../base/onprem/core/ckaf-kafka.yaml
  - ../../../base/onprem/core/ckaf-connect.yaml
  - ../../../base/onprem/core/ckaf-connect-configurator.yaml
  - ../../../base/onprem/core/fluent-bit.yaml
  - ../../../base/onprem/core/kafka-azure-sink.yaml
  - ../../../base/onprem/core/nginx-proxy.yaml
  - ../../../base/onprem/core/topology-adapter.yaml
patchesStrategicMerge:
  - ckaf-kafka.yaml
  - ckaf-connect.yaml
  - ckaf-connect-configurator.yaml
  - fluent-bit.yaml
  - nginx-proxy.yaml
  - topology-adapter.yaml
  - kafka-azure-sink.yaml

Base Layer

The base layer defines all defaults for a component/resource.










Folder Structure


Customer Template

...

Code Block
languageyml
titlekustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# ---------------------------------------------------------------------------
# Resources
# core    - contains core components
# infra   - contains nginx-ingress controller used in develop and test environments
# extras  - contains extra components used in develop and test environments
# monitoring - contains components used for monitoring
# usecases - contains etls for the various use cases
#
# additional helmreleases specific to a customer can be included in the custom folder
# and referenced under resources
# ---------------------------------------------------------------------------
resources:
  - ../../../../releases/2023-01-16_22.0.1-2473477/onprem/core
  - ../../../../releases/2023-01-16_22.0.1-2473477/onprem/infra
#  - ../../../../releases/2023-01-16_22.0.1-2473477/onprem/monitoring

# extras
#  - ../../../../releases/base/onprem/extras/azuremockapi.yaml
  - ../../../../releases/base/onprem/extras/ckaf-rest.yaml
  - ../../../../releases/base/onprem/extras/ckaf-schema-registry.yaml
  - ../../../../releases/base/onprem/extras/jira.yaml
  - ../../../../releases/base/onprem/extras/kowl.yaml
#  - ../../../../releases/base/onprem/extras/mock-server.yaml
  - ../../../../releases/base/onprem/extras/ssh-server.yaml

# use cases
#  - ../../../../usecases/onprem/helmrelease-etlflow-1301-ncom-data-enrichment.yaml

# custom
#  - ./custom/helmrelease_sample.yaml

# ---------------------------------------------------------------------------
# PatchesStrategicMerge
# define overrides specific for a customer
# ---------------------------------------------------------------------------
patchesStrategicMerge:
  - ./overrides/core/helmrepo-ncyd-helm-virtual.yaml
  - ./overrides/core/ckaf-connect.yaml
  - ./overrides/core/ckaf-connect-configurator.yaml
  - ./overrides/core/ckaf-kafka.yaml
  - ./overrides/core/fluent-bit.yaml
  - ./overrides/core/kafka-azure-sink.yaml
  - ./overrides/core/nginx-proxy.yaml
  - ./overrides/core/topology-adapter.yaml
  - ./overrides/infra/ingress-nginx.yaml
# extras
#  - ./overrides/extras/azuremockapi.yaml
  - ./overrides/extras/ckaf-rest.yaml
  - ./overrides/extras/ckaf-schema-registry.yaml
  - ./overrides/extras/jira.yaml
  - ./overrides/extras/kowl.yaml
#  - ./overrides/extras/mock-server.yaml
  - ./overrides/extras/ssh-server.yaml

#  - ./overrides/usecases/helmrelease-etlflow-1301-ncom-data-enrichment.yaml


Releases

Code Block
languageyml
titlekustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
  - ../../../base/onprem/core/helmrepo-ncyd-helm-virtual.yaml
  - ../../../base/onprem/core/ckaf-kafka.yaml
  - ../../../base/onprem/core/ckaf-connect.yaml
  - ../../../base/onprem/core/ckaf-connect-configurator.yaml
  - ../../../base/onprem/core/fluent-bit.yaml
  - ../../../base/onprem/core/kafka-azure-sink.yaml
  - ../../../base/onprem/core/nginx-proxy.yaml
  - ../../../base/onprem/core/topology-adapter.yaml
patchesStrategicMerge:
  - ckaf-kafka.yaml
  - ckaf-connect.yaml
  - ckaf-connect-configurator.yaml
  - fluent-bit.yaml
  - nginx-proxy.yaml
  - topology-adapter.yaml
  - kafka-azure-sink.yaml