DEVX-178: [BE] Разработать endpoint выдачи информации для подключении фейн-клиентов через gradle/maven
This commit is contained in:
parent
cff9174c1d
commit
eb84a85320
@ -10,6 +10,7 @@ on:
|
|||||||
- devspc/devspace-apiregistry-core-service
|
- devspc/devspace-apiregistry-core-service
|
||||||
- devspc/devspace-apiregistry-generator-service
|
- devspc/devspace-apiregistry-generator-service
|
||||||
- devspc/devspace-gateway
|
- devspc/devspace-gateway
|
||||||
|
- devspc/devspace-api
|
||||||
default: devspc/devspace-apiregistry-core-service
|
default: devspc/devspace-apiregistry-core-service
|
||||||
branch:
|
branch:
|
||||||
description: 'Ветка'
|
description: 'Ветка'
|
||||||
|
|||||||
@ -36,17 +36,8 @@ jobs:
|
|||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
- name: Building
|
- name: Building
|
||||||
run: |
|
run: |
|
||||||
|
npm install
|
||||||
npm run build
|
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'
|
- name: 'Cleanup'
|
||||||
if: always()
|
if: always()
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
10
devspc/devspace-api/Chart.yaml
Normal file
10
devspc/devspace-api/Chart.yaml
Normal 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"
|
||||||
11
devspc/devspace-api/templates/configmap.yaml
Normal file
11
devspc/devspace-api/templates/configmap.yaml
Normal 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 }}
|
||||||
104
devspc/devspace-api/templates/deployment.yaml
Normal file
104
devspc/devspace-api/templates/deployment.yaml
Normal 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 }}
|
||||||
19
devspc/devspace-api/templates/ingress.yaml
Normal file
19
devspc/devspace-api/templates/ingress.yaml
Normal 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 }}
|
||||||
12
devspc/devspace-api/templates/service.yaml
Normal file
12
devspc/devspace-api/templates/service.yaml
Normal 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}} # порт, на котором слушает ваше приложение внутри контейнера
|
||||||
7
devspc/devspace-api/values.yaml
Normal file
7
devspc/devspace-api/values.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
port: 8080
|
||||||
|
managementPort: 9090
|
||||||
|
imagePullSecrets: null
|
||||||
|
image:
|
||||||
|
name: null
|
||||||
|
pullPolicy: Always
|
||||||
|
version: ''
|
||||||
Loading…
x
Reference in New Issue
Block a user