demo
This commit is contained in:
2
demo/README.md
Normal file
2
demo/README.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# Demo
|
||||
## nginx container fdor testing
|
||||
140
demo/backupSchedule.yaml
Normal file
140
demo/backupSchedule.yaml
Normal file
@@ -0,0 +1,140 @@
|
||||
apiVersion: velero.io/v1
|
||||
kind: Schedule
|
||||
metadata:
|
||||
name: backup-csi-hourly
|
||||
namespace: velero
|
||||
labels:
|
||||
velero.io/storage-location: ceph-bucket
|
||||
spec:
|
||||
# Schedule is a Cron expression defining when to run the Backup
|
||||
schedule: 0 15-22 * * * # every hour
|
||||
# Specifies whether to use OwnerReferences on backups created by this Schedule.
|
||||
# Notice: if set to true, when schedule is deleted, backups will be deleted too. Optional.
|
||||
useOwnerReferencesInBackup: true
|
||||
template:
|
||||
csiSnapshotTimeout: 10m0s
|
||||
defaultVolumesToFsBackup: false
|
||||
hooks: {}
|
||||
includedNamespaces:
|
||||
- demo
|
||||
metadata: {}
|
||||
storageLocation: ceph-bucket
|
||||
ttl: 8h0m0s
|
||||
---
|
||||
apiVersion: velero.io/v1
|
||||
kind: Schedule
|
||||
metadata:
|
||||
name: backup-csi-daily
|
||||
namespace: velero
|
||||
labels:
|
||||
velero.io/storage-location: ceph-bucket
|
||||
spec:
|
||||
# Schedule is a Cron expression defining when to run the Backup
|
||||
schedule: 0 0 * * * # every hour
|
||||
# Specifies whether to use OwnerReferences on backups created by this Schedule.
|
||||
# Notice: if set to true, when schedule is deleted, backups will be deleted too. Optional.
|
||||
useOwnerReferencesInBackup: true
|
||||
template:
|
||||
csiSnapshotTimeout: 10m0s
|
||||
defaultVolumesToFsBackup: false
|
||||
hooks: {}
|
||||
includedNamespaces:
|
||||
- demo
|
||||
metadata: {}
|
||||
storageLocation: ceph-bucket
|
||||
ttl: 168h0m0s
|
||||
---
|
||||
apiVersion: velero.io/v1
|
||||
kind: Schedule
|
||||
metadata:
|
||||
name: backup-csi-weekly
|
||||
namespace: velero
|
||||
labels:
|
||||
velero.io/storage-location: ceph-bucket
|
||||
spec:
|
||||
# Schedule is a Cron expression defining when to run the Backup
|
||||
schedule: 0 0 * * 1 # every hour
|
||||
# Specifies whether to use OwnerReferences on backups created by this Schedule.
|
||||
# Notice: if set to true, when schedule is deleted, backups will be deleted too. Optional.
|
||||
useOwnerReferencesInBackup: true
|
||||
template:
|
||||
csiSnapshotTimeout: 10m0s
|
||||
defaultVolumesToFsBackup: false
|
||||
hooks: {}
|
||||
includedNamespaces:
|
||||
- demo
|
||||
metadata: {}
|
||||
storageLocation: ceph-bucket
|
||||
ttl: 730h0m0s
|
||||
---
|
||||
apiVersion: velero.io/v1
|
||||
kind: Schedule
|
||||
metadata:
|
||||
name: backup-restic-daily
|
||||
namespace: velero
|
||||
labels:
|
||||
velero.io/storage-location: aux-balancer-minio
|
||||
spec:
|
||||
# Schedule is a Cron expression defining when to run the Backup
|
||||
schedule: 0 0 * * * # every hour
|
||||
# Specifies whether to use OwnerReferences on backups created by this Schedule.
|
||||
# Notice: if set to true, when schedule is deleted, backups will be deleted too. Optional.
|
||||
useOwnerReferencesInBackup: true
|
||||
template:
|
||||
csiSnapshotTimeout: 10m0s
|
||||
snapshotVolumes: false
|
||||
defaultVolumesToFsBackup: true
|
||||
hooks: {}
|
||||
includedNamespaces:
|
||||
- demo
|
||||
metadata: {}
|
||||
storageLocation: aux-balancer-minio
|
||||
ttl: 168h0m0s
|
||||
---
|
||||
apiVersion: velero.io/v1
|
||||
kind: Schedule
|
||||
metadata:
|
||||
name: backup-restic-weekly
|
||||
namespace: velero
|
||||
labels:
|
||||
velero.io/storage-location: aux-balancer-minio
|
||||
spec:
|
||||
# Schedule is a Cron expression defining when to run the Backup
|
||||
schedule: 0 0 * * 1 # every hour
|
||||
# Specifies whether to use OwnerReferences on backups created by this Schedule.
|
||||
# Notice: if set to true, when schedule is deleted, backups will be deleted too. Optional.
|
||||
useOwnerReferencesInBackup: true
|
||||
template:
|
||||
csiSnapshotTimeout: 10m0s
|
||||
snapshotVolumes: false
|
||||
defaultVolumesToFsBackup: true
|
||||
hooks: {}
|
||||
includedNamespaces:
|
||||
- demo
|
||||
metadata: {}
|
||||
storageLocation: aux-balancer-minio
|
||||
ttl: 730h0m0s
|
||||
---
|
||||
apiVersion: velero.io/v1
|
||||
kind: Schedule
|
||||
metadata:
|
||||
name: backup-restic-monthly
|
||||
namespace: velero
|
||||
labels:
|
||||
velero.io/storage-location: aux-balancer-minio
|
||||
spec:
|
||||
# Schedule is a Cron expression defining when to run the Backup
|
||||
schedule: 0 0 1 * * # every hour
|
||||
# Specifies whether to use OwnerReferences on backups created by this Schedule.
|
||||
# Notice: if set to true, when schedule is deleted, backups will be deleted too. Optional.
|
||||
useOwnerReferencesInBackup: true
|
||||
template:
|
||||
csiSnapshotTimeout: 10m0s
|
||||
snapshotVolumes: false
|
||||
defaultVolumesToFsBackup: true
|
||||
hooks: {}
|
||||
includedNamespaces:
|
||||
- demo
|
||||
metadata: {}
|
||||
storageLocation: aux-balancer-minio
|
||||
ttl: 4380h0m0s
|
||||
42
demo/filesystem.yaml
Normal file
42
demo/filesystem.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
apiVersion: ceph.rook.io/v1
|
||||
kind: CephFilesystem
|
||||
metadata:
|
||||
name: demo
|
||||
namespace: rook-ceph
|
||||
spec:
|
||||
metadataPool:
|
||||
failureDomain: host
|
||||
replicated:
|
||||
size: 3
|
||||
dataPools:
|
||||
- name: replicated
|
||||
failureDomain: host
|
||||
replicated:
|
||||
size: 3
|
||||
preserveFilesystemOnDelete: false
|
||||
metadataServer:
|
||||
activeCount: 1
|
||||
activeStandby: true
|
||||
placement:
|
||||
# nodeAffinity:
|
||||
# requiredDuringSchedulingIgnoredDuringExecution:
|
||||
# nodeSelectorTerms:
|
||||
# - matchExpressions:
|
||||
# - key: role
|
||||
# operator: In
|
||||
# values:
|
||||
# - mds-node
|
||||
tolerations:
|
||||
- key: node-role.kubernetes.io/storage-node
|
||||
operator: Exists
|
||||
effect: NoSchedule
|
||||
# podAffinity:
|
||||
# podAntiAffinity:
|
||||
# topologySpreadConstraints:
|
||||
#resources:
|
||||
# limits:
|
||||
# cpu: "80m"
|
||||
# memory: "1024Mi"
|
||||
# requests:
|
||||
# cpu: "500m"
|
||||
# memory: "1024Mi"
|
||||
25
demo/ingress.yaml
Normal file
25
demo/ingress.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: demo
|
||||
namespace: demo
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: nginx
|
||||
cert-manager.io/cluster-issuer: ca
|
||||
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- demo.undercloud.cf
|
||||
secretName: demo-tls
|
||||
rules:
|
||||
- host: demo.undercloud.cf
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: nginx
|
||||
port:
|
||||
number: 80
|
||||
4
demo/namespace.yaml
Normal file
4
demo/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: demo
|
||||
108
demo/nginx.yaml
Normal file
108
demo/nginx.yaml
Normal file
@@ -0,0 +1,108 @@
|
||||
---
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: demo
|
||||
# Change "rook-ceph" provisioner prefix to match the operator namespace if needed
|
||||
provisioner: rook-ceph.cephfs.csi.ceph.com
|
||||
parameters:
|
||||
# clusterID is the namespace where the rook cluster is running
|
||||
# If you change this namespace, also change the namespace below where the secret namespaces are defined
|
||||
clusterID: rook-ceph
|
||||
|
||||
# CephFS filesystem name into which the volume shall be created
|
||||
fsName: demo
|
||||
|
||||
# Ceph pool into which the volume shall be created
|
||||
# Required for provisionVolume: "true"
|
||||
pool: demo-replicated
|
||||
|
||||
# The secrets contain Ceph admin credentials. These are generated automatically by the operator
|
||||
# in the same namespace as the cluster.
|
||||
csi.storage.k8s.io/provisioner-secret-name: rook-csi-cephfs-provisioner
|
||||
csi.storage.k8s.io/provisioner-secret-namespace: rook-ceph
|
||||
csi.storage.k8s.io/controller-expand-secret-name: rook-csi-cephfs-provisioner
|
||||
csi.storage.k8s.io/controller-expand-secret-namespace: rook-ceph
|
||||
csi.storage.k8s.io/node-stage-secret-name: rook-csi-cephfs-node
|
||||
csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph
|
||||
|
||||
reclaimPolicy: Delete
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: html
|
||||
namespace: demo
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 8M
|
||||
storageClassName: demo
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
namespace: demo
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
#backup.velero.io/backup-volumes: html
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 443
|
||||
- containerPort: 80
|
||||
env:
|
||||
- name: PUID
|
||||
value: "1000"
|
||||
- name: PGID
|
||||
value: "1000"
|
||||
volumeMounts:
|
||||
- mountPath: /usr/share/nginx/html
|
||||
name: html
|
||||
volumes:
|
||||
- name: html
|
||||
persistentVolumeClaim:
|
||||
claimName: html
|
||||
readOnly: false
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nginx
|
||||
namespace: demo
|
||||
spec:
|
||||
internalTrafficPolicy: Cluster
|
||||
ipFamilies:
|
||||
- IPv6
|
||||
#- IPv4
|
||||
#ipFamilyPolicy: PreferDualStack
|
||||
ipFamilyPolicy: SingleStack
|
||||
ports:
|
||||
- name: https
|
||||
port: 443
|
||||
protocol: TCP
|
||||
targetPort: 443
|
||||
- name: http
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
selector:
|
||||
app: nginx
|
||||
#sessionAffinity: None
|
||||
type: ClusterIP
|
||||
Reference in New Issue
Block a user