deployment.yaml 2.62 KB
Newer Older
Sherman Yang's avatar
Sherman Yang committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ .Release.Name }}
  namespace: osdu
spec:
  replicas: {{ .Values.global.replicaCount }}
  selector:
    matchLabels:
      app: {{ .Chart.Name }}
  template:
    metadata:
      labels:
        app: {{ .Chart.Name }}
        aadpodidbinding: osdu-identity
    spec:
Dzmitry_Paulouski (slb)'s avatar
Dzmitry_Paulouski (slb) committed
17
18
19
20
{{- if .Values.global.isAutoscalingEnabled }}
      nodeSelector:
        nodepool: {{ .Values.global.nodepool }} 
{{- end }}  
Sherman Yang's avatar
Sherman Yang committed
21
22
23
24
25
26
27
28
      volumes:
      - name: azure-keyvault
        csi:
          driver: secrets-store.csi.k8s.io
          readOnly: true
          volumeAttributes:
            secretProviderClass: azure-keyvault
      - name: shared-data
Nicholas Karsky's avatar
Nicholas Karsky committed
29
30
        persistentVolumeClaim:
          claimName: crs-pvc        
Sherman Yang's avatar
Sherman Yang committed
31
32
      containers:
      - name: {{ .Chart.Name }}
33
34
        image: {{ .Values.image.repository }}/{{ .Chart.Name }}-{{ .Values.image.branch }}:{{ .Values.image.tag | default .Chart.AppVersion }}
        imagePullPolicy: Always
Sherman Yang's avatar
Sherman Yang committed
35
36
37
38
        ports:
        - containerPort: 80
        readinessProbe:
          httpGet:
39
            path: /api/crs/catalog/swagger-ui.html
Sherman Yang's avatar
Sherman Yang committed
40
41
42
43
44
45
46
47
48
49
50
            port: 80
        volumeMounts:
        - name: azure-keyvault
          mountPath: "/mnt/azure-keyvault"
          readOnly: true
        - name: shared-data
          mountPath: /mnt/crs_catalogs          
        env:
        - name: spring_application_name
          value: crs-catalog-service
        - name: server.servlet.contextPath
51
          value: /api/crs/catalog/
Sherman Yang's avatar
Sherman Yang committed
52
53
54
55
56
57
58
59
60
        - name: server_port
          value: "80"
        - name: ACCEPT_HTTP  # TEMPORARY UNTIL HTTPS
          value: "true"
        - name: KEYVAULT_URI
          valueFrom:
            configMapKeyRef:
              name: osdu-svc-properties
              key: ENV_KEYVAULT
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
        - name: AZURE_CLIENT_ID
          valueFrom:
            secretKeyRef:
              name: active-directory
              key: principal-clientid
        - name: AZURE_CLIENT_SECRET
          valueFrom:
            secretKeyRef:
              name: active-directory
              key: principal-clientpassword
        - name: AZURE_TENANT_ID
          valueFrom:
            secretKeyRef:
              name: active-directory
              key: tenantid
Sherman Yang's avatar
Sherman Yang committed
76
77
78
        - name: appinsights_key
          valueFrom:
            secretKeyRef:
79
              name: central-logging
Sherman Yang's avatar
Sherman Yang committed
80
              key: appinsights
81
82
83
84
85
        - name: aad_client_id
          valueFrom:
            secretKeyRef:
              name: active-directory
              key: application-appid
Sherman Yang's avatar
Sherman Yang committed
86
        - name: ENTITLEMENT_URL
87
          value: http://entitlements/api/entitlements/v2
Sherman Yang's avatar
Sherman Yang committed
88
89
        - name: azure_istioauth_enabled
          value: "true"