From 5b37c5ff53d43b547502661df85dcc1c3de0d59c Mon Sep 17 00:00:00 2001 From: Kyle Robbertze Date: Mon, 9 Sep 2019 11:56:10 +0200 Subject: [PATCH] Kubernetes Fixes (#413) * Fix mattermost port number * Bump version number * Fix DB_PORT_NUMBER env variable * List permissions required on data persistentvolume --- contrib/kubernetes/README.md | 4 ++-- contrib/kubernetes/mattermost.deployment.yaml | 4 ++-- contrib/kubernetes/mattermost.svc.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/kubernetes/README.md b/contrib/kubernetes/README.md index ca5a2f9..62f7c94 100644 --- a/contrib/kubernetes/README.md +++ b/contrib/kubernetes/README.md @@ -76,7 +76,7 @@ Type: NodePort IP: 10.0.0.194 Port: http 80/TCP NodePort: http 32283/TCP -Endpoints: 172.17.0.4:80 +Endpoints: 172.17.0.4:8000 Session Affinity: None No events. ``` @@ -90,7 +90,7 @@ curl -L http://192.168.99.100:32283 ### Optional steps - * If you want your data to be persistent you will need to make persistent volumes for Mattermost and Postgres. + * If you want your data to be persistent you will need to make persistent volumes for Mattermost and Postgres. This requires adding a [securityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#discussion) to the deployment to set `runAsUser: 2000`, `runAsGroup: 2000` and `fsGroup: 2000`. * If you want to change advanced settings for the mattermost container you can make a [configMap](http://blog.kubernetes.io/2016/04/configuration-management-with-containers.html) for the /mattermost/config/config.json file * If you want the application exposed on port 80 you can either specify the port in the service manifest or use an [ingress controller](http://kubernetes.io/docs/user-guide/ingress/#ingress-controllers) and an ingress map for the mattermost service. A sample ingress map would be ``` diff --git a/contrib/kubernetes/mattermost.deployment.yaml b/contrib/kubernetes/mattermost.deployment.yaml index 16ab2d7..8c14390 100644 --- a/contrib/kubernetes/mattermost.deployment.yaml +++ b/contrib/kubernetes/mattermost.deployment.yaml @@ -17,14 +17,14 @@ spec: spec: containers: - name: mattermost-app - image: "mattermost/mattermost-prod-app:5.13.0" + image: "mattermost/mattermost-prod-app:5.14.1" env: - name: DB_HOST valueFrom: secretKeyRef: name: mattermost.env key: db-host - - name: DB_PORT + - name: DB_PORT_NUMBER valueFrom: secretKeyRef: name: mattermost.env diff --git a/contrib/kubernetes/mattermost.svc.yaml b/contrib/kubernetes/mattermost.svc.yaml index b5e3fdc..ef47b75 100644 --- a/contrib/kubernetes/mattermost.svc.yaml +++ b/contrib/kubernetes/mattermost.svc.yaml @@ -7,7 +7,7 @@ spec: type: NodePort ports: - port: 80 - targetPort: 80 + targetPort: 8000 protocol: TCP name: http selector: