mirror of
https://github.com/rubenhensen/k8scd.git
synced 2026-09-17 02:12:55 +02:00
Add SOGo
This commit is contained in:
@@ -0,0 +1,22 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: sogo
|
||||||
|
namespace: argocd
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
repoURL: https://github.com/rubenhensen/k8scd.git
|
||||||
|
targetRevision: HEAD
|
||||||
|
path: sogo
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: sogo
|
||||||
|
syncPolicy:
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
automated:
|
||||||
|
selfHeal: true
|
||||||
|
prune: true
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: sogo-config
|
||||||
|
namespace: sogo
|
||||||
|
data:
|
||||||
|
sogo.conf: |
|
||||||
|
{
|
||||||
|
/* Mail Server Configuration */
|
||||||
|
SOGoIMAPServer = "stalwart.stalwart.svc.cluster.local:143";
|
||||||
|
SOGoSMTPServer = "stalwart.stalwart.svc.cluster.local:587";
|
||||||
|
SOGoMailDomain = "hensen.io";
|
||||||
|
SOGoForceIMAPLoginWithEmail = YES;
|
||||||
|
|
||||||
|
/* Database Configuration */
|
||||||
|
SOGoProfileURL = "postgresql://sogo:${POSTGRES_PASSWORD}@sogo-postgres-rw.sogo.svc.cluster.local:5432/sogo/sogo_user_profile";
|
||||||
|
OCSFolderInfoURL = "postgresql://sogo:${POSTGRES_PASSWORD}@sogo-postgres-rw.sogo.svc.cluster.local:5432/sogo/sogo_folder_info";
|
||||||
|
OCSSessionsFolderURL = "postgresql://sogo:${POSTGRES_PASSWORD}@sogo-postgres-rw.sogo.svc.cluster.local:5432/sogo/sogo_sessions_folder";
|
||||||
|
|
||||||
|
/* General Settings */
|
||||||
|
SOGoTimeZone = "Europe/Amsterdam";
|
||||||
|
SOGoLanguage = "English";
|
||||||
|
SOGoSuperUsername = "admin@hensen.io";
|
||||||
|
|
||||||
|
/* Modules */
|
||||||
|
SOGoModules = (
|
||||||
|
"Mail",
|
||||||
|
"Calendar",
|
||||||
|
"Contacts",
|
||||||
|
"Tasks"
|
||||||
|
);
|
||||||
|
|
||||||
|
/* Calendar Settings */
|
||||||
|
SOGoCalendarDefaultRoles = (
|
||||||
|
"PublicViewer",
|
||||||
|
"ConfidentialDAndTViewer"
|
||||||
|
);
|
||||||
|
SOGoFirstDayOfWeek = 1;
|
||||||
|
SOGoFirstWeekOfYear = "January1";
|
||||||
|
SOGoDayStartTime = 8;
|
||||||
|
SOGoDayEndTime = 18;
|
||||||
|
|
||||||
|
/* Authentication */
|
||||||
|
SOGoAuthenticationType = "IMAP";
|
||||||
|
|
||||||
|
/* WebUI Settings */
|
||||||
|
SOGoPageTitle = "SOGo @ hensen.io";
|
||||||
|
SOGoLoginModule = "Mail";
|
||||||
|
SOGoRefreshViewCheck = "every_5_minutes";
|
||||||
|
SOGoMailMessageCheck = "every_5_minutes";
|
||||||
|
|
||||||
|
/* Mail Preferences */
|
||||||
|
SOGoMailAuxiliaryUserAccountsEnabled = YES;
|
||||||
|
SOGoMailComposeMessageType = "html";
|
||||||
|
SOGoMailReplyPlacement = "below";
|
||||||
|
SOGoMailSignaturePlacement = "below";
|
||||||
|
|
||||||
|
/* Security */
|
||||||
|
SOGoPasswordChangeEnabled = NO;
|
||||||
|
SOGoXSRFValidationEnabled = YES;
|
||||||
|
|
||||||
|
/* Performance */
|
||||||
|
SOGoMemcachedHost = "";
|
||||||
|
WOWorkersCount = 3;
|
||||||
|
WOListenQueueSize = 5;
|
||||||
|
WONoDetach = YES;
|
||||||
|
WOLogFile = "-";
|
||||||
|
WOPidFile = "/var/run/sogo/sogo.pid";
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: sogo
|
||||||
|
namespace: sogo
|
||||||
|
labels:
|
||||||
|
app: sogo
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: sogo
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: sogo
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: sogo
|
||||||
|
image: sonroyaalmerol/docker-sogo:latest
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: http
|
||||||
|
env:
|
||||||
|
- name: POSTGRES_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: sogo-postgres-credentials
|
||||||
|
key: password
|
||||||
|
- name: TZ
|
||||||
|
value: "Europe/Amsterdam"
|
||||||
|
volumeMounts:
|
||||||
|
- name: config
|
||||||
|
mountPath: /etc/sogo/sogo.conf.d/
|
||||||
|
- name: data
|
||||||
|
mountPath: /srv/lib/sogo
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "512Mi"
|
||||||
|
cpu: "200m"
|
||||||
|
limits:
|
||||||
|
memory: "1Gi"
|
||||||
|
cpu: "1000m"
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /SOGo
|
||||||
|
port: 80
|
||||||
|
initialDelaySeconds: 60
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 5
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /SOGo
|
||||||
|
port: 80
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 5
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: sogo-config
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: sogo-data
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
apiVersion: external-secrets.io/v1beta1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: sogo-postgres-credentials
|
||||||
|
namespace: sogo
|
||||||
|
spec:
|
||||||
|
refreshInterval: 15m
|
||||||
|
secretStoreRef:
|
||||||
|
name: vault-backend
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
target:
|
||||||
|
name: sogo-postgres-credentials
|
||||||
|
creationPolicy: Owner
|
||||||
|
data:
|
||||||
|
- secretKey: password
|
||||||
|
remoteRef:
|
||||||
|
key: kv/sogo
|
||||||
|
property: postgres_pw
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: sogo
|
||||||
|
namespace: sogo
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: prod-cluster-issuer
|
||||||
|
nginx.ingress.kubernetes.io/backend-protocol: HTTP
|
||||||
|
nginx.ingress.kubernetes.io/proxy-body-size: "50m"
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- post.hensen.io
|
||||||
|
secretName: sogo-tls
|
||||||
|
rules:
|
||||||
|
- host: post.hensen.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: sogo
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: Cluster
|
||||||
|
metadata:
|
||||||
|
name: sogo-postgres
|
||||||
|
namespace: sogo
|
||||||
|
spec:
|
||||||
|
instances: 1
|
||||||
|
|
||||||
|
storage:
|
||||||
|
size: 10Gi
|
||||||
|
storageClass: longhorn
|
||||||
|
|
||||||
|
bootstrap:
|
||||||
|
initdb:
|
||||||
|
database: sogo
|
||||||
|
owner: sogo
|
||||||
|
secret:
|
||||||
|
name: sogo-postgres-credentials
|
||||||
|
postInitSQL:
|
||||||
|
- CREATE EXTENSION IF NOT EXISTS pg_trgm;
|
||||||
|
|
||||||
|
postgresql:
|
||||||
|
parameters:
|
||||||
|
max_connections: "100"
|
||||||
|
shared_buffers: "256MB"
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: sogo-data
|
||||||
|
namespace: sogo
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: longhorn
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 5Gi
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: sogo
|
||||||
|
namespace: sogo
|
||||||
|
labels:
|
||||||
|
app: sogo
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app: sogo
|
||||||
Reference in New Issue
Block a user