Skip to content
Snippets Groups Projects
Commit 35f02613 authored by Oleksii Tsyganov (EPAM)'s avatar Oleksii Tsyganov (EPAM) Committed by Oleksandr Kosse (EPAM)
Browse files

GONRG-2478 Added helm charts

parent c13b23b1
No related branches found
No related tags found
1 merge request!209GONRG-2478 Added helm charts
......@@ -27,6 +27,7 @@ variables:
# --- osdu specific variables for cloudrun storage w/o "/" at the end ---
OSDU_GCP_ENV_VARS: GOOGLE_AUDIENCES=$GOOGLE_AUDIENCE,AUTHORIZE_API=$OSDU_GCP_AUTHORIZE_API,LEGALTAG_API=$OSDU_GCP_LEGALTAG_API,STORAGE_HOSTNAME=$OSDU_GCP_STORAGE_HOSTNAME,CRS_API=$OSDU_GCP_CRS_API,DEFAULT_DATA_COUNTRY=$OSDU_GCP_DEFAULT_DATA_COUNTRY,REDIS_STORAGE_HOST=$REDIS_STORAGE_HOST,REDIS_GROUP_HOST=$REDIS_GROUP_HOST,PARTITION_API=$OSDU_GCP_PARTITION_API,POLICY_API=$OSDU_GCP_POLICY_API --vpc-connector=$OSDU_GCP_VPC_CONNECTOR
OSDU_GCP_TEST_SUBDIR: testing/$OSDU_GCP_SERVICE-test-$OSDU_GCP_VENDOR
OSDU_GCP_HELM_PACKAGE_CHARTS: "devops/gcp/deploy devops/gcp/configmap"
AZURE_SERVICE: storage
AZURE_BUILD_SUBDIR: provider/storage-azure
......@@ -55,8 +56,11 @@ include:
- project: "osdu/platform/ci-cd-pipelines"
file: "cloud-providers/ibm.yml"
- project: "osdu/platform/ci-cd-pipelines"
file: "cloud-providers/osdu-gcp-cloudrun.yml"
- project: 'osdu/platform/ci-cd-pipelines'
file: 'cloud-providers/osdu-gcp-cloudrun.yml'
- project: 'osdu/platform/ci-cd-pipelines'
file: 'publishing/pages.yml'
- project: "osdu/platform/ci-cd-pipelines"
file: "scanners/gitlab-ultimate.yml"
......@@ -67,6 +71,8 @@ include:
- project: 'osdu/platform/ci-cd-pipelines'
file: 'cloud-providers/aws-mongodb.yml'
# disable the eslint scanner
# I think this is being generated from the presence of an HTML file, but there
# is no javascript to scan, so the job isn't helpful and just gets in the way
......
apiVersion: v2
name: gcp-storage-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"
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: {{ .Values.conf.app_name }}
name: {{ .Values.conf.configmap }}
namespace: {{ .Release.Namespace }}
data:
AUTHORIZE_API: "http://{{ .Values.conf.ent_name }}.{{ .Release.Namespace }}{{ .Values.data.authorize_api }}"
LOG_LEVEL: "{{ .Values.data.log_level }}"
LEGALTAG_API: "http://{{ .Values.conf.legal_name }}.{{ .Release.Namespace }}{{ .Values.data.authorize_api }}"
GOOGLE_AUDIENCES: "{{ .Values.data.google_audiences }}"
STORAGE_HOSTNAME: "{{ .Values.conf.app_name }}"
REDIS_GROUP_HOST: "{{ .Values.data.redis_group_host }}"
REDIS_STORAGE_HOST: "{{ .Values.data.redis_storage_host }}"
CRS_API: "{{ .Values.data.crs_api }}"
DEFAULT_DATA_COUNTRY: "{{ .Values.data.default_data_country }}"
---
# Default values for legal-configmap.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
data:
authorize_api: ".svc.cluster.local/entitlements/v1/"
log_level: "INFO"
legaltag_api: ".svc.cluster.local/api/legal/v1"
google_audiences: "519000754840-r12fqsd3e12aqep8c5f3j3t3emv8jeg1.apps.googleusercontent.com"
redis_group_host: ""
redis_storage_host: ""
default_data_country: "US"
crs_api: "https://os-crs-converter-jvmvia5dea-uc.a.run.app/api/crs/v2/"
conf:
ent_name: ""
legal_name: ""
configmap: "storage-config"
app_name: "storage"
apiVersion: v2
name: gcp-storage-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:
labels:
app: "{{ .Values.conf.app_name }}"
name: "{{ .Values.conf.app_name }}"
namespace: {{ .Release.Namespace }}
spec:
selector:
matchLabels:
app: "{{ .Values.conf.app_name }}"
replicas: 1
template:
metadata:
labels:
app: "{{ .Values.conf.app_name }}"
spec:
containers:
- name: "{{ .Values.conf.app_name }}"
image: "{{ .Values.storage.image }}"
env:
- name: "AUTHORIZE_API"
valueFrom:
configMapKeyRef:
key: AUTHORIZE_API
name: "{{ .Values.conf.configmap }}"
- name: "LOG_LEVEL"
valueFrom:
configMapKeyRef:
key: LOG_LEVEL
name: "{{ .Values.conf.configmap }}"
- name: "STORAGE_HOSTNAME"
valueFrom:
configMapKeyRef:
key: STORAGE_HOSTNAME
name: "{{ .Values.conf.configmap }}"
- name: "LEGALTAG_API"
valueFrom:
configMapKeyRef:
key: LEGALTAG_API
name: "{{ .Values.conf.configmap }}"
- name: "GOOGLE_AUDIENCES"
valueFrom:
configMapKeyRef:
key: GOOGLE_AUDIENCES
name: "{{ .Values.conf.configmap }}"
- name: "REDIS_GROUP_HOST"
valueFrom:
configMapKeyRef:
key: REDIS_GROUP_HOST
name: "{{ .Values.conf.configmap }}"
- name: "REDIS_STORAGE_HOST"
valueFrom:
configMapKeyRef:
key: REDIS_STORAGE_HOST
name: "{{ .Values.conf.configmap }}"
- name: "CRS_API"
valueFrom:
configMapKeyRef:
key: CRS_API
name: "{{ .Values.conf.configmap }}"
- name: "DEFAULT_DATA_COUNTRY"
valueFrom:
configMapKeyRef:
key: DEFAULT_DATA_COUNTRY
name: "{{ .Values.conf.configmap }}"
securityContext:
allowPrivilegeEscalation: false
runAsUser: 0
ports:
- containerPort: 8080
resources:
requests:
cpu: "{{ .Values.storage.requests_cpu }}"
memory: "{{ .Values.storage.requests_memory }}"
limits:
cpu: "{{ .Values.storage.limits_cpu }}"
memory: "{{ .Values.storage.limits_memory }}"
serviceAccountName: "{{ .Values.storage.serviceAccountName }}"
apiVersion: v1
kind: Service
metadata:
name: "{{ .Values.conf.app_name }}"
annotations:
cloud.google.com/neg: '{"ingress": true}'
namespace: {{ .Release.Namespace }}
labels:
app: "{{ .Values.conf.app_name }}"
service: "{{ .Values.conf.app_name }}"
spec:
ports:
- protocol: TCP
port: 80
targetPort: 8080
name: http
selector:
app: "{{ .Values.conf.app_name }}"
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: "{{ .Values.conf.app_name }}"
namespace: {{ .Release.Namespace }}
spec:
hosts:
- "*"
gateways:
- service-gateway
http:
- match:
- uri:
prefix: "/api/storage"
route:
- destination:
port:
number: 80
host: {{ .Values.conf.app_name }}.{{ .Release.Namespace }}.svc.cluster.local
# Default values for legal-deploy.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
storage:
requests_cpu: "0.25"
requests_memory: "128M"
limits_cpu: "0.5"
limits_memory: "256M"
serviceAccountName: ""
image: ""
conf:
configmap: "storage-config"
app_name: "storage"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment