-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deployment files for wordpress demo #180
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: kahu.io/v1beta1 | ||
kind: Restore | ||
metadata: | ||
name: restore-demo-1 | ||
spec: | ||
backupName: backup-demo | ||
preserveNodePort: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: storage.k8s.io/v1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Each example should have a documentation, I could not find There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, Doc PR will be raised referencing these files There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the same folder?! |
||
kind: StorageClass | ||
metadata: | ||
name: openebs-zfspv | ||
parameters: | ||
recordsize: "4k" | ||
compression: "off" | ||
dedup: "off" | ||
fstype: "zfs" | ||
poolname: "zfspv-pool" | ||
provisioner: zfs.csi.openebs.io | ||
reclaimPolicy: Retain |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: snapshot.storage.k8s.io/v1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This folder name is apt for the demo?! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
yes, openebs-zfs will be reused in different use cases for volume part. so its deployment is kept separate There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. examples/sample-demos --> looks not ok. example: Because this organization can have different projects and those may have things to add to examples |
||
kind: VolumeSnapshotClass | ||
metadata: | ||
name: csi-zfs-snapclass | ||
annotations: | ||
snapshot.storage.kubernetes.io/is-default-class: "true" | ||
driver: zfs.csi.openebs.io | ||
deletionPolicy: Delete | ||
parameters: |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
secretGenerator: | ||
- name: mysql-pass | ||
literals: | ||
- password=test1234 | ||
resources: | ||
- mysql-deployment.yaml | ||
- wordpress-deployment.yaml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: wordpress-mysql | ||
labels: | ||
app: wordpress | ||
spec: | ||
ports: | ||
- port: 3306 | ||
selector: | ||
app: wordpress | ||
tier: mysql | ||
clusterIP: None | ||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: mysql-pv-claim | ||
labels: | ||
app: wordpress | ||
spec: | ||
storageClassName: openebs-zfspv | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 2Gi | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: wordpress-mysql | ||
labels: | ||
app: wordpress | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: wordpress | ||
tier: mysql | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
labels: | ||
app: wordpress | ||
tier: mysql | ||
spec: | ||
containers: | ||
- image: mysql:5.6 | ||
name: mysql | ||
env: | ||
- name: MYSQL_ROOT_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: mysql-pass | ||
key: password | ||
ports: | ||
- containerPort: 3306 | ||
name: mysql | ||
volumeMounts: | ||
- name: mysql-persistent-storage | ||
mountPath: /var/lib/mysql | ||
volumes: | ||
- name: mysql-persistent-storage | ||
persistentVolumeClaim: | ||
claimName: mysql-pv-claim |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: wordpress | ||
labels: | ||
app: wordpress | ||
spec: | ||
ports: | ||
- port: 80 | ||
selector: | ||
app: wordpress | ||
tier: frontend | ||
type: NodePort | ||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: wp-pv-claim | ||
labels: | ||
app: wordpress | ||
spec: | ||
storageClassName: openebs-zfspv | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 2Gi | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: wordpress | ||
labels: | ||
app: wordpress | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: wordpress | ||
tier: frontend | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
labels: | ||
app: wordpress | ||
tier: frontend | ||
spec: | ||
containers: | ||
- image: wordpress:4.8-apache | ||
name: wordpress | ||
env: | ||
- name: WORDPRESS_DB_HOST | ||
value: wordpress-mysql | ||
- name: WORDPRESS_DB_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: mysql-pass | ||
key: password | ||
ports: | ||
- containerPort: 80 | ||
name: wordpress | ||
volumeMounts: | ||
- name: wordpress-persistent-storage | ||
mountPath: /var/www/html | ||
volumes: | ||
- name: wordpress-persistent-storage | ||
persistentVolumeClaim: | ||
claimName: wp-pv-claim |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this file is outside directly under examples? Supposed to be in a folder based on the name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This directory contains yamls with different attributes of backup and restore yamls and sample demo folder contains some specific usecase scenarios
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you must create folders and sub folders for your demo. Examples folder is common to have various different demo/usecases. This file is out of place!