docs icon indicating copy to clipboard operation
docs copied to clipboard

Add docs on "How to deploy Radius via helm chart using flux"

Open Reshrahim opened this issue 2 years ago • 3 comments

Following the thread here - https://discord.com/channels/1113519723347456110/1113519723930468455/1181873374281080883

User needs some guidance on the following

"An example on how to deploy the helm chart using flux would be a great start. I feel there is something missing from the documentation. I had defined the namespace, and got issues with securityContext already exist... figured it could be that the helm chart created a namespace and set some permissions. after removing my namespace flux does not run the helm chart, and i guess its missing some mandatory configuration."

AB#10670

Reshrahim avatar Dec 06 '23 17:12 Reshrahim

Thanks @Reshrahim - We need to produce an example here, and then make sure that this works as-expected. It's possible we might have a few bugs. Regardless this should end up in the docs when we're done 👍

rynowak avatar Dec 06 '23 18:12 rynowak

I'll add some more context on what happens in our AKS cluster

As usual when doing install through flux and kustomize we create three files. The helm deployment yaml file, a kustomize file and a namespace yaml. Below is my bare deployment of the YAML.

apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
  name: radius
  namespace: radius-system
spec:
  url: https://radius.azurecr.io/helm/v1/repo
  interval: 10m

---

apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: radius
  namespace: radius-system
spec:
  interval: 5m
  timeout: 15m0s
  chart:
    spec:
      chart: radius
      version: "0.27.0"
      sourceRef:
        kind: HelmRepository
        name: radius
        namespace: radius-system
      interval: 1m

From our flux logs i can see the following error

"level":"error","ts":"2023-12-07T07:21:25.575Z","msg":"Reconciler error","controller":"helmrelease","controllerGroup":"helm.toolkit.fluxcd.io","controllerKind":"HelmRelease","HelmRelease":{"name":"radius","namespace":"radius-system"},"namespace":"radius-system","name":"radius","reconcileID":"ab3b2bd4-7470-4724-88df-b8aa9d36f54e","error":"Helm install failed: error while running post render on files: map[string]interface {}(nil): yaml: unmarshal errors:\n  line 62: mapping key \"securityContext\" already defined at line 55"}

I had a brief look at the charts yaml files, and securityContext is defined. However I only see one per deployment

ehrnst avatar Dec 07 '23 07:12 ehrnst

Thanks @ehrnst this is helpful 👍

rynowak avatar Dec 07 '23 17:12 rynowak