1
0
Fork 0
This commit is contained in:
Massaki Archambault 2020-05-17 14:20:29 -04:00
parent 3a6d578faa
commit d2547d903b
12 changed files with 56 additions and 7 deletions

View File

@ -3,7 +3,7 @@ services:
server:
image: "rancher/k3s"
restart: always
command: server --no-deploy traefik --kubelet-arg authentication-token-webhook --kubelet-arg authorization-mode=Webhook
command: server --disable traefik --disable local-storage --kubelet-arg authentication-token-webhook --kubelet-arg authorization-mode=Webhook
tmpfs:
- /run
- /var/run
@ -14,6 +14,7 @@ services:
- K3S_KUBECONFIG_MODE=666
volumes:
- k3s_data:/var/lib/rancher/k3s
- nfs_data:/srv/nfs
- .:/host
ports:
- 80:30080
@ -30,8 +31,9 @@ services:
environment:
- K3S_URL=https://server:6443
- K3S_CLUSTER_SECRET=${K3S_CLUSTER_SECRET:-replaceme}
volumes:
- nfs_data:/srv/nfs
volumes:
k3s_data:
nfs_data:

View File

@ -2,8 +2,8 @@ generators:
- nginx-ingress-controller.yaml
patchesStrategicMerge:
- nodeselector.yaml
- nodeport.yaml
- nodeselector-patch.yaml
- nodeport-patch.yaml
namespace: ingress-nginx

View File

@ -16,3 +16,6 @@ secretGenerator:
- password=replaceme
namespace: nextcloud
commonlabels:
app: nextcloud

View File

@ -58,7 +58,7 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 100Gi
storage: 50Gi
---
apiVersion: v1
kind: Service

View File

@ -0,0 +1,15 @@
kind: Deployment
apiVersion: apps/v1
metadata:
name: nfs-provisioner
spec:
template:
spec:
containers:
- name: nfs-provisioner
args:
- "-provisioner=badjware.dev/nfs"
volumes:
- name: export-volume
hostPath:
path: /srv/nfs

View File

@ -0,0 +1,10 @@
resources:
- storageclass.yaml
generators:
- nfs-provisionner.yaml
namespace: kube-system
patchesStrategicMerge:
- deployment-patch.yaml

View File

@ -0,0 +1,9 @@
apiVersion: badjware/v1
kind: RemoteResources
metadata:
name: nfs-provisionner
resources:
- url: https://raw.githubusercontent.com/kubernetes-incubator/external-storage/master/nfs/deploy/kubernetes/deployment.yaml
sha256: fead9be4f0fd1b2e2f9780a47a6f2b3a7a552ea9d9e526654bb0ac1f263718ac
- url: https://raw.githubusercontent.com/kubernetes-incubator/external-storage/master/nfs/deploy/kubernetes/rbac.yaml
sha256: cb4075fac2084d477cb2384e39075217bf672627a3edb58c100307b500879846

View File

@ -0,0 +1,9 @@
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: nfs
annotations:
storageclass.beta.kubernetes.io/is-default-class: "true"
provisioner: badjware.dev/nfs
mountOptions:
- vers=4.1

View File

@ -1,4 +1,5 @@
bases:
- ../../base/nfs-provisionner
- ../../base/ingress-nginx
- ../../base/cert-manager
- ../../base/kubernetes-dashboard
@ -75,4 +76,4 @@ transformers:
- ssm-secrets.yaml
configurations:
- kustomizeconfig/clusterissuer.yaml
- cert-manager/kustomizeconfig.yaml