fluxcd example of deploying keda charts helm release with value files from another repository

This is a typical setup for everyone trying to use helm to deploy keda. This deploy keda using chart. A twist to that is getting our values files from another repository. In this setup, we will do this.

Given helmrelease in flux won't be able to read value files directly, we use kustomization.

 

You can get access to the file here

https://github.com/kepungnzai/keda-flux-chart-demo/blob/main/README.md

Value files repository :- https://github.com/kepungnzai/keda-aks-deploy



So you need to run the following in sequence (important) 

kubectl apply -f keda-values-gitrepo.yaml

kubectl apply -f keda-values-kustomization.yaml

kubectl apply -f keda-helmrepo.yaml

kubectl apply -f keda-helmrelease.yaml


keda-values-gitrepo.yaml


apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
  name: keda-values
  namespace: flux-system
spec:
  interval: 1m
  url: https://github.com/kepungnzai/keda-aks-deploy
  ref:
    branch: main


keda-values-kustomization.yaml

apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
  name: keda-values
  namespace: flux-system
spec:
  interval: 5m
  sourceRef:
    kind: GitRepository
    name: keda-values
  path: ./keda
  prune: true
  targetNamespace: keda


keda-helmrepo.yaml

apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
  name: kedacore
  namespace: flux-system
spec:
  interval: 1h
  url: https://kedacore.github.io/charts

keda-helmrelease.yaml

apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: keda
  namespace: keda
spec:
  interval: 5m
  releaseName: keda

  chart:
    spec:
      chart: keda
      version: "2.14.0"
      sourceRef:
        kind: HelmRepository
        name: kedacore
        namespace: flux-system

  install:
    createNamespace: true

  upgrade:
    remediation:
      retries: 3

  valuesFrom:
    - kind: ConfigMap
      name: keda-values
      valuesKey: values.yaml

You can see keda is being deployed


And then to check out other resources 





Comments

Popular posts from this blog

vllm : Failed to infer device type

android studio kotlin source is null error

gemini cli getting file not defined error