Commit a606bf87 authored by Maksimelyan Tamashevich (EPAM)'s avatar Maksimelyan Tamashevich (EPAM) Committed by Oleksandr Kosse (EPAM)
Browse files

GONRG-3039 Develop helm config-map and helm deployments for Wellbore DDMS service

parent 3905f90d
......@@ -14,7 +14,7 @@ The following software have components provided under the terms of this license:
- coverage (from https://coverage.readthedocs.io)
- cryptography (from https://github.com/pyca/cryptography)
- google-api-core (from https://github.com/GoogleCloudPlatform/google-cloud-python)
- google-auth (from https://github.com/GoogleCloudPlatform/google-auth-library-python)
- google-auth (from https://github.com/googleapis/google-auth-library-python)
- google-auth-oauthlib (from https://github.com/GoogleCloudPlatform/google-auth-library-python-oauthlib)
- google-cloud-core (from https://github.com/GoogleCloudPlatform/google-cloud-python)
- google-cloud-monitoring (from https://github.com/GoogleCloudPlatform/google-cloud-python)
......@@ -314,7 +314,7 @@ The following software have components provided under the terms of this license:
- async-timeout (from https://github.com/aio-libs/async_timeout/)
- coverage (from https://coverage.readthedocs.io)
- distributed (from https://distributed.readthedocs.io/en/latest/)
- google-auth (from https://github.com/GoogleCloudPlatform/google-auth-library-python)
- google-auth (from https://github.com/googleapis/google-auth-library-python)
- google-auth-oauthlib (from https://github.com/GoogleCloudPlatform/google-auth-library-python-oauthlib)
- numpy (from http://www.numpy.org)
- pandas (from http://pandas.pydata.org)
......
apiVersion: v2
name: gcp-wellbore-configmap
description: A Helm chart for Kubernetes
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
kind: Secret
apiVersion: v1
metadata:
name: "{{ .Values.conf.secret_name }}"
namespace: "{{ .Release.Namespace }}"
type: Opaque
data:
"key.json": "{{ .Values.data.sa_key }}"
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: "{{ .Values.conf.app_name }}"
name: "{{ .Values.conf.configmap }}"
namespace: "{{ .Release.Namespace }}"
data:
CLOUD_PROVIDER: "gcp"
OS_WELLBORE_DDMS_DATA_PROJECT_ID: "{{ .Values.data.os_wellbore_ddms_data_project_id }}"
SERVICE_HOST_SEARCH: "{{ .Values.data.service_host_search }}"
SERVICE_HOST_STORAGE: "{{ .Values.data.service_host_storage }}"
OS_WELLBORE_DDMS_DATA_PROJECT_CREDENTIALS : "{{ .Values.data.os_wellbore_ddms_data_project_credentials }}"
# Default values for wellbore-configmap.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
data:
os_wellbore_ddms_data_project_id: "nice-etching-277309"
os_wellbore_ddms_data_project_credentials: "/tmp/key/key.json"
service_host_search: ""
service_host_storage: ""
sa_key: ""
conf:
configmap: "wellbore-config"
app_name: "wellbore"
secret_name: "wellbore-secret"
apiVersion: v2
name: gcp-wellbore-deploy
description: A Helm chart for Kubernetes
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: "{{ .Release.Namespace }}"
name: "{{ .Values.conf.app_name }}"
labels:
app: "{{ .Values.conf.app_name }}"
spec:
replicas: 1
selector:
matchLabels:
app: "{{ .Values.conf.app_name }}"
template:
metadata:
labels:
app: "{{ .Values.conf.app_name }}"
annotations:
rollme: {{ randAlphaNum 5 | quote }}
sidecar.istio.io/rewriteAppHTTPProbers: "true"
spec:
volumes:
- name: service-account-key
secret:
secretName: "{{ .Values.conf.secret_name }}"
containers:
- name: "{{ .Values.conf.app_name }}"
volumeMounts:
- mountPath: /tmp/key
name: service-account-key
image: "{{ .Values.data.image }}"
imagePullPolicy: Always
envFrom:
- configMapRef:
name: "{{ .Values.conf.configmap }}"
ports:
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
httpGet:
path: /api/os-wellbore-ddms/healthz
port: http
readinessProbe:
httpGet:
path: /api/os-wellbore-ddms/healthz
port: http
resources:
requests:
cpu: "{{ .Values.data.requests_cpu }}"
memory: "{{ .Values.data.requests_memory }}"
limits:
cpu: "{{ .Values.data.limits_cpu }}"
memory: "{{ .Values.data.limits_memory }}"
apiVersion: v1
kind: Service
metadata:
name: "{{ .Values.conf.app_name }}"
namespace: "{{ .Release.Namespace }}"
annotations:
cloud.google.com/neg: '{"ingress": true}'
spec:
ports:
- port: 80
targetPort: 8080
protocol: TCP
name: http
selector:
app: "{{ .Values.conf.app_name }}"
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: "{{ .Values.conf.app_name }}"
namespace: "{{ .Release.Namespace }}"
spec:
hosts:
- "*"
gateways:
- service-gateway
http:
- match:
- uri:
prefix: /api/os-wellbore-ddms
route:
- destination:
host: "{{ .Values.conf.app_name }}"
port:
number: 80
# Default values for wellbore-configmap.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
data:
requests_cpu: "0.25"
requests_memory: "256M"
limits_cpu: "1"
limits_memory: "1G"
image: "community.opengroup.org:5555/osdu/platform/domain-data-mgmt-services/wellbore/wellbore-domain-services/osdu-gcp:latest"
conf:
configmap: "wellbore-config"
app_name: "wellbore"
secret_name: "wellbore-secret"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment