apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: {{ .Release.Name }}-cilium
  labels:
    cozystack.io/repository: system
    coztstack.io/target-cluster-name: {{ .Release.Name }}
spec:
  interval: 1m
  releaseName: cilium
  chart:
    spec:
      chart: cozy-cilium
      reconcileStrategy: Revision
      sourceRef:
        kind: HelmRepository
        name: cozystack-system
        namespace: cozy-system
  kubeConfig:
    secretRef:
      name: {{ .Release.Name }}-kubeconfig
  targetNamespace: cozy-cilium
  storageNamespace: cozy-cilium
  install:
    createNamespace: true
  values:
    cilium:
      tunnel: disabled
      autoDirectNodeRoutes: true
      cgroup:
        autoMount:
          enabled: true
        hostRoot: /run/cilium/cgroupv2
      k8sServiceHost: {{ .Release.Name }}.{{ .Release.Namespace }}.svc
      k8sServicePort: 6443
    
      cni:
        chainingMode: ~
        customConf: false
        configMap: ""
      routingMode: native
      enableIPv4Masquerade: true
      ipv4NativeRoutingCIDR: "10.244.0.0/16"
  dependsOn:
  - name: {{ .Release.Name }}
    namespace: {{ .Release.Namespace }}
