Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
Helm charts for swh packages
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Platform
Infrastructure
CI CD
Helm charts for swh packages
Merge requests
!45
swh: add web service
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
swh: add web service
4812_swh_web
into
production
Overview
3
Commits
2
Pipelines
0
Changes
13
2 unresolved threads
Hide all comments
Merged
Guillaume Samson
requested to merge
4812_swh_web
into
production
2 years ago
Overview
3
Commits
2
Pipelines
0
Changes
13
2 unresolved threads
Hide all comments
Expand
Related to
swh/infra/sysadm-environment#4812 (closed)
0
0
Merge request reports
Compare
production
version 5
d74b99f0
2 years ago
version 4
b6fa8fee
2 years ago
version 3
dc064012
2 years ago
version 2
50d7d0f9
2 years ago
version 1
15873600
2 years ago
production (base)
and
latest version
latest version
f61d28cd
2 commits,
2 years ago
version 5
d74b99f0
2 commits,
2 years ago
version 4
b6fa8fee
2 commits,
2 years ago
version 3
dc064012
2 commits,
2 years ago
version 2
50d7d0f9
2 commits,
2 years ago
version 1
15873600
2 commits,
2 years ago
13 files
+
480
−
5
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
13
Search (e.g. *.vue) (Ctrl+P)
swh/templates/web/deployment.yaml
0 → 100644
+
165
−
0
Options
{{
if .Values.web.enabled -
}}
---
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
namespace
:
{{
.Values.namespace
}}
name
:
web
labels
:
app
:
web
spec
:
revisionHistoryLimit
:
2
replicas
:
{{
.Values.web.replicas | default 1
}}
selector
:
matchLabels
:
app
:
web
strategy
:
type
:
RollingUpdate
rollingUpdate
:
maxSurge
:
1
template
:
metadata
:
labels
:
app
:
web
spec
:
{{
- if .Values.web.affinity
}}
affinity
:
{{
- toYaml .Values.web.affinity | nindent 8
}}
{{
- end
}}
initContainers
:
# - name: prepare-configuration
# image: debian:bullseye
# imagePullPolicy: Always
# command:
# - /bin/bash
# args:
# - -c
# - eval echo "\"$(</etc/softwareheritage/configuration-template/config.yml.template)\"" > /etc/softwareheritage/config.yml
# volumeMounts:
# - name: configuration
# mountPath: /etc/softwareheritage
# - name: configuration-template
# mountPath: /etc/softwareheritage/configuration-template
-
name
:
prepare-static
image
:
{{
.Values.swh_web_image
}}
:{{ .Values.swh_web_image_version }}
imagePullPolicy
:
Always
command
:
-
/bin/bash
args
:
-
-c
-
cp -r $PWD/.local/share/swh/web/static/ /usr/share/swh/web/static/
volumeMounts
:
-
name
:
static
mountPath
:
/usr/share/swh/web/static
containers
:
-
name
:
web
resources
:
requests
:
memory
:
{{
.Values.web.requestedMemory | default "512Mi"
}}
cpu
:
{{
.Values.web.requestedCpu | default "500m"
}}
image
:
{{
.Values.swh_web_image
}}
:{{ .Values.swh_web_image_version }}
imagePullPolicy
:
Always
ports
:
-
containerPort
:
5004
name
:
webapp
readinessProbe
:
httpGet
:
path
:
/
port
:
webapp
initialDelaySeconds
:
5
failureThreshold
:
30
periodSeconds
:
10
timeoutSeconds
:
30
livenessProbe
:
httpGet
:
path
:
/
port
:
webapp
initialDelaySeconds
:
3
periodSeconds
:
10
timeoutSeconds
:
30
command
:
-
/bin/bash
args
:
-
-c
-
/srv/swh/entrypoint.sh
env
:
{{
if .Values.web.gunicorn -
}}
-
name
:
THREADS
value
:
{{
.Values.web.gunicorn.threads | default 5 | quote
}}
-
name
:
WORKERS
value
:
{{
.Values.web.gunicorn.workers | default 2 | quote
}}
-
name
:
TIMEOUT
value
:
{{
.Values.web.gunicorn.timeout | default 60 | quote
}}
{{
end -
}}
-
name
:
STATSD_HOST
value
:
{{
.Values.statsdExternalHost | default "prometheus-statsd-exporter"
}}
-
name
:
STATSD_PORT
value
:
{{
.Values.statsdPort | default "9125" | quote
}}
-
name
:
LOG_LEVEL
value
:
{{
.Values.web.logLevel | quote
}}
{{
- if .Values.web.sentry.enabled
}}
-
name
:
SWH_SENTRY_ENVIRONMENT
value
:
{{
.Values.sentry.environment
}}
-
name
:
SWH_MAIN_PACKAGE
value
:
swh.web
-
name
:
SWH_SENTRY_DSN
valueFrom
:
secretKeyRef
:
name
:
{{
.Values.web.sentry.secretKeyRef
}}
key
:
{{
.Values.web.sentry.secretKeyName
}}
# 'name' secret should exist & include key
# if the setting doesn't exist, sentry pushes will be disabled
optional
:
true
-
name
:
SWH_SENTRY_DISABLE_LOGGING_EVENTS
value
:
"
true"
{{
- end
}}
volumeMounts
:
-
name
:
configuration
mountPath
:
/etc/softwareheritage
readOnly
:
true
-
name
:
nginx
resources
:
requests
:
memory
:
{{
.Values.web.requestedMemory | default "512Mi"
}}
cpu
:
{{
.Values.web.requestedCpu | default "500m"
}}
image
:
nginx:bullseye
imagePullPolicy
:
Always
ports
:
-
containerPort
:
80
name
:
webstatic
readinessProbe
:
httpGet
:
path
:
static/robots.txt
port
:
webstatic
initialDelaySeconds
:
5
failureThreshold
:
30
periodSeconds
:
10
livenessProbe
:
httpGet
:
path
:
static/robots.txt
port
:
webstatic
initialDelaySeconds
:
3
periodSeconds
:
10
# command:
# - /bin/bash
# args:
# - -c
# - /srv/swh/entrypoint.sh
volumeMounts
:
-
name
:
static
mountPath
:
/usr/share/nginx/html
volumes
:
-
name
:
configuration
secret
:
secretName
:
{{
.Values.web.configSecretRef
}}
#- name: configuration
# emptyDir: {}
#- name: configuration-template
# configMap:
# name: web-configuration-template
# items:
# - key: "config.yml.template"
# path: "config.yml.template"
-
name
:
static
emptyDir
:
{}
{{
end
}}
Loading