diff --git a/k8s/mattermost.configmap.yaml b/k8s/mattermost.configmap.yaml new file mode 100644 index 0000000..ad30deb --- /dev/null +++ b/k8s/mattermost.configmap.yaml @@ -0,0 +1,102 @@ +kind: ConfigMap +apiVersion: v1 +metadata: + name: mattermost.config + namespace: default +data: + config.json: |- + { + "ServiceSettings": { + "ListenAddress": ":80", + "MaximumLoginAttempts": 10, + "SegmentDeveloperKey": "", + "GoogleDeveloperKey": "", + "EnableOAuthServiceProvider": false, + "EnableIncomingWebhooks": false, + "EnableOutgoingWebhooks": false, + "EnablePostUsernameOverride": false, + "EnablePostIconOverride": false, + "EnableTesting": false, + "EnableSecurityFixAlert": true + }, + "TeamSettings": { + "SiteName": "Mattermost", + "MaxUsersPerTeam": 50, + "EnableTeamCreation": true, + "EnableUserCreation": true, + "RestrictCreationToDomains": "", + "RestrictTeamNames": true, + "EnableTeamListing": false + }, + "SqlSettings": { + "DriverName": "postgres", + "DataSource": "postgres://mmuser:mmuser_password@mattermost-db:5432/mattermost?sslmode=disable&connect_timeout=10", + "DataSourceReplicas": [], + "MaxIdleConns": 10, + "MaxOpenConns": 10, + "Trace": false, + "AtRestEncryptKey": "7rAh6iwQCkV4cA1Gsg3fgGOXJAQ43QVg" + }, + "LogSettings": { + "EnableConsole": false, + "ConsoleLevel": "INFO", + "EnableFile": true, + "FileLevel": "INFO", + "FileFormat": "", + "FileLocation": "" + }, + "FileSettings": { + "DriverName": "local", + "Directory": "/mattermost/data/", + "EnablePublicLink": true, + "PublicLinkSalt": "A705AklYF8MFDOfcwh3I488G8vtLlVip", + "ThumbnailWidth": 120, + "ThumbnailHeight": 100, + "PreviewWidth": 1024, + "PreviewHeight": 0, + "ProfileWidth": 128, + "ProfileHeight": 128, + "InitialFont": "luximbi.ttf", + "AmazonS3AccessKeyId": "", + "AmazonS3SecretAccessKey": "", + "AmazonS3Bucket": "", + "AmazonS3Region": "" + }, + "EmailSettings": { + "EnableSignUpWithEmail": true, + "SendEmailNotifications": false, + "RequireEmailVerification": false, + "FeedbackName": "", + "FeedbackEmail": "", + "SMTPUsername": "", + "SMTPPassword": "", + "SMTPServer": "", + "SMTPPort": "", + "ConnectionSecurity": "", + "InviteSalt": "bjlSR4QqkXFBr7TP4oDzlfZmcNuH9YoS", + "PasswordResetSalt": "vZ4DcKyVVRlKHHJpexcuXzojkE5PZ5eL", + "ApplePushServer": "", + "ApplePushCertPublic": "", + "ApplePushCertPrivate": "" + }, + "RateLimitSettings": { + "EnableRateLimiter": true, + "PerSec": 10, + "MemoryStoreSize": 10000, + "VaryByRemoteAddr": true, + "VaryByHeader": "" + }, + "PrivacySettings": { + "ShowEmailAddress": true, + "ShowFullName": true + }, + "GitLabSettings": { + "Enable": false, + "Secret": "", + "Id": "", + "Scope": "", + "AuthEndpoint": "", + "TokenEndpoint": "", + "UserApiEndpoint": "" + } + } diff --git a/k8s/mattermost.ing.yaml b/k8s/mattermost.ing.yaml new file mode 100644 index 0000000..ca4ebaa --- /dev/null +++ b/k8s/mattermost.ing.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: mattermost +spec: + rules: + - host: mattermost + http: + paths: + - backend: + serviceName: mattermost + servicePort: 80 diff --git a/k8s/mattermost.rc.yml b/k8s/mattermost.rc.yml new file mode 100644 index 0000000..40c61d3 --- /dev/null +++ b/k8s/mattermost.rc.yml @@ -0,0 +1,44 @@ +apiVersion: v1 +kind: ReplicationController +metadata: + name: mattermost-app + labels: + app: mattermost + tier: app + namespace: default +spec: + replicas: 1 + selector: + app: mattermost + tier: app + template: + metadata: + name: mattermost-app + labels: + app: mattermost + tier: app + spec: + containers: + - name: mattermost-app + image: "mattermost/mattermost-prod-app" + env: + - name: DB_HOST + value: "mattermost-db" + volumeMounts: + - name: appconfig + mountPath: /mattermost/config + - name: appdata + mountPath: /mattermost/data + - name: etclocaltime + mountPath: /etc/localtime + readOnly: true + volumes: + - name: appconfig + configMap: + name: mattermost.config + - name: appdata + persistentVolumeClaim: + claimName: mattermost-app + - name: etclocaltime + hostPath: + path: /etc/localtime diff --git a/k8s/mattermost.svc.yml b/k8s/mattermost.svc.yml new file mode 100644 index 0000000..b5e3fdc --- /dev/null +++ b/k8s/mattermost.svc.yml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: mattermost + namespace: default +spec: + type: NodePort + ports: + - port: 80 + targetPort: 80 + protocol: TCP + name: http + selector: + app: mattermost + tier: app