Commit 88c1eaef authored by Mykola Zamkovyi (EPAM)'s avatar Mykola Zamkovyi (EPAM)
Browse files

wb movie to common pipeline

parent 5d9c957a
# 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
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 "gcp.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 "gcp.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 "gcp.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "gcp.labels" -}}
helm.sh/chart: {{ include "gcp.chart" . }}
{{ include "gcp.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "gcp.selectorLabels" -}}
app.kubernetes.io/name: {{ include "gcp.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "gcp.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "gcp.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
#kind: ConfigMap
#apiVersion: v1
#data:
# CLOUD_PROVIDER: gcp
# OS_WELLBORE_DDMS_DATA_PROJECT_ID: {{ .Values.configMap.data.projectId }}
# SERVICE_HOST_STORAGE: {{ .Values.configMap.data.storageEndpoint }}
# SERVICE_HOST_SEARCH: {{ .Values.configMap.data.searchEndpoint }}
#metadata:
# name: {{ .Values.configMap.name }}
# namespace: {{ .Values.namespace }}
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: {{ .Values.namespace }}
name: {{ include "gcp.fullname" . }}
labels:
{{- include "gcp.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "gcp.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "gcp.selectorLabels" . | nindent 8 }}
spec:
volumes:
- name: service-account-key
secret:
secretName: {{ .Values.secret.name }}
containers:
- name: {{ .Chart.Name }}
volumeMounts:
- mountPath: /tmp/key
name: service-account-key
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
- configMapRef:
name: {{ .Values.configMap.name }}
env:
- name: OS_WELLBORE_DDMS_DATA_PROJECT_CREDENTIALS
value: /tmp/key/{{ .Values.secret.key }}
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
livenessProbe:
httpGet:
path: /api/os-wellbore-ddms/healthz
port: http
readinessProbe:
httpGet:
path: /api/os-wellbore-ddms/healthz
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: {{ include "gcp.fullname" . }}
namespace: {{ .Values.namespace }}
annotations:
kubernetes.io/ingress.class: "gce"
spec:
rules:
- http:
paths:
- path: /*
backend:
serviceName: {{ include "gcp.fullname" . }}
servicePort: 8080
kind: Secret
apiVersion: v1
metadata:
name: {{ .Values.secret.name }}
namespace: {{ .Values.namespace }}
type: Opaque
data:
{{ .Values.secret.key | quote }}: {{ .Values.secret.gcpSA | quote }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "gcp.fullname" . }}
namespace: {{ .Values.namespace }}
labels:
{{- include "gcp.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "gcp.selectorLabels" . | nindent 4 }}
# Default values for gcp.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
namespace: wellbore
configMap:
data:
cloudProvider: gcp
projectId: nice-etching-277309
searchEndpoint: https://os-search-attcrcktoa-uc.a.run.app/api/search
storageEndpoint: https://os-storage-attcrcktoa-uc.a.run.app/api/storage
name: wellbore
secret:
name: wellbore
key: "key.json"
gcpSA: "" #ENTER in base64 service-account value
replicaCount: 1
image:
repository: "gcr.io/nice-etching-277309/wellbore-ddms/wellbore-ddms-gcp"
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: "7e6b01b5"
service:
#type: ClusterIP
type: NodePort
port: 8080
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: gcp
# kubernetes.io/tls-acme: "true"
# hosts:
# - host: chart-example.local
# paths: []
# tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 800m
# memory: 512Mi
# requests:
# cpu: 700m
# memory: 512Mi
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