This repository has been archived by the owner on Jun 12, 2023. It is now read-only.
Implement upgrade path for SSP operator #186
Merged
omeryahud
merged 1 commit into
kubevirt:master
from
omeryahud:take-resource-ownership-during-upgrade
Jun 24, 2020
Merged
Implement upgrade path for SSP operator #186
omeryahud
merged 1 commit into
kubevirt:master
from
omeryahud:take-resource-ownership-during-upgrade
Jun 24, 2020
Conversation
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
MarSik
suggested changes
Jun 11, 2020
omeryahud
force-pushed
the
take-resource-ownership-during-upgrade
branch
from
June 16, 2020 14:28
c1716d1
to
a0354b3
Compare
MarSik
reviewed
Jun 17, 2020
MarSik
reviewed
Jun 17, 2020
MarSik
reviewed
Jun 17, 2020
MarSik
reviewed
Jun 17, 2020
omeryahud
changed the title
Take resource ownership during upgrade
Implement upgrade path for SSP operator
Jun 22, 2020
omeryahud
force-pushed
the
take-resource-ownership-during-upgrade
branch
from
June 23, 2020 07:16
9efe7aa
to
3f8b840
Compare
Can you squash related commits together, so that each commit makes sense on its own? It would be easier to review and look better in the history. |
omeryahud
force-pushed
the
take-resource-ownership-during-upgrade
branch
3 times, most recently
from
June 23, 2020 12:39
3474a55
to
cc50066
Compare
MarSik
reviewed
Jun 23, 2020
deployed_templates_after: "{{ lookup('k8s', api_version=ct_status.results[0].result.apiVersion, kind='template', label_selector=label)|length }}" | ||
deployed_templates_after: "{{ lookup('k8s', api_version=ct_status.results[0].result.apiVersion, kind='template', label_selector=label) | length }}" | ||
|
||
- name: "Set Progressing status" |
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.
You do not need the facts here anymore as you do not use them
…on would cause duplicate CRDs due to a change to the CRDs api group: $ oc get crds | grep "aggre\|labeller\|validator\|common" kubevirtcommontemplatesbundles.kubevirt.io 2020-06-03T14:07:02Z kubevirtcommontemplatesbundles.ssp.kubevirt.io 2020-06-04T10:26:17Z kubevirtmetricsaggregations.kubevirt.io 2020-06-03T14:07:02Z kubevirtmetricsaggregations.ssp.kubevirt.io 2020-06-04T10:26:17Z kubevirtnodelabellerbundles.kubevirt.io 2020-06-03T14:07:02Z kubevirtnodelabellerbundles.ssp.kubevirt.io 2020-06-04T10:26:17Z kubevirttemplatevalidators.kubevirt.io 2020-06-03T14:07:02Z kubevirttemplatevalidators.ssp.kubevirt.io 2020-06-04T10:26:17Z This PR is introducing the following changes: The operator now manages the CRs in the ssp.kubevirt.io group only. When the operator is deployed and reconciling starts, if any resources exist from a previous installation, the operator will take ownership of them. For example, KubevirtTemplateValidator.ssp.kubevirt.io will take ownership of all resources created by KubevirtTemplateValidator.kubevirt.io, if it existed The following status fields are added to the CR to indicate a successful upgrade: status: operatorVersion: "v1.0.36" targetVersion: "v1.0.36" observedVersion: "" operatorVersion - States the version of the deployed operator targetVersion - States the desired version of deployed resources observedVersion - States the version of currently deployed resources An upgrade is complete when the Available condition is True, and when targetVersion == observedVersion. Signed-off-by: Omer Yahud <oyahud@redhat.com>
omeryahud
force-pushed
the
take-resource-ownership-during-upgrade
branch
from
June 23, 2020 14:27
cc50066
to
b2c14a7
Compare
MarSik
approved these changes
Jun 23, 2020
omeryahud
added a commit
to omeryahud/MarSik-kubevirt-ssp-operator
that referenced
this pull request
Jun 24, 2020
Signed-off-by: Omer Yahud <oyahud@redhat.com>
omeryahud
added a commit
to omeryahud/MarSik-kubevirt-ssp-operator
that referenced
this pull request
Jun 24, 2020
…p-during-upgrade Implement upgrade path for SSP operator
ksimon1
added a commit
that referenced
this pull request
Jun 24, 2020
[Backport] Merge pull request #186 - Operator upgrade path
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
An upgrade of the SSP operator from versions 1.0.22 to a higher version would cause duplicate CRDs due to a change to the CRDs api group:
This PR is introducing the following changes:
The operator now manages the CRs in the
ssp.kubevirt.io
group only.When the operator is deployed and reconciling starts, if any resources exist from a previous installation, the operator will take ownership of them. For example,
KubevirtTemplateValidator.ssp.kubevirt.io
will take ownership of all resources created byKubevirtTemplateValidator.kubevirt.io
, if it existedThe following
status
fields are added to the CR to indicate a successful upgrade:operatorVersion
- States the version of the deployed operatortargetVersion
- States the desired version of deployed resourcesobservedVersion
- States the version of currently deployed resourcesAn upgrade is complete when the
Available
condition isTrue
, and whentargetVersion
==observedVersion
.