apiVersion: v1
kind: Namespace
metadata:
  name: delete-ns
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: gotk-reconciler
  namespace: delete-ns
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: gotk-reconciler
  namespace: delete-ns
rules:
  - apiGroups:
      - ""
    resources:
      - '*'
    verbs:
      - '*'
  - apiGroups:
      - apps
    resources:
      - '*'
    verbs:
      - '*'
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: gotk-reconciler
  namespace: delete-ns
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: gotk-reconciler
subjects:
  - kind: ServiceAccount
    name: gotk-reconciler
    namespace: delete-ns
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
  name: podinfo
  namespace: delete-ns
spec:
  interval: 1m
  url: https://stefanprodan.github.io/podinfo
---
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
  name: podinfo
  namespace: delete-ns
spec:
  serviceAccountName: gotk-reconciler
  interval: 5m
  chart:
    spec:
      chart: podinfo
      version: 6.3.5
      sourceRef:
        kind: HelmRepository
        name: podinfo
