ci: use values for PVClaims, STATIC_URL (#7317)
* ci: Expose PV parameters as values * ci: complain about missing value in dev mode * ci: Allow override of STATIC_URL
This commit is contained in:
parent
206a4bb749
commit
e99286f400
|
@ -140,9 +140,9 @@ if _MEETECHO_CLIENT_ID is not None and _MEETECHO_CLIENT_SECRET is not None:
|
||||||
"client_secret": _MEETECHO_CLIENT_SECRET,
|
"client_secret": _MEETECHO_CLIENT_SECRET,
|
||||||
"request_timeout": 3.01, # python-requests doc recommend slightly > a multiple of 3 seconds
|
"request_timeout": 3.01, # python-requests doc recommend slightly > a multiple of 3 seconds
|
||||||
}
|
}
|
||||||
elif SERVER_MODE == "production":
|
else:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
"DATATRACKER_MEETECHO_CLIENT_ID and DATATRACKER_MEETECHO_CLIENT_SECRET must be set in production"
|
"DATATRACKER_MEETECHO_CLIENT_ID and DATATRACKER_MEETECHO_CLIENT_SECRET must be set"
|
||||||
)
|
)
|
||||||
|
|
||||||
_APP_API_TOKENS_JSON = os.environ.get("DATATRACKER_APP_API_TOKENS_JSON", None)
|
_APP_API_TOKENS_JSON = os.environ.get("DATATRACKER_APP_API_TOKENS_JSON", None)
|
||||||
|
@ -190,6 +190,11 @@ DRAFT_VIRTUAL_PATH = "/a/postfix/draft-virtual"
|
||||||
GROUP_ALIASES_PATH = "/a/postfix/group-aliases"
|
GROUP_ALIASES_PATH = "/a/postfix/group-aliases"
|
||||||
GROUP_VIRTUAL_PATH = "/a/postfix/group-virtual"
|
GROUP_VIRTUAL_PATH = "/a/postfix/group-virtual"
|
||||||
|
|
||||||
|
# Repoint STATIC_URL - hack to let staging access statics without hosting them itself
|
||||||
|
_STATIC_URL = os.environ.get("DATATRACKER_STATIC_URL", None)
|
||||||
|
if _STATIC_URL is not None:
|
||||||
|
STATIC_URL = _STATIC_URL
|
||||||
|
|
||||||
# Set these to the same as "production" in settings.py, whether production mode or not
|
# Set these to the same as "production" in settings.py, whether production mode or not
|
||||||
MEDIA_ROOT = "/a/www/www6s/lib/dt/media/"
|
MEDIA_ROOT = "/a/www/www6s/lib/dt/media/"
|
||||||
MEDIA_URL = "https://www.ietf.org/lib/dt/media/"
|
MEDIA_URL = "https://www.ietf.org/lib/dt/media/"
|
||||||
|
|
|
@ -2,25 +2,36 @@ apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: "datatracker-shared-volume-claim"
|
name: "datatracker-shared-volume-claim"
|
||||||
# Note: This is the /a shared volume. The spec should be adjusted to ensure it always
|
|
||||||
# matches the correct EBS volume in production. For the moment, it just requests a
|
|
||||||
# large volume.
|
|
||||||
spec:
|
spec:
|
||||||
|
{{- with .Values.persistentVolumes.datatrackerSharedVolume }}
|
||||||
|
storageClassName: {{ .storageClassName | quote }}
|
||||||
|
{{- if .volumeName }}
|
||||||
|
volumeName: {{ .volumeName | quote }}
|
||||||
|
{{- end }}
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany # or ReadWriteOnce and force datatracker/celery/beat to a single node
|
{{- range .accessModes }}
|
||||||
|
- {{ . | quote }}
|
||||||
|
{{- end }}
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 600Gi # adjust to something satisfied by the /a PersistentVolume
|
storage: {{ .storage | quote }}
|
||||||
|
{{- end }}
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: "rabbitmq-data-claim"
|
name: "rabbitmq-data-claim"
|
||||||
spec:
|
spec:
|
||||||
# storageClassName: "local"
|
{{- with .Values.persistentVolumes.rabbitmqDataVolume }}
|
||||||
# volumeName: ""
|
storageClassName: {{ .storageClassName | quote }}
|
||||||
|
{{- if .volumeName }}
|
||||||
|
volumeName: {{ .volumeName | quote }}
|
||||||
|
{{- end }}
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
{{- range .accessModes }}
|
||||||
|
- {{ . | quote }}
|
||||||
|
{{- end }}
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 8Gi
|
storage: {{ .storage | quote }}
|
||||||
|
{{- end }}
|
||||||
|
|
|
@ -561,6 +561,26 @@ memcached:
|
||||||
|
|
||||||
affinity: {}
|
affinity: {}
|
||||||
|
|
||||||
|
# -------------------------------------------------------------
|
||||||
|
# PERSISTENT VOLUMES
|
||||||
|
# -------------------------------------------------------------
|
||||||
|
|
||||||
|
persistentVolumes:
|
||||||
|
datatrackerSharedVolume:
|
||||||
|
# Note: This is the /a shared volume
|
||||||
|
volumeName: "datatracker-shared-volume"
|
||||||
|
accessModes:
|
||||||
|
- "ReadWriteMany" # or ReadWriteOnce and force datatracker/celery/beat to a single node
|
||||||
|
storageClassName: "" # Empty string means do not use default storage class
|
||||||
|
storage: "600Gi" # actual PersistentVolume must be at least this big or the PVC will not bind
|
||||||
|
|
||||||
|
rabbitmqDataVolume:
|
||||||
|
volumeName: "rabbitmq-data-volume"
|
||||||
|
accessModes:
|
||||||
|
- "ReadWriteOnce"
|
||||||
|
storageClassName: "" # Empty string means do not use default storage class
|
||||||
|
storage: "8Gi" # actual PersistentVolume must be at least this big or the PVC will not bind
|
||||||
|
|
||||||
# -------------------------------------------------------------
|
# -------------------------------------------------------------
|
||||||
# COMMON
|
# COMMON
|
||||||
# -------------------------------------------------------------
|
# -------------------------------------------------------------
|
||||||
|
@ -592,7 +612,11 @@ env:
|
||||||
# DATATRACKER_DBPASS: "RkTkDPFnKpko" # secret
|
# DATATRACKER_DBPASS: "RkTkDPFnKpko" # secret
|
||||||
|
|
||||||
DATATRACKER_DJANGO_SECRET_KEY: "PDwXboUq!=hPjnrtG2=ge#N$Dwy+wn@uivrugwpic8mxyPfHk" # secret
|
DATATRACKER_DJANGO_SECRET_KEY: "PDwXboUq!=hPjnrtG2=ge#N$Dwy+wn@uivrugwpic8mxyPfHk" # secret
|
||||||
|
|
||||||
|
# Set this to point testing / staging at the production statics server until we
|
||||||
|
# sort that out
|
||||||
|
DATATRACKER_STATIC_URL: "https://static.ietf.org/dt/12.10.0/"
|
||||||
|
|
||||||
# DATATRACKER_EMAIL_DEBUG: "true"
|
# DATATRACKER_EMAIL_DEBUG: "true"
|
||||||
|
|
||||||
# Outgoing email details
|
# Outgoing email details
|
||||||
|
|
Loading…
Reference in a new issue