---
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
  name: peertube
  namespace: flux-system
spec:
  interval: 5m
  retryInterval: 2m
  timeout: 10m
  wait: true
  prune: true
  path: ./apps/video/peertube
  sourceRef:
    kind: GitRepository
    name: stackspout
  dependsOn:
    - name: flux
    - name: local-path-provisioner
    - name: peertube-secrets
    - name: nginx
    - name: single-sign-on
  postBuild:
    substituteFrom:
      - kind: Secret
        name: stackspin-cluster-variables
      - kind: ConfigMap
        name: stackspin-peertube-kustomization-variables
      - kind: Secret
        name: stackspin-peertube-variables
      # OIDC
      - kind: Secret
        name: stackspin-peertube-oauth-variables
      - kind: ConfigMap
        name: stackspin-single-sign-on-kustomization-variables