Changeset View
Changeset View
Standalone View
Standalone View
swh/templates/graphql/deployment.yaml
Show All 25 Lines | metadata: | ||||
checksum/config: {{ include (print $.Template.BasePath "/graphql/configmap.yaml") . | sha256sum }} | checksum/config: {{ include (print $.Template.BasePath "/graphql/configmap.yaml") . | sha256sum }} | ||||
spec: | spec: | ||||
containers: | containers: | ||||
- name: graphql | - name: graphql | ||||
image: {{ .Values.swh_graphql_image }}:{{ .Values.swh_graphql_image_version }} | image: {{ .Values.swh_graphql_image }}:{{ .Values.swh_graphql_image_version }} | ||||
imagePullPolicy: Always | imagePullPolicy: Always | ||||
ports: | ports: | ||||
- containerPort: 5013 | - containerPort: 5013 | ||||
name: rpc | |||||
startupProbe: | |||||
httpGet: | |||||
path: / | |||||
port: rpc | |||||
failureThreshold: 30 | |||||
periodSeconds: 5 | |||||
livenessProbe: | |||||
httpGet: | |||||
path: / | |||||
port: rpc | |||||
initialDelaySeconds: 10 | |||||
periodSeconds: 5 | |||||
env: | env: | ||||
- name: PORT | - name: PORT | ||||
value: "5013" | value: "5013" | ||||
- name: THREADS | - name: THREADS | ||||
value: {{ .Values.graphql.gunicorn.threads | quote }} | value: {{ .Values.graphql.gunicorn.threads | quote }} | ||||
- name: WORKERS | - name: WORKERS | ||||
value: {{ .Values.graphql.gunicorn.workers | quote }} | value: {{ .Values.graphql.gunicorn.workers | quote }} | ||||
- name: LOG_LEVEL | - name: LOG_LEVEL | ||||
value: {{ .Values.graphql.logLevel | quote }} | value: {{ .Values.graphql.logLevel | quote }} | ||||
- name: TIMEOUT | - name: TIMEOUT | ||||
value: {{ .Values.graphql.gunicorn.timeout | quote }} | value: {{ .Values.graphql.gunicorn.timeout | quote }} | ||||
{{ if .Values.graphql.sentry_enabled -}} | {{ if .Values.graphql.sentry_enabled -}} | ||||
- name: SWH_SENTRY_ENVIRONMENT | - name: SWH_SENTRY_ENVIRONMENT | ||||
value: {{ $.Values.sentry.environment }} | value: {{ $.Values.sentry.environment }} | ||||
- name: SWH_MAIN_PACKAGE | - name: SWH_MAIN_PACKAGE | ||||
value: swh.graphql | value: swh.graphql | ||||
- name: SWH_SENTRY_DSN | - name: SWH_SENTRY_DSN | ||||
valueFrom: | valueFrom: | ||||
secretKeyRef: | secretKeyRef: | ||||
name: graphql-sentry-secrets | name: graphql-sentry-secrets | ||||
key: sentry-dsn | key: sentry-dsn | ||||
# 'name' secret must exist & include key "host" | # 'name' secret should exist & include key "host" | ||||
optional: false | # if the setting doesn't exist, sentry pushes will be disabled | ||||
optional: true | |||||
{{ end }} | {{ end }} | ||||
volumeMounts: | volumeMounts: | ||||
- name: config | - name: config | ||||
mountPath: /etc/swh/config.yml | mountPath: /etc/swh/config.yml | ||||
subPath: config.yml | subPath: config.yml | ||||
readOnly: true | readOnly: true | ||||
volumes: | volumes: | ||||
- name: config | - name: config | ||||
configMap: | configMap: | ||||
name: graphql | name: graphql | ||||
defaultMode: 0444 | defaultMode: 0444 | ||||
{{ end }} | {{ end }} |