Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions drydock/templates/kustomized/tutor13/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ DRYDOCK_LMS_WORKER_LIMIT_CPU: 1
DRYDOCK_LMS_WORKER_LIMIT_MEMORY: "2Gi"
DRYDOCK_LMS_WORKER_REQUEST_CPU: "600m"
DRYDOCK_LMS_WORKER_REQUEST_MEMORY: "1Gi"
DRYDOCK_NEWRELIC: False
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,13 @@ resources:
{% if DRYDOCK_HPA|default(false) and DRYDOCK_ENABLE_OVERRIDES|default(false) -%}
- hpa.yml
{% endif -%}

{% if DRYDOCK_NEWRELIC -%}
configMapGenerator:
- name: newrelic-cm
files:
- newrelic.ini
options:
labels:
app.kubernetes.io/name: openedx
{% endif -%}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ DRYDOCK_NEWRELIC_CONFIG }}
33 changes: 33 additions & 0 deletions drydock/templates/kustomized/tutor13/extensions/overrides.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,37 @@ spec:
memory: "{{ DRYDOCK_CMS_WORKER_REQUEST_MEMORY }}"
---
{% endif -%}
{%- if DRYDOCK_NEWRELIC -%}
apiVersion: apps/v1
kind: Deployment
metadata:
name: lms
spec:
template:
spec:
containers:
- name: lms
args:
- |
newrelic-admin run-program uwsgi \
--static-map /static=/openedx/staticfiles/ \
--static-map /media=/openedx/media/ \
--http 0.0.0.0:8000 --thunder-lock \
--single-interpreter --enable-threads \
--processes=${UWSGI_WORKERS:-2} \
--buffer-size=8192 \
--wsgi-file $SERVICE_VARIANT/wsgi.py
command: ["/bin/bash", "-c"]
env:
- name: NEW_RELIC_CONFIG_FILE
value: /openedx/newrelic/newrelic.ini
volumeMounts:
- mountPath: /openedx/newrelic/
name: newrelic-ini
volumes:
- configMap:
name: newrelic-cm
name: newrelic-ini
---
{% endif -%}
{{ patch("drydock-overrides") }}
4 changes: 3 additions & 1 deletion drydock/templates/kustomized/tutor13/kustomization.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: {{ K8S_NAMESPACE }}

resources:
- base
- extensions
{{ patch("drydock-kustomization-resources") }}

{%- if DRYDOCK_ENABLE_OVERRIDES %}
patchesStrategicMerge:
{%- if DRYDOCK_ENABLE_RESOURCE_MANAGEMENT or patch("drydock-overrides") %}
{%- if DRYDOCK_ENABLE_RESOURCE_MANAGEMENT or patch("drydock-overrides") or DRYDOCK_NEWRELIC %}
- extensions/overrides.yml
{%- endif %}
{{ patch("drydock-kustomization-patches") }}
Expand Down