Commit 0b7fc805 authored by Oleksandr Kosse (EPAM)'s avatar Oleksandr Kosse (EPAM)
Browse files

Merge branch 'gcp-publish-helms' into 'master'

Add helms for schema service [GONRG-2682]

See merge request !122
parents 731c6aa7 476d3538
Pipeline #50157 passed with stages
in 7 minutes and 53 seconds
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
apiVersion: v2
name: gcp-schema-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:
LOG_LEVEL: "{{ .Values.data.log_level }}"
LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_WEB: "{{ .Values.data.log_level }}"
PARTITION_API: "{{ .Values.data.partition_api }}"
GOOGLE_AUDIENCES: "{{ .Values.data.google_audiences }}"
AUTHORIZE_API: "{{ .Values.data.authorize_api }}"
AUTHORIZE_API_KEY: "{{ .Values.data.authorize_api_key }}"
SHARED_TENANT_NAME: "{{ .Values.data.shared_tenant_name }}"
# Default values for schema-configmap.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
data:
log_level: ""
authorize_api: ""
authorize_api_key: ""
partition_api: ""
google_audiences: ""
shared_tenant_name: ""
conf:
configmap: "schema-config"
app_name: "schema"
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
apiVersion: v2
name: gcp-schema-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"
{{/*
Expand the name of the chart.
*/}}
{{- define "deploy.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "deploy.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "deploy.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "deploy.labels" -}}
helm.sh/chart: {{ include "deploy.chart" . }}
{{ include "deploy.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "deploy.selectorLabels" -}}
app.kubernetes.io/name: {{ include "deploy.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "deploy.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "deploy.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
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.data.image }}"
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 }}"
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/schema-service"
route:
- destination:
port:
number: 80
host: "{{ .Values.conf.app_name }}.{{ .Release.Namespace }}.svc.cluster.local"
# Default values for schema-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: "schema-config"
app_name: "schema"
Markdown is supported
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