Commit e0e32ce4 authored by vladislav's avatar vladislav
Browse files

add gcp helms

parent 6a02999e
Pipeline #46893 passed with stages
in 16 minutes and 10 seconds
......@@ -9,6 +9,7 @@ variables:
AWS_SERVICE: entitlements-v2
AWS_ENVIRONMENT: dev
OSDU_GCP_HELM_PACKAGE_CHARTS: "devops/gcp/deploy devops/gcp/configmap"
include:
......@@ -31,4 +32,4 @@ include:
file: "cloud-providers/aws.yml"
- project: "osdu/platform/ci-cd-pipelines"
file: "publishing/pages.yml"
\ No newline at end of file
file: "publishing/pages.yml"
apiVersion: v2
name: gcp-entitlements-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.
appVersion: 1.16.0
apiVersion: v1
kind: Secret
metadata:
labels:
app: "{{ .Values.conf.app_name }}"
name: "{{ .Values.conf.secret_name }}"
namespace: "{{ .Release.Namespace }}"
type: Opaque
data:
SPRING_DATASOURCE_PASSWORD: "{{ .Values.data.spring_datasource_password }}"
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: "{{ .Values.conf.app_name }}"
name: "{{ .Values.conf.configmap }}"
namespace: "{{ .Release.Namespace }}"
data:
DOMAIN: "{{ .Values.data.domain }}"
REDIS_GROUP_HOST: "{{ .Values.data.redis_group_host }}"
REDIS_GROUP_PORT: "{{ .Values.data.redis_group_port }}"
SPRING_DATASOURCE_URL: "{{ .Values.data.spring_datasource_url }}"
GOOGLE_AUDIENCES: "{{ .Values.data.google_audiences }}"
SPRING_DATASOURCE_USERNAME: "{{ .Values.data.spring_datasource_username }}"
PARTITION_API: "{{ .Values.data.partition_api }}"
LOG_PREFIX: "{{ .Values.data.log_prefix }}"
SPRING_PROFILES_ACTIVE: "{{ .Values.data.spring_profiles_active }}"
LOG_LEVEL: "{{ .Values.data.log_level }}"
data:
domain: ""
google_audiences: ""
redis_group_host: ""
redis_group_port: 9423
spring_datasource_url: ""
spring_datasource_username: ""
spring_datasource_password: ""
spring_profiles_active: "dev"
partition_api: ""
log_prefix: "ent-v2"
log_level: ""
conf:
configmap: "entitlements-config"
app_name: "entitlements-sql"
secret_name: "entitlements-secret"
apiVersion: v2
name: gcp-entitlements-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.
appVersion: 1.16.0
apiVersion: apps/v1
kind: Deployment
metadata:
name: "{{ .Values.conf.app_name }}"
namespace: "{{ .Release.Namespace }}"
spec:
replicas: 1
selector:
matchLabels:
app: "{{ .Values.conf.app_name }}"
template:
metadata:
labels:
app: "{{ .Values.conf.app_name }}"
spec:
containers:
- image: "{{ .Values.data.image }}"
imagePullPolicy: Always
name: "{{ .Values.conf.app_name }}"
envFrom:
- configMapRef:
name: "{{ .Values.conf.configmap }}"
- secretRef:
name: "{{ .Values.conf.secret_name }}"
- image: "gcr.io/cloudsql-docker/gce-proxy:{{ .Values.data.cloud_sql_proxy_version }}"
name: cloud-sql-proxy
command:
- /cloud_sql_proxy
- "-instances={{ .Values.data.sql_connection_string }}=tcp:5432"
securityContext:
allowPrivilegeEscalation: false
runAsUser: 0
ports:
- containerPort: 8080
resources:
requests:
cpu: "0.25"
memory: "128M"
limits:
cpu: "1"
memory: "1G"
serviceAccountName: "{{ .Values.data.serviceAccountName }}"
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/v1alpha3
kind: VirtualService
metadata:
name: "{{ .Values.conf.app_name }}"
namespace: "{{ .Release.Namespace }}"
spec:
hosts:
- "*"
gateways:
- service-gateway
http:
- match:
- uri:
prefix: "/api/entitlements/v2"
route:
- destination:
port:
number: 80
host: "{{ .Values.conf.app_name }}.{{ .Release.Namespace }}.svc.cluster.local"
data:
serviceAccountName: ""
image: ""
cloud_sql_proxy_version: "1.20.0"
sql_connection_string: ""
conf:
configmap: "entitlements-config"
app_name: "entitlements-sql"
secret_name: "entitlements-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