# Copyright © 2017 Amdocs, Bell Canada
# Copyright (c) 2022 Nordix Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Default values for uui.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
global:
  uuiPortPrefix: 303

#################################################################
# AAF part
#################################################################
certInitializer:
  nameOverride: uui-cert-initializer
  aafDeployFqi: deployer@people.osaaf.org
  aafDeployPass: demo123456!
  # aafDeployCredsExternalSecret: some secret
  fqdn: uui
  fqi: uui@uui.onap.org
  fqi_namespace: org.onap.uui
  public_fqdn: uui.onap.org
  cadi_longitude: "0.0"
  cadi_latitude: "0.0"
  app_ns: org.osaaf.aaf
  credsPath: /opt/app/osaaf/local
  aaf_add_config: |
    echo "*** changing them into shell safe ones"
    export KEYSTORE_PASSWORD=$(tr -cd '[:alnum:]' < /dev/urandom | fold -w64 | head -n1)
    export TRUSTSORE_PASSWORD=$(tr -cd '[:alnum:]' < /dev/urandom | fold -w64 | head -n1)
    cd {{ .Values.credsPath }}
    keytool -storepasswd -new "${KEYSTORE_PASSWORD}" \
      -storepass "${cadi_keystore_password_p12}" \
      -keystore {{ .Values.fqi_namespace }}.p12
    keytool -storepasswd -new "${TRUSTSORE_PASSWORD}" \
      -storepass "${cadi_truststore_password}" \
      -keystore {{ .Values.fqi_namespace }}.trust.jks
    echo "*** save the generated passwords"
    echo "KEYSTORE_PASSWORD=${KEYSTORE_PASSWORD}" > mycreds.prop
    echo "TRUSTSORE_PASSWORD=${TRUSTSORE_PASSWORD}" >> mycreds.prop
    echo "*** change ownership of certificates to targeted user"
    chown -R 1000 {{ .Values.credsPath }}

subChartsOnly:
  enabled: true

flavor: small

# application image
image: onap/usecase-ui:5.1.2
pullPolicy: Always

# application configuration

msbaddr: msb-iag.{{include "common.namespace" .}}:80
mraddr: message-router.{{include "common.namespace" .}}:3904

# flag to enable debugging - application support required
debugEnabled: false

# default number of instances
replicaCount: 1

nodeSelector: {}

affinity: {}

# probe configuration parameters
liveness:
  initialDelaySeconds: 10
  periodSeconds: 10
  # necessary to disable liveness probe when setting breakpoints
  # in debugger so K8s doesn't restart unresponsive container
  enabled: true

readiness:
  initialDelaySeconds: 10
  periodSeconds: 10

service:
  type: NodePort
  name: uui
  internalPort: 8080
  ports:
    - name: http
      port: 8443
      plain_port: 8080
      nodePort: '98'
  annotations:
    msb.onap.org/service-info: |
      {{ if .Values.global.msbEnabled -}}[
        {
          "serviceName": "usecaseui-ui",
          "version": "v1",
          "url": "/usecase-ui",
          "path":"/iui/usecaseui",
          "protocol": "UI",
          "visualRange":"1",
          {{ if (include "common.needTLS" .) }}
          "port": "{{ include "common.getPort" (dict "global" . "name" "http") }}",
          "enable_ssl": true
          {{ else }}
          "port": "{{ include "common.getPort" (dict "global" . "name" "http" "getPlain" true) }}"
          {{ end }}
        }
      ]{{ end }}

ingress:
  enabled: false
  service:
    - baseaddr: "uui-ui"
      name: "uui"
      port: 8443
      plain_port: 8080
  config:
    ssl: "redirect"

  # We usually recommend not to specify default resources and to leave this as a conscious
  # choice for the user. This also increases chances charts run on environments with little
  # resources, such as Minikube. If you do want to specify resources, uncomment the following
  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
  #
  # Example:
  # Configure resource requests and limits
  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
  # Minimum memory for development is 2 CPU cores and 4GB memory
  # Minimum memory for production is 4 CPU cores and 8GB memory
resources:
  small:
    limits:
      cpu: 250m
      memory: 1Gi
    requests:
      cpu: 250m
      memory: 1Gi
  large:
    limits:
      cpu: 500m
      memory: 1Gi
    requests:
      cpu: 500m
      memory: 1Gi
  unlimited: {}
