-
Notifications
You must be signed in to change notification settings - Fork 82
Ibmcloud e2e #636
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
Ibmcloud e2e #636
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 |
---|---|---|
|
@@ -381,7 +381,7 @@ var _ = Describe("Configuration testing for DPA Custom Resource", func() { | |
} | ||
|
||
awsTests := []TableEntry{ | ||
Entry("AWS Without Region No S3ForcePathStyle with BackupImages false should succeed", InstallCase{ | ||
Entry("AWS Without Region No S3ForcePathStyle with BackupImages false should succeed", Label("aws"), InstallCase{ | ||
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. I would rather see this label added in a for loop instead since that's the whole point of a separate |
||
Name: "default-no-region-no-s3forcepathstyle", | ||
BRestoreType: RESTIC, | ||
DpaSpec: &oadpv1alpha1.DataProtectionApplicationSpec{ | ||
|
@@ -412,7 +412,7 @@ var _ = Describe("Configuration testing for DPA Custom Resource", func() { | |
}, | ||
WantError: false, | ||
}, nil), | ||
Entry("AWS With Region And S3ForcePathStyle should succeed", InstallCase{ | ||
Entry("AWS With Region And S3ForcePathStyle should succeed", Label("aws"), InstallCase{ | ||
Name: "default-with-region-and-s3forcepathstyle", | ||
BRestoreType: RESTIC, | ||
DpaSpec: &oadpv1alpha1.DataProtectionApplicationSpec{ | ||
|
@@ -447,7 +447,7 @@ var _ = Describe("Configuration testing for DPA Custom Resource", func() { | |
}, | ||
WantError: false, | ||
}, nil), | ||
Entry("AWS Without Region And S3ForcePathStyle true should fail", InstallCase{ | ||
Entry("AWS Without Region And S3ForcePathStyle true should fail", Label("aws"), InstallCase{ | ||
Name: "default-with-region-and-s3forcepathstyle", | ||
BRestoreType: RESTIC, | ||
DpaSpec: &oadpv1alpha1.DataProtectionApplicationSpec{ | ||
|
@@ -481,10 +481,8 @@ var _ = Describe("Configuration testing for DPA Custom Resource", func() { | |
WantError: true, | ||
}, fmt.Errorf("region for AWS backupstoragelocation cannot be empty when s3ForcePathStyle is true or when backing up images")), | ||
} | ||
genericTests = append(genericTests, awsTests...) | ||
|
||
if provider == "aws" { | ||
genericTests = append(genericTests, awsTests...) | ||
} | ||
var lastInstallingApplicationNamespace string | ||
var lastInstallTime time.Time | ||
var _ = ReportAfterEach(func(report SpecReport) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -155,7 +155,7 @@ items: | |
spec: | ||
containers: | ||
- name: todolist | ||
image: quay.io/rhn_engineering_whayutin/todolist-mariadb-go:latest | ||
image: quay.io/mferrato/todolist-mariadb-go: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. What's happening here? 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. Wesley's image is amd64 only. I made a PR to the mig-demo-app repo konveyor/mig-demo-apps#74 to add the code enabling multiarch builds for the mariadb-based app. We discused that with @weshayutin as a temporary solution until we have a place to store the multiarch manifest. But I'd rather store it somewhere else, if you know of a better place. 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. Correct.. I've just opened an issue on OADP to better describe what needs to be done here and why. #666 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. So konveyor quay org would be one |
||
env: | ||
- name: foo | ||
value: bar | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,178 @@ | ||
apiVersion: v1 | ||
kind: List | ||
items: | ||
- kind: Namespace | ||
apiVersion: v1 | ||
metadata: | ||
name: mysql-persistent | ||
labels: | ||
app: mysql | ||
- apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: mysql-persistent-sa | ||
namespace: mysql-persistent | ||
labels: | ||
component: mysql-persistent | ||
- apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: mysql | ||
namespace: mysql-persistent | ||
labels: | ||
app: mysql | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
storageClassName: ocs-storagecluster-cephfs | ||
resources: | ||
requests: | ||
storage: 1Gi | ||
- kind: SecurityContextConstraints | ||
apiVersion: security.openshift.io/v1 | ||
metadata: | ||
name: mysql-persistent-scc | ||
allowPrivilegeEscalation: true | ||
allowPrivilegedContainer: true | ||
runAsUser: | ||
type: RunAsAny | ||
seLinuxContext: | ||
type: RunAsAny | ||
fsGroup: | ||
type: RunAsAny | ||
supplementalGroups: | ||
type: RunAsAny | ||
volumes: | ||
- '*' | ||
users: | ||
- system:admin | ||
- system:serviceaccount:mysql-persistent:mysql-persistent-sa | ||
- apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
annotations: | ||
template.openshift.io/expose-uri: mariadb://{.spec.clusterIP}:{.spec.ports[?(.name=="mysql")].port} | ||
name: mysql | ||
namespace: mysql-persistent | ||
labels: | ||
app: mysql | ||
service: mysql | ||
spec: | ||
ports: | ||
- protocol: TCP | ||
name: mysql | ||
port: 3306 | ||
selector: | ||
app: mysql | ||
- apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
annotations: | ||
template.alpha.openshift.io/wait-for-ready: 'true' | ||
name: mysql | ||
namespace: mysql-persistent | ||
labels: | ||
e2e-app: "true" | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: mysql | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
labels: | ||
e2e-app: "true" | ||
app: mysql | ||
spec: | ||
serviceAccountName: mysql-persistent-sa | ||
containers: | ||
- image: registry.redhat.io/rhel8/mariadb-105:latest | ||
name: mysql | ||
securityContext: | ||
privileged: true | ||
env: | ||
- name: MYSQL_USER | ||
value: changeme | ||
- name: MYSQL_PASSWORD | ||
value: changeme | ||
- name: MYSQL_ROOT_PASSWORD | ||
value: root | ||
- name: MYSQL_DATABASE | ||
value: todolist | ||
ports: | ||
- containerPort: 3306 | ||
name: mysql | ||
resources: | ||
limits: | ||
memory: 512Mi | ||
volumeMounts: | ||
- name: mysql-data | ||
mountPath: /var/lib/mysql | ||
volumes: | ||
- name: mysql-data | ||
persistentVolumeClaim: | ||
claimName: mysql | ||
- apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: todolist | ||
namespace: mysql-persistent | ||
labels: | ||
app: todolist | ||
service: todolist | ||
e2e-app: "true" | ||
spec: | ||
ports: | ||
- name: web | ||
port: 8000 | ||
targetPort: 8000 | ||
selector: | ||
app: todolist | ||
service: todolist | ||
- apiVersion: apps.openshift.io/v1 | ||
kind: DeploymentConfig | ||
metadata: | ||
name: todolist | ||
namespace: mysql-persistent | ||
labels: | ||
app: todolist | ||
service: todolist | ||
e2e-app: "true" | ||
spec: | ||
replicas: 1 | ||
selector: | ||
app: todolist | ||
service: todolist | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
labels: | ||
app: todolist | ||
service: todolist | ||
e2e-app: "true" | ||
spec: | ||
containers: | ||
- name: todolist | ||
image: quay.io/mferrato/todolist-mariadb-go:v1 | ||
env: | ||
- name: foo | ||
value: bar | ||
ports: | ||
- containerPort: 8000 | ||
protocol: TCP | ||
initContainers: | ||
- name: init-myservice | ||
image: registry.access.redhat.com/ubi8/ubi:latest | ||
command: ['sh', '-c', 'sleep 10; until getent hosts mysql; do echo waiting for mysql; sleep 5; done;'] | ||
- apiVersion: route.openshift.io/v1 | ||
kind: Route | ||
metadata: | ||
name: todolist-route | ||
namespace: mysql-persistent | ||
spec: | ||
path: "/" | ||
to: | ||
kind: Service | ||
name: todolist |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
kind: List | ||
items: | ||
- apiVersion: snapshot.storage.k8s.io/v1 | ||
kind: VolumeSnapshotClass | ||
metadata: | ||
name: oadp-example-snapclass | ||
labels: | ||
velero.io/csi-volumesnapshot-class: 'true' | ||
annotations: | ||
snapshot.storage.kubernetes.io/is-default-class: 'true' | ||
driver: ebs.csi.aws.com | ||
deletionPolicy: Retain |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: v1 | ||
kind: List | ||
items: | ||
- apiVersion: snapshot.storage.k8s.io/v1 | ||
kind: VolumeSnapshotClass | ||
metadata: | ||
name: oadp-example-snapclass | ||
labels: | ||
velero.io/csi-volumesnapshot-class: 'true' | ||
annotations: | ||
snapshot.storage.kubernetes.io/is-default-class: 'true' | ||
driver: openshift-storage.cephfs.csi.ceph.com | ||
deletionPolicy: Retain | ||
parameters: | ||
clusterID: openshift-storage | ||
csi.storage.k8s.io/snapshotter-secret-name: rook-csi-cephfs-provisioner | ||
csi.storage.k8s.io/snapshotter-secret-namespace: openshift-storage |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
|
||
cat > $TMP_DIR/oadpcreds <<EOF | ||
{ | ||
"spec": { | ||
"configuration":{ | ||
"velero":{ | ||
"defaultPlugins": [ | ||
"openshift", "$PROVIDER" | ||
] | ||
} | ||
}, | ||
"backupLocations": [ | ||
{ | ||
"velero": { | ||
"provider": "$PROVIDER", | ||
"config": { | ||
"profile": "$BSL_AWS_PROFILE", | ||
"region": "$BSL_REGION", | ||
"s3ForcePathStyle": "true", | ||
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. @Mathieu-Ferraton @kaovilai Wont this set 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. @deepakraj1997 You're right, but I think these are aws specific tests, which we want to skip for ibmcloud clusters (this can be discussed further though). If we use IBM COS bucket as BSL with ibmcloud/powerVS clusters, then we need to keep this to 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. @deepakraj1997 This is fine. It would apply to all specs within the ibmcloud which have to use aws plugin via the s3ForcePathStyle to work. |
||
"s3Url": "https://s3.$BSL_REGION.cloud-object-storage.appdomain.cloud" | ||
}, | ||
"objectStorage":{ | ||
"bucket": "$BUCKET" | ||
} | ||
} | ||
} | ||
], | ||
"credential":{ | ||
"name": "$SECRET", | ||
"key": "cloud" | ||
} | ||
} | ||
} | ||
EOF | ||
|
||
x=$(cat $TMP_DIR/oadpcreds); echo "$x" | grep -o '^[^#]*' > $TMP_DIR/oadpcreds |
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.
nit.. probably can remove this :)
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.
we can remove the commented line, but i think we can keep the test_filter as we can use it to run cloud specific tests in future.