DEVX-190: Исправить дублирование заголовка Transfer-Encoding в ответах api-service

This commit is contained in:
2026-04-07 18:18:06 +03:00
parent 32fc3c4022
commit 72717bb09e
7 changed files with 214 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
apiVersion: v2
name: devspace-gateway
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"
@@ -0,0 +1,29 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{$.Release.Name}}-{{$.Chart.Name}}-main-config
data:
application.yaml: |
server:
port: {{ $.Values.port }}
management:
server:
port: {{ $.Values.managementPort }}
spring:
cloud:
vault:
enabled: true
app-role.role-id: '{{$.Values.vault.appRole.roleId}}'
app-role.secret-id: '{{$.Values.vault.appRole.secretId}}'
config.lifecycle.enabled: true
session.lifecycle.enabled: true
fail-fast: true
api-registry-core:
url: 'http://{{$.Values.services.core}}'
api-registry-generator:
url: 'http://{{$.Values.services.generator}}'
app:
auth:
enabled: true
jwk-uri: 'http://{{$.Values.keycloak.jwk}}'
jwt-service-claim-name: '{{$.Values.keycloak.claimName}}'
@@ -0,0 +1,113 @@
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 }}
metric.binom.pw/enabled: '{{$.Values.metrics}}'
{{ if ($.Values.metrics) }}
metric.binom.pw/url: ":9090/prometheus"
{{ end }}
{{- 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
- name: dependencies-data
persistentVolumeClaim:
claimName: "{{$.Release.Name}}-{{$.Values.name}}-dependencies"
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
- name: dependencies-data
mountPath: /storage
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: 10
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 }}
@@ -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}}-url-prefix@kubernetescrd
spec:
rules:
- host: {{tpl $.Values.ingress.host .}}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: "{{ $.Release.Name }}-{{ $.Values.name }}"
port:
number: {{ $.Values.port }}
@@ -0,0 +1,9 @@
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: {{$.Release.Name}}-url-prefix
namespace: {{$.Release.Namespace}}
spec:
stripPrefix:
prefixes:
- {{$.Values.ingress.prefix}}
@@ -0,0 +1,16 @@
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: {{ $.Release.Name }}-{{ $.Values.name }}-route
namespace: devx
spec:
entryPoints:
- web
routes:
- match: Host(`{{tpl $.Values.ingress.host .}}`)
kind: Rule
middlewares:
- name: {{$.Release.Name}}-cors
services:
- name: "{{ $.Release.Name }}-{{ $.Values.name }}"
port: {{ $.Values.port }}
+18
View File
@@ -0,0 +1,18 @@
ingress:
host: 'gateway.devx.kube.xx'
port: 8080
managementPort: 9090
name: agent
vault:
appRole:
roleId: '85a3c725-075b-b107-b948-a076625a1a37'
secretId: 'b36b7b4c-5da4-d5cf-1cdf-f367bd52b475'
services:
core: 'devspace-apiregistry-core-service-agent'
generator: 'devspace-apiregistry-generator-service-agent'
keycloak:
jwk: 'http://192.168.76.150:8080/realms/devspace-dev/protocol/openid-connect/certs'
claimName: 'development-space'
ingress:
host: 'ui.devx.kube.xx'
prefix: '/devspace-ui'