diff --git a/envoy/Dockerfile b/envoy/Dockerfile index 033917b..2c640c1 100644 --- a/envoy/Dockerfile +++ b/envoy/Dockerfile @@ -7,4 +7,4 @@ COPY configs build/configs/ WORKDIR /app/build ENTRYPOINT java -jar ${APP_NAME}-${APP_VERSION}.jar ${SPRING_ARGS} -EXPOSE 8080 +EXPOSE 8080 8000 diff --git a/envoy/chart/Chart.yaml b/envoy/chart/Chart.yaml index 015a95d..292cc0f 100644 --- a/envoy/chart/Chart.yaml +++ b/envoy/chart/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.0 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "main" +appVersion: "v.0.0.4" diff --git a/envoy/chart/templates/deployment.yaml b/envoy/chart/templates/deployment.yaml index 3f9b3e6..6753f1d 100644 --- a/envoy/chart/templates/deployment.yaml +++ b/envoy/chart/templates/deployment.yaml @@ -44,13 +44,15 @@ spec: httpGet: path: /actuator/health/ port: {{ .Values.service.targetPort }} - timeoutSeconds: 5 + periodSeconds: 60 + timeoutSeconds: 30 readinessProbe: failureThreshold: 10 + periodSeconds: 60 + timeoutSeconds: 30 httpGet: path: /actuator/health/ port: {{ .Values.service.targetPort }} - timeoutSeconds: 5 resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.volumeMounts }} diff --git a/envoy/chart/templates/discover_service.yaml b/envoy/chart/templates/discover_service.yaml new file mode 100644 index 0000000..d935cb5 --- /dev/null +++ b/envoy/chart/templates/discover_service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "springboot-helm-chart.fullname" . }}-xds + labels: + {{- include "springboot-helm-chart.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.discoveryService.port }} + targetPort: {{ .Values.discoveryService.targetPort }} + protocol: TCP + name: http + selector: + {{- include "springboot-helm-chart.selectorLabels" . | nindent 4 }} diff --git a/envoy/chart/templates/ingress.yaml b/envoy/chart/templates/ingress.yaml deleted file mode 100644 index 747a376..0000000 --- a/envoy/chart/templates/ingress.yaml +++ /dev/null @@ -1,61 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "springboot-helm-chart.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} - {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} - {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} - {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "springboot-helm-chart.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} - ingressClassName: {{ .Values.ingress.className }} - {{- end }} - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} - pathType: {{ .pathType }} - {{- end }} - backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} - service: - name: {{ $fullName }} - port: - number: {{ $svcPort }} - {{- else }} - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} -{{- end }} diff --git a/envoy/chart/values.yaml b/envoy/chart/values.yaml index 3ec5ff4..13bf34b 100644 --- a/envoy/chart/values.yaml +++ b/envoy/chart/values.yaml @@ -5,10 +5,10 @@ replicaCount: 1 image: - repository: ghcr.io/ayansen/ayansen/playground/openapi-exemplar + repository: ghcr.io/ayansen/ayansen/playground/envoy-control-plane pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: "v0.0.3" + tag: "" imagePullSecrets: [] nameOverride: "" @@ -44,21 +44,10 @@ service: port: 80 targetPort: 8080 -ingress: - enabled: false - className: "" - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - hosts: - - host: chart-example.local - paths: - - path: / - pathType: ImplementationSpecific - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local +discoveryService: + type: ClusterIP + port: 80 + targetPort: 8000 resources: {} # We usually recommend not to specify default resources and to leave this as a conscious diff --git a/envoy/configs/openapi-exemplar-proxy.yaml b/envoy/configs/test-proxy.yaml similarity index 100% rename from envoy/configs/openapi-exemplar-proxy.yaml rename to envoy/configs/test-proxy.yaml diff --git a/openapi/chart/Chart.yaml b/openapi/chart/Chart.yaml index 4d803ff..8c81582 100644 --- a/openapi/chart/Chart.yaml +++ b/openapi/chart/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.0 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "main" +appVersion: "v.0.0.4" diff --git a/openapi/chart/templates/deployment.yaml b/openapi/chart/templates/deployment.yaml index 3f9b3e6..c6ef014 100644 --- a/openapi/chart/templates/deployment.yaml +++ b/openapi/chart/templates/deployment.yaml @@ -44,13 +44,13 @@ spec: httpGet: path: /actuator/health/ port: {{ .Values.service.targetPort }} - timeoutSeconds: 5 + timeoutSeconds: 30 readinessProbe: failureThreshold: 10 httpGet: path: /actuator/health/ port: {{ .Values.service.targetPort }} - timeoutSeconds: 5 + timeoutSeconds: 30 resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.volumeMounts }} diff --git a/openapi/chart/templates/ingress.yaml b/openapi/chart/templates/ingress.yaml deleted file mode 100644 index 747a376..0000000 --- a/openapi/chart/templates/ingress.yaml +++ /dev/null @@ -1,61 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "springboot-helm-chart.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} - {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} - {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} - {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "springboot-helm-chart.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} - ingressClassName: {{ .Values.ingress.className }} - {{- end }} - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} - pathType: {{ .pathType }} - {{- end }} - backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} - service: - name: {{ $fullName }} - port: - number: {{ $svcPort }} - {{- else }} - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} -{{- end }} diff --git a/openapi/chart/values.yaml b/openapi/chart/values.yaml index cfcd7d8..cf22550 100644 --- a/openapi/chart/values.yaml +++ b/openapi/chart/values.yaml @@ -44,22 +44,6 @@ service: port: 80 targetPort: 8080 -ingress: - enabled: false - className: "" - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - hosts: - - host: chart-example.local - paths: - - path: / - pathType: ImplementationSpecific - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - resources: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little @@ -75,7 +59,7 @@ resources: {} autoscaling: enabled: false minReplicas: 1 - maxReplicas: 100 + maxReplicas: 2 targetCPUUtilizationPercentage: 80 # targetMemoryUtilizationPercentage: 80