ci: Memcached service (#7185)

* ci: service.yaml -> services/datatracker.yaml

* ci: memcached service

* ci: simplify memcached service name

* ci: Use correct service.type for memcached
This commit is contained in:
Jennifer Richards 2024-03-16 01:18:23 +10:00 committed by Nicolas Giard
parent dca77db250
commit cd225018f9
4 changed files with 41 additions and 22 deletions

View file

@ -75,8 +75,8 @@ DE_GFM_BINARY = "/usr/local/bin/de-gfm"
SITE_URL = os.environ.get("OIDC_SITE_URL")
# todo: parameterize memcached url in settings.py
MEMCACHED_HOST = os.environ.get("DTH_DATATRACKER_MEMCACHED_SERVICE_HOST", "127.0.0.1")
MEMCACHED_PORT = os.environ.get("DTH_DATATRACKER_MEMCACHED_SERVICE_PORT", "11211")
MEMCACHED_HOST = os.environ.get(f"MEMCACHED_SERVICE_HOST", "127.0.0.1")
MEMCACHED_PORT = os.environ.get("MEMCACHED_SERVICE_PORT", "11211")
from ietf import __version__
CACHES = {
"default": {

View file

@ -41,8 +41,8 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: 8000
- name: memcached
containerPort: 11211
protocol: TCP
livenessProbe:
{{- toYaml $podValues.livenessProbe | nindent 12 }}

View file

@ -1,19 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: {{include "datatracker.fullname" .}}
labels: {{- include "datatracker.labels" . | nindent 4 }}
{{- with .Values.datatracker.service.annotations }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
type: {{.Values.datatracker.service.type}}
ports:
- port: {{ default "80" .Values.datatracker.service.port}}
targetPort: http
protocol: TCP
name: http
apiVersion: v1
kind: Service
metadata:
name: {{include "datatracker.fullname" .}}
labels: {{- include "datatracker.labels" . | nindent 4 }}
{{- with .Values.datatracker.service.annotations }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
type: {{.Values.datatracker.service.type}}
ports:
- port: {{ default "80" .Values.datatracker.service.port}}
targetPort: http
protocol: TCP
name: http
selector: {{- include "datatracker.selectorLabels" . | nindent 4}}

View file

@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: memcached
labels: {{- include "datatracker.labels" . | nindent 4 }}
{{- with .Values.memcached.service.annotations }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
type: {{.Values.memcached.service.type}}
ports:
- port: {{ default "11211" .Values.memcached.service.port}}
targetPort: memcached
protocol: TCP
name: memcached
selector: {{- include "datatracker.selectorLabels" . | nindent 4}}