continuous deploy - service account and gitea workflow
This commit is contained in:
50
deploy/infra/cd-serviceaccount.yaml
Normal file
50
deploy/infra/cd-serviceaccount.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: continuous-deploy
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["pods", "services", "secrets", "configmaps", "persistentvolumeclaims"]
|
||||
verbs: ["get", "watch", "list", "create", "update", "patch", "delete"]
|
||||
|
||||
- apiGroups: ["apps"]
|
||||
resources: ["deployments", "statefulsets"]
|
||||
verbs: ["get", "watch", "list", "create", "update", "patch", "delete"]
|
||||
|
||||
- apiGroups: ["batch"]
|
||||
resources: ["cronjobs", "jobs"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: continuous-deploy
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: continuous-deploy
|
||||
annotations:
|
||||
kubernetes.io/service-account.name: continuous-deploy
|
||||
type: kubernetes.io/service-account-token
|
||||
|
||||
---
|
||||
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: continuous-deploy
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: continuous-deploy
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: continuous-deploy
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
|
||||
26
deploy/infra/ingress.yaml
Normal file
26
deploy/infra/ingress.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: cloud-limbosolutions-com
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
kubernetes.io/ingress.class: traefik
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure, public-https
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
rules:
|
||||
- host: cloud.limbosolutions.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: nextcloud
|
||||
port:
|
||||
number: 8080
|
||||
path: /
|
||||
pathType: Prefix
|
||||
tls:
|
||||
- secretName: cloud-limbosolutions-com-secret-tls
|
||||
hosts:
|
||||
- cloud.limbosolutions.com
|
||||
@@ -2,6 +2,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- namespace.yaml
|
||||
|
||||
- cd-serviceaccount.yaml
|
||||
- ingress.yaml
|
||||
- storage-limbosolutions-com/pv.yaml
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
||||
156
deploy/infra/storage-limbosolutions-com/pv.yaml
Normal file
156
deploy/infra/storage-limbosolutions-com/pv.yaml
Normal file
@@ -0,0 +1,156 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: mf-documents-limbosolutions-com-nextcloud
|
||||
spec:
|
||||
storageClassName: storage-limbosolutions-com
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
capacity:
|
||||
storage: 64Gi
|
||||
csi:
|
||||
driver: storage-limbosolutions-com-csi-driver
|
||||
volumeHandle: mf-documents-limbosolutions-com-nextcloud
|
||||
volumeAttributes:
|
||||
collection: mf.documents
|
||||
path: /buckets/mf.documents
|
||||
volumeServerAccess: filerProxy
|
||||
diskType: "ssd"
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
volumeMode: Filesystem
|
||||
---
|
||||
|
||||
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: media-music-limbosolutions-com-nextcloud
|
||||
spec:
|
||||
storageClassName: storage-limbosolutions-com
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
capacity:
|
||||
storage: 64Gi
|
||||
csi:
|
||||
driver: storage-limbosolutions-com-csi-driver
|
||||
volumeHandle: media-music-limbosolutions-com-nextcloud
|
||||
volumeAttributes:
|
||||
collection: media.music
|
||||
path: /buckets/media.music
|
||||
volumeServerAccess: filerProxy
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
volumeMode: Filesystem
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: media-videos-limbosolutions-com-nextcloud
|
||||
spec:
|
||||
storageClassName: storage-limbosolutions-com
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
capacity:
|
||||
storage: 2000Gi
|
||||
csi:
|
||||
driver: storage-limbosolutions-com-csi-driver
|
||||
volumeHandle: media-videos-limbosolutions-com-nextcloud
|
||||
volumeAttributes:
|
||||
collection: media.videos
|
||||
path: /buckets/media.videos
|
||||
volumeServerAccess: filerProxy
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
volumeMode: Filesystem
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: media-gaming-limbosolutions-com-nextcloud
|
||||
spec:
|
||||
storageClassName: storage-limbosolutions-com
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
capacity:
|
||||
storage: 64Gi
|
||||
csi:
|
||||
driver: storage-limbosolutions-com-csi-driver
|
||||
volumeHandle: media-gaming-limbosolutions-com-nextcloud
|
||||
volumeAttributes:
|
||||
collection: media.gaming
|
||||
path: /buckets/media.gaming
|
||||
volumeServerAccess: filerProxy
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
volumeMode: Filesystem
|
||||
|
||||
---
|
||||
|
||||
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: it-storage-limbosolutions-com-nextcloud
|
||||
spec:
|
||||
storageClassName: storage-limbosolutions-com
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
capacity:
|
||||
storage: 1000Gi
|
||||
csi:
|
||||
driver: storage-limbosolutions-com-csi-driver
|
||||
volumeHandle: it-storage-limbosolutions-com-nextcloud
|
||||
volumeAttributes:
|
||||
collection: storage
|
||||
path: /buckets/storage
|
||||
volumeServerAccess: filerProxy
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
volumeMode: Filesystem
|
||||
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: mf-gallery-limbosolutions-com-nextcloud
|
||||
spec:
|
||||
storageClassName: storage-limbosolutions-com
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
capacity:
|
||||
storage: 64Gi
|
||||
csi:
|
||||
driver: storage-limbosolutions-com-csi-driver
|
||||
volumeHandle: mf-gallery-limbosolutions-com-nextcloud
|
||||
volumeAttributes:
|
||||
collection: mf.gallery
|
||||
path: /buckets/mf.gallery
|
||||
volumeServerAccess: filerProxy
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
volumeMode: Filesystem
|
||||
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: mf-nextcloud-limbosolutions-com-nextcloud
|
||||
spec:
|
||||
storageClassName: storage-limbosolutions-com
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
capacity:
|
||||
storage: 64Gi
|
||||
csi:
|
||||
driver: storage-limbosolutions-com-csi-driver
|
||||
volumeHandle: mf-nextcloud-limbosolutions-com-nextcloud
|
||||
volumeAttributes:
|
||||
collection: mf.ssd.nexcloud
|
||||
path: /buckets/mf.ssd.nexcloud
|
||||
volumeServerAccess: filerProxy
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
volumeMode: Filesystem
|
||||
---
|
||||
Reference in New Issue
Block a user