mirror of
https://github.com/gomods/athens
synced 2026-02-03 11:00:32 +00:00
Helm chart: Fix ingress setup (#1086)
* Helm chart: Fix ingress setup The ingress part of the Helm chart contained references to not-existing templates and values. Additionally, the deployment used some no longer available health-check URLs which prevented it from being marked as ready. * Make readiness and liveness paths depend on the image.tag
This commit is contained in:
committed by
Aaron Schlesinger
parent
8caad2bc54
commit
dbea2773ba
@@ -2,3 +2,9 @@
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- define "livenessPath" -}}
|
||||
{{- if eq .Values.image.tag "v0.2.0" -}}/{{- else -}}/healthz{{- end -}}
|
||||
{{- end -}}
|
||||
{{- define "readinessPath" -}}
|
||||
{{- if eq .Values.image.tag "v0.2.0" -}}/{{- else -}}/readyz{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -23,11 +23,11 @@ spec:
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
path: "{{ template "livenessPath" . }}"
|
||||
port: 3000
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /readyz
|
||||
path: "{{ template "readinessPath" . }}"
|
||||
port: 3000
|
||||
env:
|
||||
- name: ATHENS_STORAGE_TYPE
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $serviceName := include "fullname" . -}}
|
||||
{{- $servicePort := .Values.service.externalPort -}}
|
||||
{{- $servicePort := .Values.service.servicePort -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ template "blahblah.fullname" . }}
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
app: {{ template "blahblah.name" . }}
|
||||
app: {{ template "fullname" . }}
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
|
||||
@@ -13,7 +13,7 @@ spec:
|
||||
app: {{ template "fullname" . }}
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
port: {{ .Values.service.servicePort }}
|
||||
targetPort: 3000
|
||||
protocol: TCP
|
||||
{{- if eq .Values.service.type "NodePort" }}
|
||||
|
||||
@@ -10,6 +10,8 @@ image:
|
||||
pullPolicy: Always
|
||||
|
||||
service:
|
||||
## Port as exposed by the service
|
||||
servicePort: 80
|
||||
## Type of service; valid values are "ClusterIP", "LoadBalancer", and
|
||||
## "NodePort". "ClusterIP" is sufficient in the case when the Proxy will be used
|
||||
## from within the cluster. To expose externally, consider a "NodePort" or "LoadBalancer" service.
|
||||
|
||||
Reference in New Issue
Block a user