añadido harbor y nextcloud

This commit is contained in:
2025-04-27 22:56:26 +00:00
parent 0a36e930e7
commit 8ed2a07946
11 changed files with 194 additions and 0 deletions

View 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

View 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

View 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

View 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

View 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

View 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

View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: nextcloud

View 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

View 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

View File

@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: mariadb
namespace: nextcloud
spec:
ports:
- port: 3306
selector:
app: mariadb

View File

@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: nextcloud
namespace: nextcloud
spec:
ports:
- port: 80
selector:
app: nextcloud