6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-12-12 14:17:46 +00:00

Enable forum only when necessary on k8s

This commit is contained in:
Régis Behmo 2019-04-22 12:07:34 +02:00
parent d1f386c149
commit 56a48e8773
3 changed files with 5 additions and 23 deletions

View File

@ -44,7 +44,7 @@ spec:
- name: data - name: data
persistentVolumeClaim: persistentVolumeClaim:
claimName: cms-data claimName: cms-data
{% if ACTIVATE_FORUM %}
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@ -71,7 +71,7 @@ spec:
value: "http://{{ ELASTICSEARCH_HOST }}:{{ ELASTICSEARCH_PORT }}" value: "http://{{ ELASTICSEARCH_HOST }}:{{ ELASTICSEARCH_PORT }}"
- name: MONGOHQ_URL - name: MONGOHQ_URL
value: "mongodb://{% if MONGODB_USERNAME and MONGODB_PASSWORD %}{{ MONGODB_USERNAME}}:{{ MONGODB_PASSWORD }}@{% endif %}{{ MONGODB_HOST }}:{{ MONGODB_PORT }}/cs_comments_service" value: "mongodb://{% if MONGODB_USERNAME and MONGODB_PASSWORD %}{{ MONGODB_USERNAME}}:{{ MONGODB_PASSWORD }}@{% endif %}{{ MONGODB_HOST }}:{{ MONGODB_PORT }}/cs_comments_service"
{% endif %}
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@ -115,7 +115,6 @@ spec:
- name: data - name: data
persistentVolumeClaim: persistentVolumeClaim:
claimName: lms-data claimName: lms-data
{% if ACTIVATE_ELASTICSEARCH %} {% if ACTIVATE_ELASTICSEARCH %}
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
@ -152,7 +151,6 @@ spec:
persistentVolumeClaim: persistentVolumeClaim:
claimName: elasticsearch claimName: elasticsearch
{% endif %} {% endif %}
{% if ACTIVATE_MEMCACHED %} {% if ACTIVATE_MEMCACHED %}
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
@ -175,7 +173,6 @@ spec:
ports: ports:
- containerPort: 11211 - containerPort: 11211
{% endif %} {% endif %}
{% if ACTIVATE_MONGODB %} {% if ACTIVATE_MONGODB %}
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
@ -205,7 +202,6 @@ spec:
- name: data - name: data
emptyDir: {} emptyDir: {}
{% endif %} {% endif %}
{% if ACTIVATE_MYSQL %} {% if ACTIVATE_MYSQL %}
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
@ -241,7 +237,6 @@ spec:
persistentVolumeClaim: persistentVolumeClaim:
claimName: mysql claimName: mysql
{% endif %} {% endif %}
{% if ACTIVATE_SMTP %} {% if ACTIVATE_SMTP %}
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
@ -264,7 +259,6 @@ spec:
ports: ports:
- containerPort: 25 - containerPort: 25
{% endif %} {% endif %}
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
@ -320,7 +314,6 @@ spec:
- name: data - name: data
persistentVolumeClaim: persistentVolumeClaim:
claimName: lms-data claimName: lms-data
{% if ACTIVATE_RABBITMQ %} {% if ACTIVATE_RABBITMQ %}
--- ---
apiVersion: apps/v1 apiVersion: apps/v1

View File

@ -10,7 +10,7 @@ spec:
protocol: TCP protocol: TCP
selector: selector:
app: cms app: cms
{% if ACTIVATE_FORUM %}
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
@ -23,7 +23,7 @@ spec:
protocol: TCP protocol: TCP
selector: selector:
app: forum app: forum
{% endif %}
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
@ -36,7 +36,6 @@ spec:
protocol: TCP protocol: TCP
selector: selector:
app: lms app: lms
{% if ACTIVATE_ELASTICSEARCH %} {% if ACTIVATE_ELASTICSEARCH %}
--- ---
apiVersion: v1 apiVersion: v1
@ -51,7 +50,6 @@ spec:
selector: selector:
app: elasticsearch app: elasticsearch
{% endif %} {% endif %}
{% if ACTIVATE_MEMCACHED %} {% if ACTIVATE_MEMCACHED %}
--- ---
apiVersion: v1 apiVersion: v1
@ -66,7 +64,6 @@ spec:
selector: selector:
app: memcached app: memcached
{% endif %} {% endif %}
{% if ACTIVATE_MONGODB %} {% if ACTIVATE_MONGODB %}
--- ---
apiVersion: v1 apiVersion: v1
@ -81,7 +78,6 @@ spec:
selector: selector:
app: mongodb app: mongodb
{% endif %} {% endif %}
{% if ACTIVATE_MYSQL %} {% if ACTIVATE_MYSQL %}
--- ---
apiVersion: v1 apiVersion: v1
@ -96,7 +92,6 @@ spec:
selector: selector:
app: mysql app: mysql
{% endif %} {% endif %}
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
@ -115,7 +110,6 @@ spec:
targetPort: https-port targetPort: https-port
selector: selector:
app: nginx app: nginx
{% if ACTIVATE_RABBITMQ %} {% if ACTIVATE_RABBITMQ %}
--- ---
apiVersion: v1 apiVersion: v1
@ -130,7 +124,6 @@ spec:
selector: selector:
app: rabbitmq app: rabbitmq
{% endif %} {% endif %}
{% if ACTIVATE_SMTP %} {% if ACTIVATE_SMTP %}
--- ---
apiVersion: v1 apiVersion: v1

View File

@ -21,7 +21,6 @@ spec:
resources: resources:
requests: requests:
storage: 2Gi storage: 2Gi
{% if ACTIVATE_ELASTICSEARCH %} {% if ACTIVATE_ELASTICSEARCH %}
--- ---
apiVersion: v1 apiVersion: v1
@ -35,7 +34,6 @@ spec:
requests: requests:
storage: 2Gi storage: 2Gi
{% endif %} {% endif %}
{% if ACTIVATE_MYSQL %} {% if ACTIVATE_MYSQL %}
--- ---
apiVersion: v1 apiVersion: v1
@ -49,7 +47,6 @@ spec:
requests: requests:
storage: 5Gi storage: 5Gi
{% endif %} {% endif %}
--- ---
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
@ -61,7 +58,6 @@ spec:
resources: resources:
requests: requests:
storage: 1Gi storage: 1Gi
{% if ACTIVATE_RABBITMQ %} {% if ACTIVATE_RABBITMQ %}
--- ---
apiVersion: v1 apiVersion: v1