This commit is contained in:
Дмитрий Соловьев
2026-05-25 14:23:52 +03:00
parent b3a6012ebb
commit d48ddd2657
1066 changed files with 104601 additions and 3 deletions
+6
View File
@@ -0,0 +1,6 @@
apiVersion: v2
name: pcp-tgu-service
description: Helm chart for deploying pcp-tgu-service from GitLab CI/CD.
type: application
version: 0.1.0
appVersion: "1.0.0"
@@ -0,0 +1,18 @@
{{- define "pcp-tgu-service.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- define "pcp-tgu-service.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- include "pcp-tgu-service.name" . | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- define "pcp-tgu-service.labels" -}}
app.kubernetes.io/name: {{ include "pcp-tgu-service.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
@@ -0,0 +1,78 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "pcp-tgu-service.fullname" . }}
labels:
{{- include "pcp-tgu-service.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "pcp-tgu-service.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
{{- include "pcp-tgu-service.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.image.pullSecrets }}
imagePullSecrets:
{{- range . }}
- name: {{ . }}
{{- end }}
{{- end }}
containers:
- name: {{ include "pcp-tgu-service.name" . }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
env:
- name: SPRING_PROFILES_ACTIVE
value: {{ .Values.app.profile | quote }}
- name: CONFIG_SERVER_URI
value: {{ .Values.app.configServerUri | quote }}
- name: SPRING_CLOUD_CONFIG_LABEL
value: {{ .Values.app.configLabel | quote }}
- name: CONFIG_SERVER_FAIL_FAST
value: {{ .Values.app.configServerFailFast | quote }}
{{- if .Values.app.adminClientUrl }}
- name: SPRING_BOOT_ADMIN_CLIENT_URL
value: {{ .Values.app.adminClientUrl | quote }}
{{- end }}
{{- if .Values.app.serviceBaseUrl }}
- name: SPRING_BOOT_ADMIN_CLIENT_INSTANCE_SERVICE_BASE_URL
value: {{ .Values.app.serviceBaseUrl | quote }}
{{- end }}
{{- if .Values.app.managementBaseUrl }}
- name: SPRING_BOOT_ADMIN_CLIENT_INSTANCE_MANAGEMENT_BASE_URL
value: {{ .Values.app.managementBaseUrl | quote }}
{{- end }}
{{- with .Values.extraEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
readinessProbe:
httpGet:
path: /actuator/health
port: http
initialDelaySeconds: 20
periodSeconds: 15
timeoutSeconds: 5
livenessProbe:
httpGet:
path: /actuator/health
port: http
initialDelaySeconds: 40
periodSeconds: 20
timeoutSeconds: 5
resources:
{{- toYaml .Values.resources | nindent 12 }}
@@ -0,0 +1,31 @@
{{- if .Values.ingress.enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "pcp-tgu-service.fullname" . }}
labels:
{{- include "pcp-tgu-service.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className | quote }}
{{- end }}
{{- with .Values.ingress.tls }}
tls:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
- host: {{ .Values.ingress.host | quote }}
http:
paths:
- path: {{ .Values.ingress.path | quote }}
pathType: {{ .Values.ingress.pathType }}
backend:
service:
name: {{ include "pcp-tgu-service.fullname" . }}
port:
number: {{ .Values.service.port }}
{{- end }}
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "pcp-tgu-service.fullname" . }}
labels:
{{- include "pcp-tgu-service.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
selector:
app.kubernetes.io/name: {{ include "pcp-tgu-service.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
ports:
- name: http
port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
+17
View File
@@ -0,0 +1,17 @@
app:
profile: dev
configLabel: dev
adminClientUrl: "http://pcp-spring-boot-admin-server:38889"
serviceBaseUrl: "http://pcp-tgu-service:8080"
managementBaseUrl: "http://pcp-tgu-service:8080"
service:
port: 8080
ingress:
enabled: true
host: pcp-tgu-service.dev.k8s.264.nstart.cloud
extraEnv:
- name: SERVER_PORT
value: "8080"
+14
View File
@@ -0,0 +1,14 @@
app:
profile: master
configLabel: master
service:
port: 8080
ingress:
enabled: true
host: pcp-tgu-service.master.k8s.264.nstart.cloud
extraEnv:
- name: SERVER_PORT
value: "8080"
+39
View File
@@ -0,0 +1,39 @@
replicaCount: 1
image:
repository: registry.example.com/pcp/pcp-tgu-service
tag: latest
pullPolicy: IfNotPresent
pullSecrets: []
service:
type: ClusterIP
port: 8080
app:
profile: master
configServerUri: "http://spring-cloud-config-server:38888"
configServerFailFast: "true"
configLabel: master
adminClientUrl: ""
serviceBaseUrl: ""
managementBaseUrl: ""
ingress:
enabled: false
className: ""
annotations: {}
host: ""
path: /
pathType: Prefix
tls: []
extraEnv: []
resources: {}
podAnnotations: {}
podLabels: {}
nameOverride: ""
fullnameOverride: ""