DEVX-178: [BE] Разработать endpoint выдачи информации для подключении фейн-клиентов через gradle/maven

This commit is contained in:
subochev 2026-03-26 12:35:06 +03:00
parent cff9174c1d
commit eb84a85320
8 changed files with 165 additions and 10 deletions

View File

@ -10,6 +10,7 @@ on:
- devspc/devspace-apiregistry-core-service
- devspc/devspace-apiregistry-generator-service
- devspc/devspace-gateway
- devspc/devspace-api
default: devspc/devspace-apiregistry-core-service
branch:
description: 'Ветка'

View File

@ -36,17 +36,8 @@ jobs:
cache: 'npm'
- name: Building
run: |
npm install
npm run build
# - name: Building
# run: |
# ./gradlew bootJar --no-daemon -x cyclonedxBom
# echo 'Jar in libs folder'
# ls ./build/libs
# - name: Publishing docker
# uses: https://git.binom.pw/otp/devops/docker@main
# with:
# image-name: "otp/${{ github.event.inputs.repo_path }}"
# tags: ${{ github.event.inputs.version }}
- name: 'Cleanup'
if: always()
shell: bash

View File

@ -0,0 +1,10 @@
apiVersion: v2
name: devspace-api
description: KuberService
home: https://tlsys.ru/
icon: https://lk.tlsys.org/favicon.png
keywords:
- test
type: application
version: "9.9.9"
appVersion: "9.9.9"

View File

@ -0,0 +1,11 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{$.Release.Name}}-{{$.Chart.Name}}-main-config
data:
application.yaml: |
server:
port: {{ $.Values.port }}
management:
server:
port: {{ $.Values.managementPort }}

View File

@ -0,0 +1,104 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: "{{$.Release.Name}}-{{$.Values.name}}"
annotations:
devspace.isb/name: {{ $.Values.repository.name | quote }}
devspace.isb/branch: {{ $.Values.repository.branch | quote }}
rollme: {{ .Release.Revision | quote }}
labels:
{{- if $.Values.labels}}
{{- toYaml $.Values.labels | nindent 4 }}
{{- end}}
app.kubernetes.io/name: {{$.Values.name}}
app.kubernetes.io/instance: {{ $.Release.Name }}
app.kubernetes.io/version: {{ $.Chart.AppVersion | quote }}
spec:
{{- if not $.Values.autoscaling.enabled }}
{{ if $.Values.replicaCount }}
replicas: {{ $.Values.replicaCount }}
{{ else }}
replicas: 1
{{end}}
{{- end }}
selector:
matchLabels:
app.kubernetes.io/name: {{$.Values.name}}
app.kubernetes.io/instance: {{ $.Release.Name }}
template:
metadata:
annotations:
rollme: {{ .Release.Revision | quote }}
{{- with $.Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
app.kubernetes.io/name: {{$.Values.name}}
app.kubernetes.io/instance: {{ $.Release.Name }}
{{/* app.kubernetes.io/version: {{ $.Chart.AppVersion | quote }}*/}}
spec:
{{- with $.Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{ if $.Values.serviceAccount }}
serviceAccountName: {{ $.Values.serviceAccount.name }}
{{ end }}
volumes:
- name: application-properties-volume
configMap:
name: {{$.Release.Name}}-{{$.Chart.Name}}-main-config
items:
- key: application.yaml
path: application.yaml
securityContext:
{{- toYaml $.Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ $.Chart.Name }}
securityContext:
{{- toYaml $.Values.securityContext | nindent 12 }}
image: "{{ $.Values.image.name }}:{{ $.Values.image.version }}"
imagePullPolicy: {{ $.Values.image.pullPolicy }}
env:
- name: SPRING_CONFIG_ADDITIONAL_LOCATION
value: "file:/opt/app/config/application.yaml"
volumeMounts:
- mountPath: '/opt/app/config'
name: application-properties-volume
ports:
- name: http
containerPort: {{ $.Values.port }}
protocol: TCP
- name: management
containerPort: {{ $.Values.managementPort }}
protocol: TCP
livenessProbe:
httpGet:
path: '/actuator/health/liveness'
port: management
initialDelaySeconds: 20
periodSeconds: 10
readinessProbe:
httpGet:
path: '/actuator/health/readiness'
port: management
initialDelaySeconds: 25
periodSeconds: 10
{{- if $.Values.resources}}
resources:
{{- toYaml $.Values.resources | nindent 12}}
{{- else}}
resources: { }
{{end}}
{{- with $.Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with $.Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

View File

@ -0,0 +1,19 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{$.Release.Name}}-{{$.Values.name}}
namespace: {{$.Release.Namespace}}
annotations:
traefik.ingress.kubernetes.io/router.middlewares: {{$.Release.Namespace}}-{{$.Release.Name}}-cors@kubernetescrd
spec:
rules:
- host: {{tpl $.Values.ingress.host .}}
http:
paths:
- path: /devspace-api/
pathType: Prefix
backend:
service:
name: "{{ $.Release.Name }}-{{ $.Values.name }}"
port:
number: {{ $.Values.port }}

View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: "{{$.Release.Name}}-{{$.Values.name}}"
spec:
selector:
app.kubernetes.io/name: {{$.Values.name}}
app.kubernetes.io/instance: {{ $.Release.Name }}
ports:
- protocol: TCP
port: {{$.Values.port}} # порт, по которуму сервис будет доступен внутри кластера
targetPort: {{$.Values.port}} # порт, на котором слушает ваше приложение внутри контейнера

View File

@ -0,0 +1,7 @@
port: 8080
managementPort: 9090
imagePullSecrets: null
image:
name: null
pullPolicy: Always
version: ''