Skip to content
Snippets Groups Projects
Commit b7477ef8 authored by Oleksandr Kosse (EPAM)'s avatar Oleksandr Kosse (EPAM)
Browse files

Merge branch 'GONRG-2538' into 'master'

Added helm charts

See merge request !61
parents 85731c7d 693e2fa9
No related branches found
No related tags found
2 merge requests!82Revert "Merge branch 'Add-pages-publishing' into 'master'",!61Added helm charts
Pipeline #46600 failed
......@@ -18,6 +18,7 @@ variables:
OSDU_GCP_ENV_VARS: AUTHORIZE_API=$OSDU_GCP_AUTHORIZE_API,GOOGLE_CLOUD_PROJECT=$OSDU_GCP_PROJECT,GOOGLE_AUDIENCES=$GOOGLE_AUDIENCE,PARTITION_ADMIN_ACCOUNT=$OSDU_GCP_SERVICE_ACCOUNT
MAVEN_PROJECTS: "-pl partition-core,provider/partition-gcp"
OSDU_GCP_TEST_SUBDIR: testing/$OSDU_GCP_SERVICE-test-$OSDU_GCP_VENDOR
OSDU_GCP_HELM_PACKAGE_CHARTS: "devops/gcp/deploy devops/gcp/configmap"
include:
- project: "osdu/platform/ci-cd-pipelines"
......
apiVersion: v2
name: partition-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: ConfigMap
metadata:
labels:
app: "{{ .Values.conf.app_name }}"
name: "{{ .Values.conf.configmap }}"
namespace: "{{ .Release.Namespace }}"
data:
GOOGLE_CLOUD_PROJECT: "{{ .Values.data.google_cloud_project }}"
PARTITION_ADMIN_ACCOUNT: "{{ .Values.data.partition_admin_account }}"
GOOGLE_AUDIENCES: "{{ .Values.data.google_audiences }}"
KEY_RING: "{{ .Values.data.key_ring }}"
LOG_LEVEL: "{{ .Values.data.log_level }}"
data:
google_cloud_project: ""
partition_admin_account: ""
google_audiences: ""
key_ring: ""
log_level: ""
conf:
configmap: "partition-config"
app_name: "partition"
apiVersion: v2
name: partition-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 }}"
env:
- name: "ACCEPT_HTTP"
value: "true"
envFrom:
- configMapRef:
name: "{{ .Values.conf.configmap }}"
securityContext:
allowPrivilegeEscalation: false
runAsUser: 0
ports:
- containerPort: 8080
resources:
requests:
cpu: "{{ .Values.data.requests_cpu }}"
memory: "{{ .Values.data.requests_memory }}"
limits:
cpu: "{{ .Values.data.limits_cpu }}"
memory: "{{ .Values.data.limits_memory }}"
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/partition
route:
- destination:
port:
number: 80
host: {{ .Values.conf.app_name }}.{{ .Release.Namespace }}.svc.cluster.local
# Default values for partition-deploy.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
data:
requests_cpu: "0.25"
requests_memory: "128M"
limits_cpu: "1"
limits_memory: "1G"
serviceAccountName: ""
image: ""
conf:
configmap: "partition-config"
app_name: "partition"
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