apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: cert-manager
  namespace: cert-manager
spec:
  interval: 1h
  chart:
    spec:
      chart: cert-manager
      version: "1.20.2"
      sourceRef:
        kind: HelmRepository
        name: cert-manager
        namespace: flux-system
  values:
    crds:
      enabled: true
---
# ClusterIssuer is applied after cert-manager CRDs exist; FluxCD retries on failure
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
  name: cert-issuer
  namespace: flux-system
spec:
  interval: 2m
  retryInterval: 1m
  sourceRef:
    kind: GitRepository
    name: gitops
    namespace: flux-system
  path: ./cert-manager/htwg-1
  prune: true
  timeout: 2m
