-
Notifications
You must be signed in to change notification settings - Fork 149
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
Update HCO code struct to match recent operator-sdk layouts #1670
Update HCO code struct to match recent operator-sdk layouts #1670
Conversation
Makefile
Outdated
@@ -205,6 +205,9 @@ deploy_cr: | |||
validate-no-offensive-lang: | |||
./hack/validate-no-offensive-lang.sh | |||
|
|||
generate: |
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.
Task to create deepcopy, defaults and openapi code
@@ -0,0 +1,19 @@ | |||
domain: kubevirt.io |
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.
operator-sdk project metadata information
api/v1beta1/hyperconverged_types.go
Outdated
@@ -338,6 +338,7 @@ type HyperConvergedWorkloadUpdateStrategy struct { | |||
// +k8s:openapi-gen=true | |||
type HyperConvergedStatus struct { | |||
// Conditions describes the state of the HyperConverged resource. | |||
// +listType=map |
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.
openapi-gen
to create theOpenAPIDefinitions code was failing because slice types didn't have a listType
defined for conversion
api/v1beta1/hyperconverged_types.go
Outdated
@@ -346,6 +347,7 @@ type HyperConvergedStatus struct { | |||
// RelatedObjects is a list of objects created and maintained by this | |||
// operator. Object references will be added to this list after they have | |||
// been created AND found in the cluster. | |||
// +listType=set |
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.
same as Comment#r772302134
@@ -235,8 +235,8 @@ EOM | |||
|
|||
# Write HCO CRDs | |||
(cd ${PROJECT_ROOT}/tools/csv-merger/ && go build) | |||
hco_crds=${TEMPDIR}/hco.crds.yaml | |||
(cd ${PROJECT_ROOT} && ${PROJECT_ROOT}/tools/csv-merger/csv-merger --api-sources=${PROJECT_ROOT}/pkg/apis/... --output-mode=CRDs > $hco_crds) | |||
hco_crds=${PROJECT_ROOT}/config/crd/bases/hco.kubevirt.io_hyperconvergeds.yaml |
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.
This was changed to keep the new layout config folder updated with the new generated HCO CRDs
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Pull Request Test Coverage Report for Build 1986387280
💛 - Coveralls |
/retest |
7bce664
to
4071f7f
Compare
/hold |
10238b9
to
c010218
Compare
/retest |
9b0e621
to
54fc419
Compare
/retest |
/unhold |
hco-e2e-upgrade-prev-index-aws lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-prev-index-azure In response to this:
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. |
/retest |
@machadovilaca - please update hack/build-tests.go to run unit tests in the new location. I guess we'll need to run change it to run tests in pkg and controller directories. Currently the tests are running only in the pkg dir. |
okd-hco-e2e-image-index-gcp lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/okd-hco-e2e-image-index-aws In response to this:
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. |
hco-e2e-image-index-azure, hco-e2e-image-index-aws lanes succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-image-index-gcp In response to this:
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. |
hco-e2e-upgrade-prev-index-azure lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-prev-index-aws In response to this:
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. |
Signed-off-by: João Vilaça <jvilaca@redhat.com>
Signed-off-by: João Vilaça <jvilaca@redhat.com>
7bbc9ee
to
1a8aa1a
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
hco-e2e-image-index-sno-azure lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-image-index-sno-aws, ci/prow/hco-e2e-upgrade-index-sno-azure In response to this:
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. |
okd-hco-e2e-upgrade-index-gcp lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/okd-hco-e2e-upgrade-index-aws In response to this:
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. |
/retest |
@machadovilaca: The following tests failed, say
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. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tiraboschi 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 |
hco-e2e-upgrade-prev-index-aws lane succeeded. |
@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-prev-index-azure In response to this:
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. |
kubevirt/hyperconverged-cluster-operator#1670 restructured code struct to match up to date operator-sdk. Align run_if_changed directive for it.
The HCO started with an older version of the operator-sdk. Since then, the default project layout from the operator-sdk was changed and the HCO was never updated. That difference makes it harder to keep the project maintained.
This PR:
The new operator-sdk projects use kustomize as the helpers to more easily integrate your project with OLM
and the latest scorecard features. But still missing:
We can't fully leverage these helpers, since the
HyperConverged
CRD is programmatically generated to add new fields in components.go#L605.The use of these helpers with HCO is more complicated since it manages CRDS and OLM manifests for multiple components.
Reviewer Checklist
Release note: