añadido harbor y nextcloud
This commit is contained in:
20
k8s-master/apps/harbor.yaml
Normal file
20
k8s-master/apps/harbor.yaml
Normal file
@ -0,0 +1,20 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: vscode
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: 'http://192.168.1.10:30300/xavor/k8s-harbor.git'
|
||||
targetRevision: HEAD
|
||||
path: .
|
||||
destination:
|
||||
server: 'https://kubernetes.default.svc'
|
||||
namespace: harbor
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
20
k8s-master/apps/nextcloud.yaml
Normal file
20
k8s-master/apps/nextcloud.yaml
Normal file
@ -0,0 +1,20 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: vscode
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: 'http://192.168.1.10:30300/xavor/k8s-nextcloud.git'
|
||||
targetRevision: HEAD
|
||||
path: .
|
||||
destination:
|
||||
server: 'https://kubernetes.default.svc'
|
||||
namespace: nextcloud
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
35
k8s-nextcloud/deployments/mariadb.yaml
Normal file
35
k8s-nextcloud/deployments/mariadb.yaml
Normal file
@ -0,0 +1,35 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mariadb
|
||||
namespace: nextcloud
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mariadb
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mariadb
|
||||
spec:
|
||||
containers:
|
||||
- name: mariadb
|
||||
image: mariadb:10.11
|
||||
env:
|
||||
- name: MYSQL_ROOT_PASSWORD
|
||||
value: nextcloud
|
||||
- name: MYSQL_DATABASE
|
||||
value: nextcloud
|
||||
- name: MYSQL_USER
|
||||
value: nextcloud
|
||||
- name: MYSQL_PASSWORD
|
||||
value: nextcloud
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/mysql
|
||||
name: mariadb-storage
|
||||
volumes:
|
||||
- name: mariadb-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: mariadb-pvc
|
35
k8s-nextcloud/deployments/nextcloud.yaml
Normal file
35
k8s-nextcloud/deployments/nextcloud.yaml
Normal file
@ -0,0 +1,35 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nextcloud
|
||||
namespace: nextcloud
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nextcloud
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nextcloud
|
||||
spec:
|
||||
containers:
|
||||
- name: nextcloud
|
||||
image: nextcloud:27
|
||||
env:
|
||||
- name: MYSQL_PASSWORD
|
||||
value: nextcloud
|
||||
- name: MYSQL_DATABASE
|
||||
value: nextcloud
|
||||
- name: MYSQL_USER
|
||||
value: nextcloud
|
||||
- name: MYSQL_HOST
|
||||
value: mariadb
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumeMounts:
|
||||
- mountPath: /var/www/html
|
||||
name: nextcloud-storage
|
||||
volumes:
|
||||
- name: nextcloud-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: nextcloud-pvc
|
25
k8s-nextcloud/ingress/ingress.yaml
Normal file
25
k8s-nextcloud/ingress/ingress.yaml
Normal file
@ -0,0 +1,25 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: nextcloud-ingress
|
||||
namespace: nextcloud
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
tls:
|
||||
- hosts:
|
||||
- nextcloud.manabo.org
|
||||
secretName: nextcloud-tls
|
||||
rules:
|
||||
- host: nextcloud.manabo.org
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: nextcloud
|
||||
port:
|
||||
number: 80
|
11
k8s-nextcloud/kustomization.yaml
Normal file
11
k8s-nextcloud/kustomization.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- deployments/mariadb.yaml
|
||||
- deployments/nextcloud.yaml
|
||||
- services/mariadb.yaml
|
||||
- services/nextcloud.yaml
|
||||
- pvc/mariadb-pvc.yaml
|
||||
- pvc/nextcloud-pvc.yaml
|
||||
- ingress/ingress.yaml
|
4
k8s-nextcloud/namespace.yaml
Normal file
4
k8s-nextcloud/namespace.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: nextcloud
|
12
k8s-nextcloud/pvc/mariadb-pvc.yaml
Normal file
12
k8s-nextcloud/pvc/mariadb-pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: mariadb-pvc
|
||||
namespace: nextcloud
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: nfs-manabo
|
||||
resources:
|
||||
requests:
|
||||
storage: 8Gi
|
12
k8s-nextcloud/pvc/nextcloud-pvc.yaml
Normal file
12
k8s-nextcloud/pvc/nextcloud-pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: nextcloud-pvc
|
||||
namespace: nextcloud
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: nfs-manabo
|
||||
resources:
|
||||
requests:
|
||||
storage: 20Gi
|
10
k8s-nextcloud/services/mariadb.yaml
Normal file
10
k8s-nextcloud/services/mariadb.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mariadb
|
||||
namespace: nextcloud
|
||||
spec:
|
||||
ports:
|
||||
- port: 3306
|
||||
selector:
|
||||
app: mariadb
|
10
k8s-nextcloud/services/nextcloud.yaml
Normal file
10
k8s-nextcloud/services/nextcloud.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nextcloud
|
||||
namespace: nextcloud
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
selector:
|
||||
app: nextcloud
|
Reference in New Issue
Block a user