first commit
This commit is contained in:
139
helm-chart/charts/backend/templates/configmap.yaml
Normal file
139
helm-chart/charts/backend/templates/configmap.yaml
Normal file
@@ -0,0 +1,139 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "chart.fullname" . }}-configmap
|
||||
labels:
|
||||
name: {{ include "chart.fullname" . }}-configmap
|
||||
data:
|
||||
application.yml: |
|
||||
spring:
|
||||
application:
|
||||
name: project-management
|
||||
profiles:
|
||||
active: local
|
||||
|
||||
service:
|
||||
token:
|
||||
enabled: true
|
||||
|
||||
# =============================
|
||||
# MySQL Database Configuration
|
||||
# =============================
|
||||
datasource:
|
||||
url: jdbc:mysql://e2e-84-26.ssdcloudindia.net:3306/project_management?useLocalSessionState=true&alwaysSendSetIsolation=false
|
||||
username: ikon_platform
|
||||
password: DOuCS7OX@un796b1QM
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
hikari:
|
||||
connectionTimeout: 20000
|
||||
maximumPoolSize: 20
|
||||
|
||||
jpa:
|
||||
database-platform: org.hibernate.dialect.MySQL8Dialect
|
||||
hibernate:
|
||||
ddl-auto: update
|
||||
show-sql: true
|
||||
defer-datasource-initialization: false
|
||||
properties:
|
||||
hibernate:
|
||||
format_sql: true
|
||||
|
||||
|
||||
# =============================
|
||||
# Security Configuration
|
||||
# =============================
|
||||
security:
|
||||
oauth2:
|
||||
resourceserver:
|
||||
jwt:
|
||||
issuer-uri: https://holocron.keross.com/api/platform
|
||||
|
||||
|
||||
# =============================
|
||||
# IKON Platform Configurations
|
||||
# =============================
|
||||
ikon:
|
||||
connector:
|
||||
internal-auth:
|
||||
tokenUri: https://holocron.keross.com/api/platform/oauth2/token
|
||||
clientId: ikon-client-management
|
||||
clientSecret: F38Ysb4VEOSXUeISKcMyvpKqxtrIL8nf
|
||||
crypto:
|
||||
secretKey: MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY=
|
||||
user:
|
||||
agent: "IKON App Server"
|
||||
platform:
|
||||
rest: https://holocron.keross.com/api
|
||||
logger:
|
||||
enabled: false
|
||||
|
||||
accessmanagement:
|
||||
init:
|
||||
file: ../../bpmn/project.json
|
||||
|
||||
|
||||
app:
|
||||
softwareId: "14ca0e46-bdb8-4436-a5bb-c6a664551478"
|
||||
softwareVerion: 1
|
||||
softwareName: "Project Management"
|
||||
softwareRepositoryName: ${spring.application.name}
|
||||
|
||||
|
||||
# =============================
|
||||
# Sales-CRM API Configuration
|
||||
# =============================
|
||||
salescrm:
|
||||
api:
|
||||
base-url: https://holocron.keross.com/api/salescrm/api/v1
|
||||
|
||||
|
||||
|
||||
# =============================
|
||||
# Logging Configuration
|
||||
# =============================
|
||||
logging:
|
||||
level:
|
||||
com.ikon: DEBUG
|
||||
file:
|
||||
name: "../logs/${spring.application.name}-app.log"
|
||||
|
||||
|
||||
# =============================
|
||||
# Server Configuration
|
||||
# =============================
|
||||
server:
|
||||
address: 0.0.0.0
|
||||
port: 8071
|
||||
|
||||
|
||||
# =============================
|
||||
# Eureka (Optional)
|
||||
# =============================
|
||||
eureka:
|
||||
instance:
|
||||
hostname: ${HOSTNAME}
|
||||
ipAddress: ${PROJECT_MANAGEMENT_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.yaml
Normal file
62
helm-chart/charts/backend/templates/deployment.yaml
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.yaml
Normal file
15
helm-chart/charts/backend/templates/service.yaml
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 }}
|
||||
Reference in New Issue
Block a user