apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

resources:
  - ./resources/hydra-saml-shibboleth-sp.yaml
  - ./resources/hydra-saml-remote-user.yaml

configMapGenerator:
  - name: hydra-saml-env
    literals:
      # Hydra Remote User environment variables
      - APP_ENV=prod
      - APP_DEBUG=false
      - HTTP_BASE_URL=http://hydra-saml
      - COOKIE_PATH=/
      - HYDRA_ADMIN_BASE_URL=http://hydra:4445/admin
      - TRUSTED_PROXIES=127.0.0.1,REMOTE_ADDR
      - LOGOUT_REDIRECT_URL_PATTERN=http://hydra-saml/Shibboleth.sso/Logout?return=%s'
      - PATH_PREFIX=
      # Shibboleth SP environment variables
      - SP_ENTITY_ID=http://hydra-saml-shibboleth-sp
      - IDP_ENTITY_ID=http://saml-idp
      - IDP_METADATA_URL=http://saml-idp/metadata
      - APACHE_BACKEND_URL=http://hydra-saml-remote-user
      - APACHE_FORCE_HTTPS=false
      - SP_HANDLER_BASE_PATH=/
  - name: hydra-dispatcher-apps
    behavior: merge
    files:
      - ./files/hydra/saml.yaml
  - name: hydra-saml-shibboleth-sp
    files:
      - ./files/shibboleth-sp/attribute-map.inc.xml

patchesJson6902:
  - target:
      version: v1
      kind: ConfigMap
      name: hydra-dispatcher-env
    path: patches/hydra-dispatcher-env.yaml