apiVersion: service.aep.asag.io/v1
kind: Definition
metadata:
  name: bitwarden-0.0.3
  namespace: asag
spec:
  clusters:
    - flags:
        - from: value
          key: v1_role
          to: label
          value: bitwarden
      name: bitwarden
      podspec:
        containers:
          - image: aep/aos/jammy/aep
            name: bitwarden
      provides:
        - exposed: true
          name: bitwarden-web
          network: loadbalanced
          servicespec:
            ports:
              - name: http
                port: 80
                protocol: TCP
              - name: https
                port: 443
                protocol: TCP
      sizing:
        increment: 1
        initial: 1
        maximum: 2
        minimum: 1
  dependencies:
    operator:
      name: bitwarden-operator
      vendor: asag
      version: 0.1.0
  includes:
    - name: defaults-service
      vendor: asag
      version: 0.5.0
  name: bitwarden
  settings:
    - name: environment
      schema:
        default: bitwarden_prod
    - from:
        - user
      name: vault_service_uri
      required: false
      schema:
        description: 'Default: https://$fqdn'
        title: Vault Service URI
        type: string
    - from:
        - user
      name: admin_emails
      required: false
      schema:
        description: use it with $vault_service_uri/admin to log-in as admin
        items:
          format: email
          type: string
        title: Admin E-Mail(s)
        type: array
    - from:
        - user
      name: noreply_email
      required: false
      schema:
        description: no-reply mail address for sending mails to bitwarden users
        format: email
        title: No-Reply Mail Address
        type: string
    - from:
        - user
      name: installation_id
      required: false
      schema:
        description: Get your ID and key from https://bitwarden.com/host/
        format: uuid
        title: Installation ID
        type: string
    - from:
        - user
      name: installation_key
      required: false
      schema:
        description: Get your ID and key from https://bitwarden.com/host/
        title: Installation Key
        type: string
  version: 0.0.3
