# flux_example_ingress-nginx.yaml
---
apiVersion: v1
kind: Namespace
metadata:
  name: ingress-nginx
  labels:
    toolkit.fluxcd.io/tenant: sre-team
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
  name: ingress-nginx
  namespace: ingress-nginx
spec:
  interval: 24h
  url: https://kubernetes.github.io/ingress-nginx
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: ingress-nginx
  namespace: ingress-nginx
spec:
  dependsOn:
    - name: cert-manager
      namespace: cert-manager
  interval: 12h
  install:
    strategy:
      name: RetryOnFailure
      retryInterval: 2m
  upgrade:
    strategy:
      name: RetryOnFailure
      retryInterval: 3m
  chart:
    spec:
      chart: ingress-nginx
      version: "*"
      sourceRef:
        kind: HelmRepository
        name: ingress-nginx
        namespace: ingress-nginx
      interval: 12h
  values:
    controller:
      admissionWebhooks:
        certManager:
          enabled: true
      service:
        type: "NodePort"