---
apiVersion: v1
kind: ConfigMap
metadata:
  name: "eirini"
data:
  opi.yaml: |
    opi:
      kube_namespace: {{ .Values.opi.namespace }}
      nats_password: {{ .Values.secrets.NATS_PASSWORD }}
      nats_ip: "nats-nats.{{ .Release.Namespace }}.svc.cluster.local"
      cc_internal_api: "https://api.{{ .Release.Namespace }}.svc.cluster.local:9023"
      cc_certs_secret_name: "secrets-{{ .Values.scf.version }}-{{ .Values.scf.secrets_generation_counter }}"
      {{- if .Values.opi.use_registry_ingress }}
      registry_address: "registry.{{ .Values.opi.ingress_endpoint }}:443"
      {{- else if .Values.services.loadbalanced }}
      registry_address: "registry.{{ .Values.env.DOMAIN }}:6666"
      {{- else }}
      registry_address: "registry.{{ index .Values.kube.external_ips 0 }}.nip.io:6666"
      {{- end }}
      eirini_address: "http://eirini-opi.{{ .Release.Namespace }}.svc.cluster.local:8085"
      stager_image: "{{ .Values.opi.stager_image }}:{{ .Values.opi.image_tag }}"
      metrics_source_address: "http://heapster.kube-system.svc.cluster.local/apis/metrics/v1alpha1"
      loggregator_address: "doppler-doppler-set.{{ .Release.Namespace }}.svc.cluster.local:8082"
      loggergator_cert_path: "/workspace/jobs/opi/secrets/doppler.crt"
      loggregator_key_path: "/workspace/jobs/opi/secrets/doppler.key"
      loggregator_ca_path: "/workspace/jobs/opi/secrets/doppler.ca"
      cc_cert_path: "/workspace/jobs/opi/secrets/cc.crt"
      cc_key_path: "/workspace/jobs/opi/secrets/cc.key"
      cc_ca_path: "/workspace/jobs/opi/secrets/cc.ca"
