Skip to content
Snippets Groups Projects
Commit 01138a0b authored by Thomas  MENARD's avatar Thomas MENARD
Browse files

Update tutor/templates/k8s/services.yml, tutor/templates/k8s/deployments.yml files

parent d16f9bd4
No related branches found
No related tags found
No related merge requests found
Pipeline #31222 passed
...@@ -238,6 +238,11 @@ spec: ...@@ -238,6 +238,11 @@ spec:
volumeMounts: volumeMounts:
- mountPath: /usr/share/elasticsearch/data - mountPath: /usr/share/elasticsearch/data
name: data name: data
securityContext:
runAsNonRoot: true
runAsUser: 105
runAsGroup: 108
fsGroup: 108
volumes: volumes:
- name: data - name: data
persistentVolumeClaim: persistentVolumeClaim:
...@@ -266,6 +271,11 @@ spec: ...@@ -266,6 +271,11 @@ spec:
image: {{ DOCKER_REGISTRY }}{{ DOCKER_IMAGE_MEMCACHED }} image: {{ DOCKER_REGISTRY }}{{ DOCKER_IMAGE_MEMCACHED }}
ports: ports:
- containerPort: 11211 - containerPort: 11211
securityContext:
runAsNonRoot: true
runAsUser: 999
runAsGroup: 999
fsGroup: 999
{% endif %} {% endif %}
{% if ACTIVATE_MONGODB %} {% if ACTIVATE_MONGODB %}
--- ---
...@@ -296,7 +306,11 @@ spec: ...@@ -296,7 +306,11 @@ spec:
volumeMounts: volumeMounts:
- mountPath: /data/db - mountPath: /data/db
name: data name: data
securityContext:
runAsNonRoot: true
runAsUser: 999
runAsGroup: 999
fsGroup: 999
volumes: volumes:
- name: data - name: data
persistentVolumeClaim: persistentVolumeClaim:
...@@ -344,6 +358,11 @@ spec: ...@@ -344,6 +358,11 @@ spec:
name: data name: data
- mountPath: /etc/mysql - mountPath: /etc/mysql
name: mysql-cnf name: mysql-cnf
securityContext:
runAsNonRoot: true
runAsUser: 999
runAsGroup: 999
fsGroup: 999
volumes: volumes:
- name: data - name: data
persistentVolumeClaim: persistentVolumeClaim:
...@@ -465,6 +484,11 @@ spec: ...@@ -465,6 +484,11 @@ spec:
volumeMounts: volumeMounts:
- mountPath: /var/lib/rabbitmq - mountPath: /var/lib/rabbitmq
name: data name: data
securityContext:
runAsNonRoot: true
runAsUser: 100
runAsGroup: 101
fsGroup: 101
volumes: volumes:
- name: data - name: data
persistentVolumeClaim: persistentVolumeClaim:
......
...@@ -4,7 +4,7 @@ kind: Service ...@@ -4,7 +4,7 @@ kind: Service
metadata: metadata:
name: cms name: cms
spec: spec:
type: NodePort type: ClusterIP
ports: ports:
- port: 8000 - port: 8000
protocol: TCP protocol: TCP
...@@ -17,7 +17,7 @@ kind: Service ...@@ -17,7 +17,7 @@ kind: Service
metadata: metadata:
name: forum name: forum
spec: spec:
type: NodePort type: ClusterIP
ports: ports:
- port: 4567 - port: 4567
protocol: TCP protocol: TCP
...@@ -30,7 +30,7 @@ kind: Service ...@@ -30,7 +30,7 @@ kind: Service
metadata: metadata:
name: lms name: lms
spec: spec:
type: NodePort type: ClusterIP
ports: ports:
- port: 8000 - port: 8000
protocol: TCP protocol: TCP
...@@ -43,7 +43,7 @@ kind: Service ...@@ -43,7 +43,7 @@ kind: Service
metadata: metadata:
name: elasticsearch name: elasticsearch
spec: spec:
type: NodePort type: ClusterIP
ports: ports:
- port: 9200 - port: 9200
protocol: TCP protocol: TCP
...@@ -57,7 +57,7 @@ kind: Service ...@@ -57,7 +57,7 @@ kind: Service
metadata: metadata:
name: memcached name: memcached
spec: spec:
type: NodePort type: ClusterIP
ports: ports:
- port: 11211 - port: 11211
protocol: TCP protocol: TCP
...@@ -71,7 +71,7 @@ kind: Service ...@@ -71,7 +71,7 @@ kind: Service
metadata: metadata:
name: mongodb name: mongodb
spec: spec:
type: NodePort type: ClusterIP
ports: ports:
- port: 27017 - port: 27017
protocol: TCP protocol: TCP
...@@ -85,7 +85,7 @@ kind: Service ...@@ -85,7 +85,7 @@ kind: Service
metadata: metadata:
name: mysql name: mysql
spec: spec:
type: NodePort type: ClusterIP
ports: ports:
- port: 3306 - port: 3306
protocol: TCP protocol: TCP
...@@ -98,7 +98,7 @@ kind: Service ...@@ -98,7 +98,7 @@ kind: Service
metadata: metadata:
name: nginx name: nginx
spec: spec:
type: NodePort type: ClusterIP
ports: ports:
- port: 80 - port: 80
name: http name: http
...@@ -113,7 +113,7 @@ kind: Service ...@@ -113,7 +113,7 @@ kind: Service
metadata: metadata:
name: rabbitmq name: rabbitmq
spec: spec:
type: NodePort type: ClusterIP
ports: ports:
- port: 5672 - port: 5672
protocol: TCP protocol: TCP
...@@ -127,11 +127,11 @@ kind: Service ...@@ -127,11 +127,11 @@ kind: Service
metadata: metadata:
name: smtp name: smtp
spec: spec:
type: NodePort type: ClusterIP
ports: ports:
- port: 25 - port: 25
protocol: TCP protocol: TCP
selector: selector:
app.kubernetes.io/name: smtp app.kubernetes.io/name: smtp
{% endif %} {% endif %}
{{ patch("k8s-services") }} {{ patch("k8s-services") }}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment