deployment.yaml 3.89 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#  Copyright © Microsoft Corporation
#
#  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:
18
  name: {{ .Release.Name }}
19
20
  namespace: osdu
spec:
harshit aggarwal's avatar
harshit aggarwal committed
21
  replicas: {{ .Values.global.replicaCount }}
22
23
  selector:
    matchLabels:
24
      app: {{ .Chart.Name }}
25
26
27
  template:
    metadata:
      labels:
28
        app: {{ .Chart.Name }}
29
30
        aadpodidbinding: osdu-identity
    spec:
31
32
33
34
35
36
37
      volumes:
        - name: azure-keyvault
          csi:
            driver: secrets-store.csi.k8s.io
            readOnly: true
            volumeAttributes:
              secretProviderClass: azure-keyvault
38
      containers:
39
        - name: {{ .Chart.Name }}
harshit aggarwal's avatar
harshit aggarwal committed
40
          image: {{ .Values.image.repository }}/{{ .Chart.Name }}-{{ .Values.image.branch }}:{{ .Values.image.tag | default .Chart.AppVersion }}
41
          imagePullPolicy: Always
harshit aggarwal's avatar
harshit aggarwal committed
42
43
44
          resources:
            requests:
              cpu: "100m"
harshit aggarwal's avatar
harshit aggarwal committed
45
              memory: "2Gi"
harshit aggarwal's avatar
harshit aggarwal committed
46
            limits:
harshit aggarwal's avatar
harshit aggarwal committed
47
48
              cpu: "500m"
              memory: "4Gi"
49
50
51
52
          volumeMounts:
            - name: azure-keyvault
              mountPath: "/mnt/azure-keyvault"
              readOnly: true
53
54
55
56
57
58
59
60
61
62
63
          env:
          - name: spring_application_name
            value: wks
          - name: KEYVAULT_URI
            valueFrom:
              configMapKeyRef:
                name: osdu-svc-properties
                key: ENV_KEYVAULT
          - name: AZURE_CLIENT_ID
            valueFrom:
              secretKeyRef:
64
65
                name: active-directory
                key: principal-clientid
66
67
68
          - name: AZURE_CLIENT_SECRET
            valueFrom:
              secretKeyRef:
69
70
71
72
73
74
75
                name: active-directory
                key: principal-clientpassword
          - name: AZURE_TENANT_ID
            valueFrom:
              secretKeyRef:
                name: active-directory
                key: tenantid
76
77
78
          - name: aad_client_id
            valueFrom:
              secretKeyRef:
79
80
                name: active-directory
                key: application-appid
81
82
83
          - name: AZURE_APP_RESOURCE_ID
            valueFrom:
              secretKeyRef:
84
85
                name: active-directory
                key: application-appid
86
87
88
          - name: appinsights_key
            valueFrom:
              secretKeyRef:
89
                name: central-logging
90
91
92
93
                key: appinsights
          - name: cosmosdb_database
            value: osdu-db
          - name: servicebus_topic_name
94
            value: {{ .Values.azure.servicebusTopic }}
95
          - name: servicebus_topic_subscription
96
97
98
            value: {{ .Values.azure.servicebusSubscription }}
          - name: storage_container
            value: {{ .Values.azure.storageContainer }}
99
100
101
          - name: server_port
            value: "80"
          - name: storage_service_endpoint
102
            value: "http://storage/api/storage/v2"
103
104
          - name: search_service_endpoint
            value: "http://search-service/api/search/v2"
105
106
          - name: schema_service_endpoint
            value: "http://schema-service/api/schema-service/v1"
107
108
109
          - name: partition_service_endpoint
            value: "http://partition/api/partition/v1"
          - name: default_tenant
harshit aggarwal's avatar
harshit aggarwal committed
110
            value: {{ .Values.azure.defaultTenant }}
111
          - name: max_concurrent_calls
harshit aggarwal's avatar
harshit aggarwal committed
112
            value: "64"
113
          - name: executor_n_threads
harshit aggarwal's avatar
harshit aggarwal committed
114
            value: "64"
115
          - name: max_lock_renew_duration_seconds
harshit aggarwal's avatar
harshit aggarwal committed
116
            value: "1000"