Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9341879
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Subscribers
None
View Options
diff --git a/swh/templates/listers/deployment.yaml b/swh/templates/listers/deployment.yaml
index 5524580..37dd276 100644
--- a/swh/templates/listers/deployment.yaml
+++ b/swh/templates/listers/deployment.yaml
@@ -1,118 +1,118 @@
{{ if .Values.listers.enabled -}}
{{- $configurationChecksum := include (print $.Template.BasePath "/listers/configmap.yaml") . -}}
{{- range $lister_type, $deployment_config := .Values.listers.deployments -}}
{{- $lister_name := ( print "lister-" $lister_type ) -}}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ $lister_name }}
namespace: {{ $.Values.namespace }}
labels:
app: {{ $lister_name }}
spec:
selector:
matchLabels:
app: {{ $lister_name }}
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
template:
metadata:
labels:
app: {{ $lister_name }}
annotations:
# Force a rollout upgrade if the configuration changes
checksum/config: {{ $configurationChecksum | sha256sum }}
spec:
{{- if $.Values.listers.affinity }}
affinity:
{{ toYaml $.Values.listers.affinity | nindent 8 }}
{{- end }}
initContainers:
- name: prepare-configuration
image: debian:bullseye
imagePullPolicy: Always
envFrom:
- secretRef:
# define the ${credentials} values for configuration "credentials: " key
name: lister-credentials-secrets
- secretRef:
# define the ${host) values for configuration "celery > task_broker: " key
name: amqp-access-credentials
command:
- /bin/bash
args:
- -c
- eval echo "\"$(</etc/swh/configuration-template/config.yml.template)\"" > /etc/swh/config.yml
volumeMounts:
- name: configuration
mountPath: /etc/swh
- name: configuration-template
mountPath: /etc/swh/configuration-template
containers:
- name: listers
resources:
requests:
memory: {{ get $deployment_config "requestedMemory" | default "512Mi" }}
cpu: {{ get $deployment_config "requestedCpu" | default "500m" }}
limits:
memory: "4000Mi"
cpu: "1200m"
image: {{ $.Values.swh_listers_image }}:{{ $.Values.swh_listers_image_version }}
imagePullPolicy: Always
command:
- /bin/bash
args:
- -c
- /opt/swh/entrypoint.sh
lifecycle:
preStop:
exec:
command: ["kill", "1"]
env:
- name: STATSD_HOST
value: {{ $.Values.statsdExternalHost | default "prometheus-statsd-exporter" }}
- name: STATSD_PORT
value: {{ $.Values.statsdPort | default "9125" | quote }}
- name: CONCURRENCY
value: {{ get $deployment_config "concurrency" | default 1 | quote }}
- name: MAX_TASKS_PER_CHILD
value: {{ get $deployment_config "maxTasksPerChild" | default 1 | quote }}
- name: LOGLEVEL
- value: "INFO"
+ value: {{ get $deployment_config "logLevel" | default "INFO" }}
- name: SWH_CONFIG_FILENAME
value: /etc/swh/config.yml
- name: SWH_SENTRY_ENVIRONMENT
value: {{ $.Values.sentry.environment }}
- name: SWH_MAIN_PACKAGE
value: {{ $.Values.listers.sentrySwhPackage }}
- name: SWH_SENTRY_DSN
valueFrom:
secretKeyRef:
name: lister-sentry-secrets
key: sentry-dsn
# 'name' secret must exist & include key "host"
optional: false
- name: RABBITMQ_HOST
valueFrom:
secretKeyRef:
name: amqp-access-credentials
key: host
# 'name' secret must exist & include key "host"
optional: false
volumeMounts:
- name: configuration
mountPath: /etc/swh
volumes:
- name: configuration
emptyDir: {}
- name: configuration-template
configMap:
name: {{ $lister_name }}-template
items:
- key: "config.yml.template"
path: "config.yml.template"
{{ end }}
{{- end -}}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Jul 4, 12:20 PM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3270913
Attached To
R260 Helm charts for swh packages
Event Timeline
Log In to Comment