release.yaml 4.27 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
# Source: wks/templates/deployment.yaml
#  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:
  name: osdu-gitlab-wks
  namespace: osdu
spec:
  selector:
    matchLabels:
      app: wks
  template:
    metadata:
      labels:
        app: wks
        aadpodidbinding: osdu-identity
    spec:
      volumes:
        - name: azure-keyvault
          csi:
            driver: secrets-store.csi.k8s.io
            readOnly: true
            volumeAttributes:
              secretProviderClass: azure-keyvault
      containers:
        - name: wks
          image: community.opengroup.org:5555/osdu/platform/data-flow/enrichment/wks/wks-master:latest
          imagePullPolicy: Always
          volumeMounts:
            - name: azure-keyvault
              mountPath: "/mnt/azure-keyvault"
              readOnly: true
          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:
58
59
                name: active-directory
                key: principal-clientid
60
61
62
          - name: AZURE_CLIENT_SECRET
            valueFrom:
              secretKeyRef:
63
64
65
66
67
68
69
                name: active-directory
                key: principal-clientpassword
          - name: AZURE_TENANT_ID
            valueFrom:
              secretKeyRef:
                name: active-directory
                key: tenantid
70
71
72
          - name: aad_client_id
            valueFrom:
              secretKeyRef:
73
74
                name: active-directory
                key: application-appid
75
76
77
          - name: AZURE_APP_RESOURCE_ID
            valueFrom:
              secretKeyRef:
78
79
                name: active-directory
                key: application-appid
80
81
82
          - name: appinsights_key
            valueFrom:
              secretKeyRef:
83
                name: central-logging
84
85
86
87
88
89
                key: appinsights
          - name: cosmosdb_database
            value: osdu-db
          - name: servicebus_topic_name
            value: recordstopic
          - name: storage_account
90
            value: osdumvpdp1glabky7vdata
91
92
93
94
95
96
97
          - name: servicebus_topic_subscription
            value: wkssubscription
          - name: storage_container
            value: osdu-wks-mappings
          - name: server_port
            value: "80"
          - name: storage_service_endpoint
98
            value: "http://storage/api/storage/v2"
99
          - name: max_concurrent_calls
100
            value: "8"
101
          - name: executor_n_threads
102
            value: "8"
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
          - name: max_lock_renew_duration_seconds
            value: "120"
---
# Source: wks/templates/scaled_object.yaml
#  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: keda.k8s.io/v1alpha1
kind: ScaledObject
metadata:
  name: wks
  namespace: osdu
  labels:
    deploymentName: wks
spec:
  scaleTargetRef:
    deploymentName: wks
  triggers:
  - type: azure-servicebus
    metadata:
      type: serviceBusTrigger
      direction: in
      name: message
      subscriptionName: wkssubscription
      topicName: recordstopic
      connection: SERVICE_BUS