owgw:
  services:
    owgw:
      type: LoadBalancer
      annotations:
        service.beta.kubernetes.io/aws-load-balancer-type: "nlb-ip"
        service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
        service.beta.kubernetes.io/aws-load-balancer-healthcheck-port: "16102"
        service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl
        service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285"
        service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16002,16003,17002"

  configProperties:
    simulatorid: 53494D020202
    storage.type: postgresql
    storage.type.postgresql.host: owgw-pgsql
    storage.type.postgresql.database: owgw
    storage.type.postgresql.username: owgw
    storage.type.postgresql.password: owgw

  resources:
    requests:
      cpu: 2000m
      memory: 3000Mi
    limits:
      cpu: 2000m
      memory: 3000Mi

  postgresql:
    enabled: true
    fullnameOverride: owgw-pgsql

    postgresqlDatabase: owgw
    postgresqlUsername: owgw
    postgresqlPassword: owgw

owls:
  enabled: true
  services:
    owls:
      type: LoadBalancer
      annotations:
        service.beta.kubernetes.io/aws-load-balancer-type: "nlb-ip"
        service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
        service.beta.kubernetes.io/aws-load-balancer-healthcheck-port: "16107"
        service.beta.kubernetes.io/aws-load-balancer-backend-protocol: ssl
        service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285"
        service.beta.kubernetes.io/aws-load-balancer-ssl-ports: "16007,17007"
        external-dns.alpha.kubernetes.io/ttl: "60"

  podAnnotations:
    cluster-autoscaler.kubernetes.io/safe-to-evict: "false"

  resources:
    requests:
      cpu: 3000m
      memory: 8000Mi
    limits:
      cpu: 3000m
      memory: 8000Mi

  checks:
    owls:
      liveness:
        httpGet:
          path: /
          port: 16107
        failureThreshold: 900
      readiness:
        httpGet:
          path: /
          port: 16107
        failureThreshold: 900

  certs:
    restapi-ca.pem: |
      -----BEGIN CERTIFICATE-----
      MIIDojCCAoqgAwIBAgIUPVYBpqNbcLYygF6Mx+qxSWwQyFowDQYJKoZIhvcNAQEL
      BQAwaTELMAkGA1UEBhMCVVMxJDAiBgNVBAoTG1RlbGVjb20gSW5mcmEgUHJvamVj
      dCwgSW5jLjEMMAoGA1UECxMDVElQMSYwJAYDVQQDEx1UZWxlY29tIEluZnJhIFBy
      b2plY3QgUm9vdCBDQTAeFw0yMTA0MTMyMjQyNDRaFw0zMTA0MTMyMjM4NDZaMGkx
      CzAJBgNVBAYTAlVTMSQwIgYDVQQKExtUZWxlY29tIEluZnJhIFByb2plY3QsIElu
      Yy4xDDAKBgNVBAsTA1RJUDEmMCQGA1UEAxMdVGVsZWNvbSBJbmZyYSBQcm9qZWN0
      IFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDIGCibwf5u
      AAwZ+1H8U0e3u2V+0d2gSctucoK86XwUmfe1V2a/qlCYZd29r80IuN1IIeB0naIm
      KnK/MzXW87clF6tFd1+HzEvmlY/W4KyIXalVCTEzirFSvBEG2oZpM0yC3AefytAO
      aOpA00LaM3xTfTqMKIRhJBuLy0I4ANUVG6ixVebbGuc78IodleqiLoWy2Q9QHyEO
      t/7hZndJhiVogh0PveRhho45EbsACu7ymDY+JhlIleevqwlE3iQoq0YcmYADHno6
      Eq8vcwLpZFxihupUafkd1T3WJYQAJf9coCjBu2qIhNgrcrGD8R9fGswwNRzMRMpX
      720+GjcDW3bJAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFAJG
      lmB5sVP2qfL3xZ8hQOTpkQH6MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsF
      AAOCAQEAVjl9dm4epG9NUYnagT9sg7scVQEPfz3Lt6w1NXJXgD8mAUlK0jXmEyvM
      dCPD4514n+8+lM7US8fh+nxc7jO//LwK17Wm9FblgjNFR7+anv0Q99T9fP19DLlF
      PSNHL2emogy1bl1lLTAoj8nxg2wVKPDSHBGviQ5LR9fsWUIJDv9Bs5k0qWugWYSj
      19S6qnHeskRDB8MqRLhKMG82oDVLerSnhD0P6HjySBHgTTU7/tYS/OZr1jI6MPbG
      L+/DtiR5fDVMNdBSGU89UNTi0wHY9+RFuNlIuvZC+x/swF0V9R5mN+ywquTPtDLA
      5IOM7ItsRmen6u3qu+JXros54e4juQ==
      -----END CERTIFICATE-----

  public_env_variables:
    SELFSIGNED_CERTS: "true"

  configProperties:
    openwifi.internal.restapi.host.0.rootca: $OWLS_ROOT/certs/restapi-certs/ca.crt
    openwifi.internal.restapi.host.0.cert: $OWLS_ROOT/certs/restapi-certs/tls.crt
    openwifi.internal.restapi.host.0.key: $OWLS_ROOT/certs/restapi-certs/tls.key
    openwifi.restapi.host.0.rootca: $OWLS_ROOT/certs/restapi-certs/ca.crt
    openwifi.restapi.host.0.cert: $OWLS_ROOT/certs/restapi-certs/tls.crt
    openwifi.restapi.host.0.key: $OWLS_ROOT/certs/restapi-certs/tls.key

  volumes:
    owls:
      - name: config
        mountPath: /owls-data/owls.properties
        subPath: owls.properties
        # Template below will be rendered in template
        volumeDefinition: |
          secret:
            secretName: {{ include "owls.fullname" . }}-config
      - name: certs
        mountPath: /owls-data/certs
        volumeDefinition: |
          secret:
            secretName: {{ include "owls.fullname" . }}-certs
      - name: certs-cas
        mountPath: /owls-data/certs/cas
        volumeDefinition: |
          secret:
            secretName: {{ include "owls.fullname" . }}-certs-cas
      # Change this if you want to use another volume type
      - name: persist
        mountPath: /owls-data/persist
        volumeDefinition: |
          persistentVolumeClaim:
            claimName: {{ template "owls.fullname" . }}-pvc

      - name: restapi-certs
        mountPath: /owls-data/certs/restapi-certs
        volumeDefinition: |
          secret:
            secretName: {{ include "owls.fullname" . }}-owls-restapi-tls
      - name: restapi-ca
        mountPath: /usr/local/share/ca-certificates/restapi-ca-selfsigned.pem
        subPath: ca.crt
        volumeDefinition: |
          secret:
            secretName: {{ include "owls.fullname" . }}-owls-restapi-tls

owlsui:
  enabled: true

  services:
    owlsui:
      type: NodePort

  ingresses:
    default:
      enabled: true
      annotations:
        kubernetes.io/ingress.class: alb
        alb.ingress.kubernetes.io/scheme: internet-facing
        alb.ingress.kubernetes.io/group.name: wlan-cicd
        alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-east-2:289708231103:certificate/bfa89c7a-5b64-4a8a-bcfe-ffec655b5285
        alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]'
        alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_302"}}'
        external-dns.alpha.kubernetes.io/ttl: "60"
      paths:
      - path: /*
        serviceName: owlsui
        servicePort: http

  podAnnotations:
    cluster-autoscaler.kubernetes.io/safe-to-evict: "false"
