Skip to content
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

[OADP-452 , OADP-490] Add labels to dpa podConfig, Fix velero pod (match)labels missing deploy: velero #668

Merged
merged 19 commits into from
May 11, 2022

Conversation

kaovilai
Copy link
Member

@kaovilai kaovilai commented May 6, 2022

You can now customize pod labels of velero and restic pods using podConfig configurable in DataProtectionApplication.
Closes OADP-452 , OADP-490

@openshift-ci openshift-ci bot requested review from dymurray and sseago May 6, 2022 02:11
@kaovilai kaovilai changed the title Add labels to podconfig, Fix velero pod labels missing deploy: velero Add labels to podConfig, Fix velero pod labels missing deploy: velero May 6, 2022
@kaovilai kaovilai changed the title Add labels to podConfig, Fix velero pod labels missing deploy: velero Add labels to dpa podConfig, Fix velero pod labels missing deploy: velero May 6, 2022
@kaovilai kaovilai changed the title Add labels to dpa podConfig, Fix velero pod labels missing deploy: velero Add labels to dpa podConfig, Fix velero pod (match)labels missing deploy: velero May 6, 2022
@kaovilai
Copy link
Member Author

kaovilai commented May 6, 2022

/test 4.10-operator-e2e-azure
/test 4.9-operator-e2e-azure
/test 4.8-operator-e2e-azure
/test 4.7-operator-e2e-azure

@kaovilai
Copy link
Member Author

kaovilai commented May 6, 2022

/test 4.9-operator-e2e-aws

1 similar comment
@kaovilai
Copy link
Member Author

kaovilai commented May 6, 2022

/test 4.9-operator-e2e-aws

@kaovilai kaovilai changed the title Add labels to dpa podConfig, Fix velero pod (match)labels missing deploy: velero [OADP-452 , OADP-490] Add labels to dpa podConfig, Fix velero pod (match)labels missing deploy: velero May 6, 2022
@kaovilai
Copy link
Member Author

kaovilai commented May 6, 2022

Looks like subscription suite test should add some waits to
/retest

controllers/restic.go Outdated Show resolved Hide resolved
@kaovilai kaovilai requested a review from dymurray May 6, 2022 13:28
@dymurray
Copy link
Member

dymurray commented May 6, 2022

Wont this error out on existing user environments now that I think about it? Isn't the selector an immutable field?

@kaovilai
Copy link
Member Author

kaovilai commented May 6, 2022

Wont this error out on existing user environments now that I think about it? Isn't the selector an immutable field?

I'll test this. Maybe we need upgrade suite test.

@dymurray
Copy link
Member

dymurray commented May 6, 2022

Wont this error out on existing user environments now that I think about it? Isn't the selector an immutable field?

I'll test this. Maybe we need upgrade suite test.

+1 I think that's a great idea. cc @weshayutin

@kaovilai
Copy link
Member Author

kaovilai commented May 6, 2022

basically install published CSVs and try install the new CSV over it and check no reconcile failures

@kaovilai
Copy link
Member Author

kaovilai commented May 9, 2022

Will do a quick manual test so we can get this merged or make changes. But will work on upgrade suite test later

@kaovilai
Copy link
Member Author

kaovilai commented May 9, 2022

Step to test upgrade
Add OADP-1.0.2 bundle to catalogsource image, build and push. Add as catalogsource

export GIT_REV=$(git rev-parse --short HEAD)
CATALOG_IMG=ttl.sh/oadp-operator-catalog-$GIT_REV:1h \
BUNDLE_IMG=registry.redhat.io/oadp/oadp-operator-bundle@sha256:101d6d1c97f56114ce44542395ccd8fe273f36a314939022ede79f60b7aa9654 \
make catalog-build catalog-push 

Install OADP operator from catalogsource, create DPA that reconciles. Check velero deployment is ready.

Build bundle for this PR

IMG=ttl.sh/oadp-operator-$GIT_REV:1h \
BUNDLE_IMG=ttl.sh/oadp-operator-bundle-$GIT_REV:1h \
CATALOG_BASE_IMG=ttl.sh/oadp-operator-catalog-$GIT_REV:1h \
CATALOG_IMG=ttl.sh/oadp-operator-catalog-$GIT_REV:1h \
make docker-build docker-push bundle bundle-build bundle-push catalog-build-replaces catalog-push

Wait for update to refresh on cluster. Auto or manual approve update. Check no errors on velero deployment or dpa.

where catalog-build-replaces comes from https://github.com/openshift/oadp-operator/pull/681/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52R355

@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 10, 2022
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 10, 2022
@kaovilai
Copy link
Member Author

yup error

2022-05-10T20:28:11.966Z ERROR controller.dataprotectionapplication Reconciler error {"reconciler group": "oadp.openshift.io", "reconciler kind": "DataProtectionApplication", "name": "velero-sample", "namespace": "openshift-adp", "error": "Deployment.apps \"velero\" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{\"app.kubernetes.io/component\":\"server\", \"app.kubernetes.io/instance\":\"velero-sample\", \"app.kubernetes.io/managed-by\":\"oadp-operator\", \"app.kubernetes.io/name\":\"velero\", \"component\":\"velero\", \"deploy\":\"velero\", \"openshift.io/oadp\":\"True\"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
/root/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.10.3/pkg/internal/controller/controller.go:227

kaovilai added a commit to kaovilai/oadp-operator that referenced this pull request May 10, 2022
commit e57aade
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Tue May 10 17:12:39 2022 -0400

    return err from Delete

commit ed53505
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Tue May 10 17:04:38 2022 -0400

    mitigate immutable selector update with recreate

commit 32d3faa
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Tue May 10 15:49:19 2022 -0400

    pod -> pods

commit 2870858
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Mon May 9 15:34:24 2022 -0400

    add catalog-build-replaces

commit a0ecefd
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Fri May 6 09:46:16 2022 -0400

    go fmt from make test

commit c0dc1a6
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Fri May 6 09:43:40 2022 -0400

    clean up restic config nil condition

commit d2724b8
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Fri May 6 09:26:54 2022 -0400

    return from customizeResticDaemonset early if config is nil

commit 04cdb7c
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Fri May 6 09:26:15 2022 -0400

    remove cmp from velero_test

commit c8744cd
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Fri May 6 01:46:21 2022 -0400

    add unit test for proxy

commit 4350a91
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Thu May 5 23:13:03 2022 -0400

    go mod tidy

commit 6cc6dd2
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Thu May 5 23:12:56 2022 -0400

    don't override matchlabels

commit 0a34837
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Thu May 5 22:27:30 2022 -0400

    move comment

commit c2b6754
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Thu May 5 22:18:32 2022 -0400

    go fmt

commit 3ef486a
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Thu May 5 22:18:23 2022 -0400

    label struct comment, make bundle, deepcopy

commit 4936b44
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Thu May 5 22:09:08 2022 -0400

    Add labels to podConfig of restic and velero

commit b7f04ad
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Thu May 5 21:26:54 2022 -0400

    err update

commit da84c27
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Thu May 5 21:22:53 2022 -0400

    AppendUniqueKeyStringOfStringMaps handle nil sandwich

commit f026cb5
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Thu May 5 21:13:58 2022 -0400

    deploy pod label is back

commit 4b237d6
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Thu May 5 20:53:38 2022 -0400

    bring back `deploy: velero` label to velero pods
@kaovilai
Copy link
Member Author

/retest

@openshift-ci
Copy link

openshift-ci bot commented May 11, 2022

@kaovilai: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@dymurray dymurray merged commit 0a89666 into openshift:master May 11, 2022
dymurray pushed a commit that referenced this pull request May 11, 2022
* Squashed commit from #668 of the following:

commit e57aade
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Tue May 10 17:12:39 2022 -0400

    return err from Delete

commit ed53505
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Tue May 10 17:04:38 2022 -0400

    mitigate immutable selector update with recreate

commit 32d3faa
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Tue May 10 15:49:19 2022 -0400

    pod -> pods

commit 2870858
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Mon May 9 15:34:24 2022 -0400

    add catalog-build-replaces

commit a0ecefd
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Fri May 6 09:46:16 2022 -0400

    go fmt from make test

commit c0dc1a6
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Fri May 6 09:43:40 2022 -0400

    clean up restic config nil condition

commit d2724b8
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Fri May 6 09:26:54 2022 -0400

    return from customizeResticDaemonset early if config is nil

commit 04cdb7c
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Fri May 6 09:26:15 2022 -0400

    remove cmp from velero_test

commit c8744cd
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Fri May 6 01:46:21 2022 -0400

    add unit test for proxy

commit 4350a91
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Thu May 5 23:13:03 2022 -0400

    go mod tidy

commit 6cc6dd2
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Thu May 5 23:12:56 2022 -0400

    don't override matchlabels

commit 0a34837
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Thu May 5 22:27:30 2022 -0400

    move comment

commit c2b6754
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Thu May 5 22:18:32 2022 -0400

    go fmt

commit 3ef486a
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Thu May 5 22:18:23 2022 -0400

    label struct comment, make bundle, deepcopy

commit 4936b44
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Thu May 5 22:09:08 2022 -0400

    Add labels to podConfig of restic and velero

commit b7f04ad
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Thu May 5 21:26:54 2022 -0400

    err update

commit da84c27
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Thu May 5 21:22:53 2022 -0400

    AppendUniqueKeyStringOfStringMaps handle nil sandwich

commit f026cb5
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Thu May 5 21:13:58 2022 -0400

    deploy pod label is back

commit 4b237d6
Author: Tiger Kaovilai <tkaovila@redhat.com>
Date:   Thu May 5 20:53:38 2022 -0400

    bring back `deploy: velero` label to velero pods

* go mod tidy
@kaovilai kaovilai removed the request for review from sseago May 12, 2022 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants