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