Browse Source

static pv, fix

master
tobi 1 year ago
parent
commit
5b15a30175
6 changed files with 70 additions and 4 deletions
  1. +1
    -1
      admin.yaml
  2. +21
    -0
      issuer.yaml
  3. +2
    -2
      mysql/dynamic_pvc.yaml
  4. +1
    -1
      mysql/mysql.yaml
  5. +29
    -0
      mysql/static_pv.yaml
  6. +16
    -0
      mysql/static_pvc.yaml

+ 1
- 1
admin.yaml View File

@@ -5,7 +5,7 @@ metadata:
name: admin
namespace: inhouse-dns
spec:
storageClassName: 2rep
storageClassName: block-2-rep
accessModes:
- ReadWriteOnce
resources:


+ 21
- 0
issuer.yaml View File

@@ -0,0 +1,21 @@
# will ignore namespace, cluster wide issuer
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: issuer
spec:
acme:
email: tobi_h@outlook.com
privateKeySecretRef:
name: tobi-outlook-acc-key
server: https://acme-v02.api.letsencrypt.org/directory
solvers:
- dns01:
rfc2136:
nameserver: 90.187.215.61
tsigKeyName: master_key
tsigAlgorithm: HMACMD5
tsigSecretSecretRef:
name: master-pdns-key
key: key


mysql_pvc.yaml → mysql/dynamic_pvc.yaml View File

@@ -2,10 +2,10 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: db-data
name: powerdns-mysql
namespace: inhouse-dns
spec:
storageClassName: 2rep
storageClassName: block-2-rep
accessModes:
- ReadWriteOnce
resources:

mysql.yaml → mysql/mysql.yaml View File

@@ -34,7 +34,7 @@ spec:
volumes:
- name: db-vol
persistentVolumeClaim:
claimName: db-data
claimName: powerdns-mysql

---
# for the powerdns servers

+ 29
- 0
mysql/static_pv.yaml View File

@@ -0,0 +1,29 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: powerdns-mysql
namespace: inhouse-dns
spec:
accessModes:
- ReadWriteOnce
capacity:
storage: 2Gi
csi:
driver: rbd.csi.ceph.com
fsType: ext4
nodeStageSecretRef:
# node stage secret name
name: csi-rbd-secret
# node stage secret namespace where above secret is created
namespace: default
volumeAttributes:
# Required options from storageclass parameters need to be added in volumeAttributes
"clusterID": "3b40dfa8-1ac7-11eb-a3a9-1c697a0c21cd"
"pool": "k8s"
"staticVolume": "true"
#mounter: rbd-nbd
# volumeHandle should be same as rbd image name
volumeHandle: powerdns-mysql
persistentVolumeReclaimPolicy: Retain
# The volumeMode can be either `Filesystem` or `Block` if you are creating Filesystem PVC it should be `Filesystem`, if you are creating Block PV you need to change it to `Block`
volumeMode: Filesystem

+ 16
- 0
mysql/static_pvc.yaml View File

@@ -0,0 +1,16 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: powerdns-mysql
namespace: inhouse-dns
spec:
accessModes:
# ReadWriteMany is only supported for Block PVC
- ReadWriteOnce
resources:
requests:
storage: 2Gi
# The volumeMode can be either `Filesystem` or `Block` if you are creating Filesystem PVC it should be `Filesystem`, if you are creating Block PV you need to change it to `Block`
volumeMode: Filesystem
# volumeName should be same as PV name
volumeName: powerdns-mysql

Loading…
Cancel
Save