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

Use job to install HyperShift operator #80

Merged
merged 2 commits into from
Sep 30, 2022

Conversation

philipwu08
Copy link
Contributor

@philipwu08 philipwu08 commented Sep 29, 2022

Signed-off-by: Philip Wu phwu@redhat.com

Description of the change(s):

  • A job is used to install the HyperShift operator. This container created from the job uses the HyperShift operator image specified in the imagestream, or the hypershift-override-images configmap if it exists. By using the HyperShift CLI from the target HyperShift operator image to install the HyperShift operator, all resources, including the CRDs, are upgraded to the level of the target HyperShift operator image.

Why do we need this PR:

  • The previous implementation uses the templates output from HyperShift render function to upgrade the HyperShift operator. The resource templates, including CRDs, are specific to the version of HyperShift bundled with the HyperShift agent addon. As a result, there may be a mismatch between the HyperShift resources from the render function, and the image of the upgraded HyperShift operator.

Issue reference:

Test API/Unit - Success

ok  	github.com/stolostron/hypershift-addon-operator/pkg/agent	23.044scoverage: 61.6% of statements
ok  	github.com/stolostron/hypershift-addon-operator/pkg/install	93.743scoverage: 83.9% of statements


Signed-off-by: Philip Wu <phwu@redhat.com>
Signed-off-by: Philip Wu <phwu@redhat.com>
@sonarcloud
Copy link

sonarcloud bot commented Sep 30, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

90.5% 90.5% Coverage
0.0% 0.0% Duplication

@openshift-ci
Copy link

openshift-ci bot commented Sep 30, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: philipwu08, rokej

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 47e349c into stolostron:main Sep 30, 2022
@philipwu08 philipwu08 deleted the update-hs-crd branch January 16, 2023 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants