Skip to content

Commit

Permalink
fix(integration-test): fixing test to use apps/v1 for deployment (#170)
Browse files Browse the repository at this point in the history
* removing example/00-prereqs.yaml
* updating k8s version to v1.20.1 in github workflow
* updating velero version to v1.6.0 in github workflow
* updated github workflow to use velero/velero-plugin-for-aws-amd64 version v1.2.0


Signed-off-by: mayank <[email protected]>
  • Loading branch information
mynktl authored Sep 13, 2021
1 parent d2d1b1d commit be05541
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 216 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
uses: manusa/[email protected]
with:
minikube version: v1.16.0
kubernetes version: v1.13.0
kubernetes version: v1.20.1
github token: ${{ secrets.GITHUB_TOKEN }}

- name: Build images locally
Expand All @@ -69,7 +69,7 @@ jobs:
run: |
kubectl cluster-info
echo "KUBECONFIG=$HOME/.kube/config" >> $GITHUB_ENV
echo "VELERO_RELEASE=v1.0.0" >> $GITHUB_ENV
echo "VELERO_RELEASE=v1.6.0" >> $GITHUB_ENV
echo "OPENEBS_RELEASE=master" >> $GITHUB_ENV
- name: Installation
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
uses: manusa/[email protected]
with:
minikube version: v1.16.0
kubernetes version: v1.13.0
kubernetes version: v1.20.1
github token: ${{ secrets.GITHUB_TOKEN }}

- name: Build images locally
Expand All @@ -69,7 +69,7 @@ jobs:
run: |
kubectl cluster-info
echo "KUBECONFIG=$HOME/.kube/config" >> $GITHUB_ENV
echo "VELERO_RELEASE=v1.0.0" >> $GITHUB_ENV
echo "VELERO_RELEASE=v1.6.0" >> $GITHUB_ENV
echo "OPENEBS_RELEASE=master" >> $GITHUB_ENV
- name: Installation
Expand Down
208 changes: 0 additions & 208 deletions example/00-prereqs.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion script/install-velero.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export MAPI_ADDR="http://${MAPI_SVC_ADDR}:5656"
export KUBERNETES_SERVICE_HOST="127.0.0.1"
export KUBECONFIG=$HOME/.kube/config

wget -nv -O velero.tar.gz https://github.com/heptio/velero/releases/download/${VELERO_RELEASE}/velero-${VELERO_RELEASE}-linux-amd64.tar.gz
wget -nv -O velero.tar.gz https://github.com/vmware-tanzu/velero/releases/download/${VELERO_RELEASE}/velero-${VELERO_RELEASE}-linux-amd64.tar.gz
mkdir velero
tar xf velero.tar.gz -C velero
velero=$PWD/velero/velero-${VELERO_RELEASE}-linux-amd64/velero
Expand Down Expand Up @@ -103,6 +103,7 @@ ${velero} install \
--bucket $BUCKET \
--secret-file ./script/minio-credentials \
--backup-location-config region=${REGION},s3ForcePathStyle="true",s3Url=http://${MINIO_SERVER_IP}:9000 \
--plugins velero/velero-plugin-for-aws-amd64:v1.2.0 \
--wait

sed "s/MINIO_ENDPOINT/http:\/\/$MINIO_SERVER_IP\:9000/" script/volumesnapshotlocation.yaml > /tmp/s.yaml
Expand Down
6 changes: 3 additions & 3 deletions tests/k8s/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (k *KubeClient) WaitForDeployment(labelSelector, ns string) error {
var ready bool
dumpLog := 0
for {
deploymentList, err := k.ExtensionsV1beta1().
deploymentList, err := k.AppsV1().
Deployments(ns).
List(context.TODO(), metav1.ListOptions{
LabelSelector: labelSelector,
Expand All @@ -83,7 +83,7 @@ func (k *KubeClient) WaitForDeployment(labelSelector, ns string) error {
}

for _, d := range deploymentList.Items {
o, err := k.ExtensionsV1beta1().
o, err := k.AppsV1().
Deployments(d.Namespace).
Get(context.TODO(), d.Name, metav1.GetOptions{})
if err != nil {
Expand Down Expand Up @@ -134,7 +134,7 @@ func (k *KubeClient) WaitForPod(podName, podNamespace string) error {
func (k *KubeClient) WaitForDeploymentCleanup(labelSelector, ns string) error {
dumpLog := 0
for {
deploymentList, err := k.ExtensionsV1beta1().
deploymentList, err := k.AppsV1().
Deployments(ns).
List(context.TODO(), metav1.ListOptions{
LabelSelector: labelSelector,
Expand Down

0 comments on commit be05541

Please sign in to comment.