first commit
This commit is contained in:
23
helm-chart/charts/backend/.helmignore
Normal file
23
helm-chart/charts/backend/.helmignore
Normal file
@@ -0,0 +1,23 @@
|
||||
# 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/
|
||||
24
helm-chart/charts/backend/Chart.yaml
Normal file
24
helm-chart/charts/backend/Chart.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
apiVersion: v2
|
||||
name: backend
|
||||
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"
|
||||
164
helm-chart/charts/backend/templates/configmap.yml
Normal file
164
helm-chart/charts/backend/templates/configmap.yml
Normal file
@@ -0,0 +1,164 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "chart.fullname" . }}-configmap
|
||||
labels:
|
||||
name: {{ include "chart.fullname" . }}-configmap
|
||||
data:
|
||||
application.yml: |
|
||||
spring:
|
||||
application:
|
||||
name: {{repo_name}}
|
||||
|
||||
datasource:
|
||||
url: jdbc:mysql://mysql-haproxy.database.svc.cluster.local:3306/{{db_name repo_name}}?createDatabaseIfNotExist=true
|
||||
username: system
|
||||
password: admin
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
hikari:
|
||||
connectionTimeout: 20000
|
||||
maximumPoolSize: 20
|
||||
jpa:
|
||||
database-platform: org.hibernate.dialect.MySQL8Dialect
|
||||
hibernate:
|
||||
ddl-auto: update # Options: none, validate, update, create, create-drop
|
||||
show-sql: true
|
||||
defer-datasource-initialization: false
|
||||
properties:
|
||||
hibernate:
|
||||
format_sql: true
|
||||
|
||||
# If you are using process, uncomment below
|
||||
# sql:
|
||||
# init:
|
||||
# schema-locations:
|
||||
# - classpath:activiti.engine.schema.sql
|
||||
# mode: always
|
||||
|
||||
security:
|
||||
oauth2:
|
||||
resourceserver:
|
||||
jwt:
|
||||
issuer-uri: https://holocron.keross.com/api/platform
|
||||
|
||||
# If you use any one of the below data sources, uncomment data and the respective section.
|
||||
#data:
|
||||
# If you are using redis, uncomment below
|
||||
# redis:
|
||||
# host: redis.database.svc.cluster.local
|
||||
# port: 6379
|
||||
# password: ducs8WZf7lJnsHm6
|
||||
# database: 0
|
||||
# lettuce:
|
||||
# pool:
|
||||
# max-active: 10 # Maximum number of connections
|
||||
# max-idle: 8 # Maximum idle connections
|
||||
# min-idle: 2 # Minimum idle connections
|
||||
# max-wait: 5s # Max wait time for a connection
|
||||
|
||||
# If you are using mongodb, uncomment below
|
||||
# mongodb:
|
||||
# host: mongo.database.svc.cluster.loca
|
||||
# port: 27017
|
||||
# username: admin
|
||||
# password: admin
|
||||
# authentication-database: admin
|
||||
# mongodb:
|
||||
# client:
|
||||
# settings:
|
||||
# connection-pool:
|
||||
# max-size: 500 # Maximum connections in the pool
|
||||
# min-size: 10 # Minimum idle connections
|
||||
# max-connection-idle-time: 10s # Time a connection can be idle before being closed
|
||||
# max-wait-time: 5s
|
||||
|
||||
# If you are using kafka, uncomment below
|
||||
# kafka:
|
||||
# bootstrap-servers: kafka.kafka.svc.cluster.local:9092
|
||||
# properties:
|
||||
# schema:
|
||||
# registry:
|
||||
# url: http://schemaregistry.kafka.svc.cluster.local:8081
|
||||
# specific:
|
||||
# avro:
|
||||
# reader: true
|
||||
# producer:
|
||||
# key-serializer: org.apache.kafka.common.serialization.StringSerializer
|
||||
# value-serializer: io.confluent.kafka.serializers.KafkaAvroSerializer
|
||||
# consumer:
|
||||
# key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
|
||||
# value-deserializer: io.confluent.kafka.serializers.KafkaAvroDeserializer
|
||||
# group-id: ${spring.application.name}-consumer-group
|
||||
# auto-offset-reset: earliest
|
||||
|
||||
|
||||
|
||||
ikon:
|
||||
user:
|
||||
agent: "IKON App Server"
|
||||
time-zone: "Asia/Kolkata"
|
||||
platform:
|
||||
rest:
|
||||
url: http://ikon-api-gateway.ikon-platform.svc.cluster.local:8080/api
|
||||
logger:
|
||||
enabled: false # set true when deployed in dev/uat/prod otherwise set to false if running in local/devtools environment.
|
||||
app:
|
||||
softwareId: "{{software_id}}"
|
||||
softwareVersion: {{version}}
|
||||
softwareName: "{{app_name}}"
|
||||
softwareRepositoryName: "{{repo_name}}"
|
||||
|
||||
accessmanagement:
|
||||
init:
|
||||
file: ./bpmn/project.json
|
||||
|
||||
# If you are using process, uncomment below
|
||||
# processengine:
|
||||
# databaseSchemaUpdate: false # possible values: "true", "false", "create-drop"
|
||||
# bpmn:
|
||||
# enabled: true
|
||||
# path: ./bpmn
|
||||
# job:
|
||||
# max-pool-size: 100
|
||||
|
||||
|
||||
|
||||
logging:
|
||||
level:
|
||||
com.ikon: DEBUG
|
||||
file:
|
||||
name: "../logs/${spring.application.name}-app.log"
|
||||
|
||||
server:
|
||||
address: ${HOSTNAME}
|
||||
port: 8070
|
||||
|
||||
eureka:
|
||||
instance:
|
||||
hostname: ${HOSTNAME}
|
||||
ipAddress: ${{{upper_snake_case repo_name}}_BACKEND_SERVICE_SERVICE_HOST}
|
||||
preferIpAddress: true
|
||||
instance-id: ${spring.cloud.client.ip-address}:${spring.application.name}:${server.port}
|
||||
client:
|
||||
registerWithEureka: true
|
||||
fetchRegistry: true
|
||||
serviceUrl:
|
||||
defaultZone: http://ikon-discovery-service.ikon-platform.svc.cluster.local:8761/eureka
|
||||
|
||||
|
||||
management:
|
||||
endpoint:
|
||||
health:
|
||||
probes:
|
||||
enabled: true
|
||||
show-details: always
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: health
|
||||
health:
|
||||
livenessState:
|
||||
enabled: true
|
||||
readinessState:
|
||||
enabled: true
|
||||
|
||||
62
helm-chart/charts/backend/templates/deployment.yml
Normal file
62
helm-chart/charts/backend/templates/deployment.yml
Normal file
@@ -0,0 +1,62 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "chart.fullname" . }}-deployment
|
||||
labels:
|
||||
{{- include "chart.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "chart.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "chart.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- if .Values.global.imagePullSecret.enabled }}
|
||||
imagePullSecrets:
|
||||
- name: {{ .Release.Name }}-registry-secret
|
||||
{{- else if .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml .Values.imagePullSecrets | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.service.port }}
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /actuator/health/liveness
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /actuator/health/readiness
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
readOnly: true
|
||||
mountPath: /app/application.yml
|
||||
subPath: application.yml
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 10 }}
|
||||
env:
|
||||
{{- with .Values.env }}
|
||||
{{- toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: {{ include "chart.fullname" . }}-configmap
|
||||
49
helm-chart/charts/backend/templates/helpers.tpl
Normal file
49
helm-chart/charts/backend/templates/helpers.tpl
Normal file
@@ -0,0 +1,49 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "chart.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
*/}}
|
||||
{{- define "chart.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 "chart.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "chart.labels" -}}
|
||||
helm.sh/chart: {{ include "chart.chart" . }}
|
||||
{{ include "chart.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "chart.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "chart.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
15
helm-chart/charts/backend/templates/service.yml
Normal file
15
helm-chart/charts/backend/templates/service.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "chart.fullname" . }}-service
|
||||
labels:
|
||||
{{- include "chart.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
{{- include "chart.selectorLabels" . | nindent 4 }}
|
||||
31
helm-chart/charts/backend/values.yaml
Normal file
31
helm-chart/charts/backend/values.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
# Default values for your helm chart
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: ""
|
||||
tag: ""
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
podAnnotations: {}
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 8070
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 512Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 180
|
||||
periodSeconds: 20
|
||||
|
||||
readinessProbe:
|
||||
initialDelaySeconds: 180
|
||||
periodSeconds: 10
|
||||
|
||||
env: []
|
||||
Reference in New Issue
Block a user