Primer commit
This commit is contained in:
42
deployments/espocrm.yaml
Normal file
42
deployments/espocrm.yaml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: espocrm
|
||||||
|
namespace: espocrm
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: espocrm
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: espocrm
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: espocrm
|
||||||
|
image: espocrm/espocrm
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
env:
|
||||||
|
- name: ESPOCRM_DATABASE_PLATFORM
|
||||||
|
value: Mysql
|
||||||
|
- name: ESPOCRM_DATABASE_HOST
|
||||||
|
value: mysql
|
||||||
|
- name: ESPOCRM_DATABASE_USER
|
||||||
|
value: espocrm
|
||||||
|
- name: ESPOCRM_DATABASE_PASSWORD
|
||||||
|
value: database_password
|
||||||
|
- name: ESPOCRM_ADMIN_USERNAME
|
||||||
|
value: admin
|
||||||
|
- name: ESPOCRM_ADMIN_PASSWORD
|
||||||
|
value: password
|
||||||
|
- name: ESPOCRM_SITE_URL
|
||||||
|
value: "https://espocrm.avgx.org"
|
||||||
|
volumeMounts:
|
||||||
|
- name: espocrm-data
|
||||||
|
mountPath: /var/www/html
|
||||||
|
volumes:
|
||||||
|
- name: espocrm-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: espocrm-pvc
|
34
deployments/mysql.yaml
Normal file
34
deployments/mysql.yaml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: mysql
|
||||||
|
namespace: espocrm
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: mysql
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: mysql
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: mysql
|
||||||
|
image: mysql:8
|
||||||
|
env:
|
||||||
|
- name: MYSQL_ROOT_PASSWORD
|
||||||
|
value: root_password
|
||||||
|
- name: MYSQL_DATABASE
|
||||||
|
value: espocrm
|
||||||
|
- name: MYSQL_USER
|
||||||
|
value: espocrm
|
||||||
|
- name: MYSQL_PASSWORD
|
||||||
|
value: database_password
|
||||||
|
volumeMounts:
|
||||||
|
- name: mysql-data
|
||||||
|
mountPath: /var/lib/mysql
|
||||||
|
volumes:
|
||||||
|
- name: mysql-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: mysql-pvc
|
27
ingress/ingress.yaml
Normal file
27
ingress/ingress.yaml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: espocrm-ingress
|
||||||
|
namespace: espocrm
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||||
|
# nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||||
|
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
|
||||||
|
nginx.ingress.kubernetes.io/enable-websockets: "true"
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- espocrm.avgx.org
|
||||||
|
secretName: espocrm-tls
|
||||||
|
rules:
|
||||||
|
- host: espocrm.avgx.org
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: espocrm
|
||||||
|
port:
|
||||||
|
number: 80
|
14
kustomization.yaml
Normal file
14
kustomization.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
namespace: espocrm
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- deployments/espocrm.yaml
|
||||||
|
- deployments/mysql.yaml
|
||||||
|
- services/espocrm.yaml
|
||||||
|
- services/mysql.yaml
|
||||||
|
- pvc/espocrm-pvc.yaml
|
||||||
|
- pvc/mysql-pvc.yaml
|
||||||
|
- ingress/ingress.yaml
|
4
namespace.yaml
Normal file
4
namespace.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: espocrm
|
12
pvc/espocrm-pvc.yaml
Normal file
12
pvc/espocrm-pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: espocrm-pvc
|
||||||
|
namespace: espocrm
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: nfs-manabo
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
12
pvc/mysql-pvc.yaml
Normal file
12
pvc/mysql-pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: mysql-pvc
|
||||||
|
namespace: espocrm
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: nfs-manabo
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
13
services/espocrm.yaml
Normal file
13
services/espocrm.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: espocrm
|
||||||
|
namespace: espocrm
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: espocrm
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 80
|
||||||
|
targetPort: 80
|
||||||
|
type: ClusterIP
|
13
services/mysql.yaml
Normal file
13
services/mysql.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: mysql
|
||||||
|
namespace: espocrm
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: mysql
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 3306
|
||||||
|
targetPort: 3306
|
||||||
|
clusterIP: None
|
Reference in New Issue
Block a user