#
# Copyright 2021 JSquad AB
#
# 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.
#

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: openbank-spring-deployment
  labels:
    name: openbank-spring
    zone: prod
    version: v1
spec:
  selector:
    matchLabels:
      app: openbank-spring
  template:
    metadata:
      labels:
        app: openbank-spring
    spec:
      containers:
        - name: openbank-spring
          image: mrasimov/spring-boot-openbank:latest
          ports:
            - containerPort: 8443
              name: https
            - containerPort: 8081
              name: http
          env:
            - name: MASTER_SECRET
              valueFrom:
                secretKeyRef:
                  name: openbank-spring-secret
                  key: MASTER_KEY
            - name: CONFIG_FILE_LOCATIONS
              value: "classpath:application.properties,classpath:configuration_prod.yaml,classpath:activemq.properties,classpath:openbank_jpa.yaml,classpath:security_jpa.yaml"