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.


Image Added

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. 

Image Added


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

...

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

Folder Structure

Image Removed

Image Removed

Customer Template

...

languageyml
titleinitialization.yaml


Creating a Cluster from the Template

All clusters are defined under the /clusters folder in the GitLab repository. A template has been created that can be copied for use with other clusters.

Copy the /clusters/TEMPLATE folder to a new folder. Once this is done, we can make changes specific to the cluster which includes:

  • Release Version
  • Cluster Overrides


Updating the Components and Version

We can update the components and version by updating the following files:

  • components/kustomization.yaml
  • components/overrides/*.yaml

...


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 specific to a customer can be included in the custom folder
# and referenced under resources.
# ---------------------------------------------------------------------------
resources:
  - ../../../../releases/2023-0102-1603_22.0.1-24734772525403/onprem/core
  - ../../../../releases/2023-0102-1603_22.0.1-24734772525403/onprem/infra
#  - ../../../../releases/2023-0102-1603_22.0.1-24734772525403/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

# 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 customercluster
# ---------------------------------------------------------------------------
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
  - ./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

Image Removed

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
infra
  - ./overrides/infra/ingress-nginx.yaml

# monitoring
#  - ../..overrides/../base/onprem/core/ckaf-connect-configurator.yaml
  - ../../../base/onprem/core/fluent-bit.yaml
  - ../../../base/onprem/core/kafka-azure-sink.yaml
monitoring/file.yaml

#usecases
#  - ../..overrides/../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

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