-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
integration test for sticky bit volume migration
Signed-off-by: Rohit-PX <[email protected]>
- Loading branch information
Rohit-PX
committed
Apr 28, 2023
1 parent
2a02115
commit b5fac09
Showing
8 changed files
with
137 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
test/integration_test/specs/mysql-migration-sticky/migration.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: stork.libopenstorage.org/v1alpha1 | ||
kind: Migration | ||
metadata: | ||
name: mysql-sticky-migration | ||
spec: | ||
# This should be the name of the cluster pair | ||
clusterPair: remoteclusterpair | ||
# If set to false this will migrate only the volumes. No PVCs, apps, etc will be migrated | ||
includeResources: true | ||
# If set to false, the deployments and stateful set replicas will be set to 0 on the destination. There will be an annotation with "stork.openstorage.org/migrationReplicas" to store the replica count from the source | ||
startApplications: false | ||
# List of namespaces to migrate | ||
namespaces: | ||
- mysql-sticky-mysql-migration-sticky |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
kind: StorageClass | ||
apiVersion: storage.k8s.io/v1 | ||
metadata: | ||
name: mysql-sc | ||
provisioner: kubernetes.io/aws-ebs | ||
parameters: | ||
type: gp2 | ||
reclaimPolicy: Delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: storage.k8s.io/v1 | ||
kind: StorageClass | ||
metadata: | ||
name: mysql-sc | ||
provisioner: kubernetes.io/azure-disk | ||
parameters: | ||
skuName: Standard_LRS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: storage.k8s.io/v1 | ||
kind: StorageClass | ||
metadata: | ||
name: mysql-sc | ||
parameters: | ||
type: pd-standard | ||
provisioner: kubernetes.io/gce-pd | ||
reclaimPolicy: Delete | ||
volumeBindingMode: Immediate | ||
allowVolumeExpansion: true |
10 changes: 10 additions & 0 deletions
10
test/integration_test/specs/mysql-sticky/linstor/linstor-sc.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
kind: StorageClass | ||
apiVersion: storage.k8s.io/v1 | ||
metadata: | ||
name: mysql-sc | ||
provisioner: linstor.csi.linbit.com | ||
allowVolumeExpansion: true | ||
reclaimPolicy: Delete | ||
parameters: | ||
autoPlace: "2" | ||
storagePool: sda |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: mysql | ||
labels: | ||
app: mysql | ||
spec: | ||
serviceName: mysql-service | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: mysql | ||
version: "1" | ||
template: | ||
metadata: | ||
labels: | ||
app: mysql | ||
version: "1" | ||
spec: | ||
schedulerName: stork | ||
containers: | ||
- image: mysql:5.6 | ||
name: mysql | ||
env: | ||
- name: MYSQL_ROOT_PASSWORD | ||
value: password | ||
ports: | ||
- containerPort: 3306 | ||
livenessProbe: | ||
exec: | ||
command: ["sh", "-c", "mysqladmin -u root -p$MYSQL_ROOT_PASSWORD ping"] | ||
initialDelaySeconds: 70 | ||
periodSeconds: 10 | ||
timeoutSeconds: 5 | ||
readinessProbe: | ||
exec: | ||
command: ["sh", "-c", "mysql -u root -p$MYSQL_ROOT_PASSWORD -e \"select 1\""] | ||
initialDelaySeconds: 60 | ||
periodSeconds: 10 | ||
timeoutSeconds: 5 | ||
volumeMounts: | ||
- name: mysql-data | ||
mountPath: /var/lib/mysql | ||
volumeClaimTemplates: | ||
- metadata: | ||
name: mysql-data | ||
annotations: | ||
volume.beta.kubernetes.io/storage-class: mysql-sticky-sc | ||
px/secret-name: volume-secrets | ||
px/secret-namespace: kube-system | ||
px/secret-key: mysql-secret | ||
spec: | ||
accessModes: [ "ReadWriteOnce" ] | ||
resources: | ||
requests: | ||
storage: 8Gi | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: mysql-service | ||
labels: | ||
app: mysql | ||
spec: | ||
selector: | ||
app: mysql | ||
ports: | ||
- name: transport | ||
port: 3306 |
8 changes: 8 additions & 0 deletions
8
test/integration_test/specs/mysql-sticky/portworx/sc-sticky.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
kind: StorageClass | ||
apiVersion: storage.k8s.io/v1 | ||
metadata: | ||
name: mysql-sticky-sc | ||
provisioner: kubernetes.io/portworx-volume | ||
parameters: | ||
repl: "2" | ||
sticky: "true" |