Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

MON-3902: add initial Monitoring CRD api #1929

Merged
merged 1 commit into from
Dec 22, 2024

Conversation

marioferh
Copy link
Contributor

@marioferh marioferh commented Jun 12, 2024

Initial Implementation of Configuration CRD for the Cluster Monitoring Operator

Related: Enhancements Proposal [link]

As we have a FeatureGate, the idea is to implement component by component to verify the correct behavior and facilitate the reviews.

The API comes from https://github.com/openshift/cluster-monitoring-operator/blob/7015893ece5ed0a6f888fffe09b6d10a807d6901/pkg/manifests/config.go#L51

@marioferh marioferh marked this pull request as ready for review June 12, 2024 12:03
@marioferh marioferh changed the title WIP; add initial ClusterMonitoring CRD api WIP: add initial ClusterMonitoring CRD api Jun 12, 2024
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 12, 2024
Copy link
Contributor

openshift-ci bot commented Jun 12, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link
Contributor

openshift-ci bot commented Jun 12, 2024

Hello @marioferh! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@openshift-ci openshift-ci bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 12, 2024
@openshift-ci openshift-ci bot requested review from derekwaynecarr and knobunc June 12, 2024 12:06
@marioferh marioferh changed the title WIP: add initial ClusterMonitoring CRD api MON-3902: add initial ClusterMonitoring CRD api Jun 12, 2024
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 12, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 12, 2024

@marioferh: This pull request references MON-3902 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.17.0" version, but no target version was set.

In response to this:

Initial Implementation of Configuration CRD for the Cluster Monitoring Operator

Related: [link]

As we have a FeatureGate, the idea is to implement component by component to verify the correct behavior and facilitate the reviews.

The API comes from https://github.com/openshift/cluster-monitoring-operator/blob/7015893ece5ed0a6f888fffe09b6d10a807d6901/pkg/manifests/config.go#L51

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 12, 2024
@marioferh marioferh force-pushed the initial_cmo_api branch 3 times, most recently from 9603c29 to 9c70852 Compare June 12, 2024 17:14
@marioferh marioferh changed the title MON-3902: add initial ClusterMonitoring CRD api MON-3902: add initial Monitoring CRD api Jun 18, 2024
@marioferh
Copy link
Contributor Author

/retest-required

@JoelSpeed
Copy link
Contributor

/test e2e-upgrade-minor

@marioferh
Copy link
Contributor Author

/retest-required

Copy link
Contributor

@jan--f jan--f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes are needed here. I added a couple of suggestions as well. While we will go over this when things move to v1 once more in detail, it's worth getting details right from the get go too I think.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 20, 2024

@marioferh: This pull request references MON-3902 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target either version "4.18." or "openshift-4.18.", but it targets "openshift-4.17" instead.

In response to this:

Initial Implementation of Configuration CRD for the Cluster Monitoring Operator

Related: Enhancements Proposal [link]

As we have a FeatureGate, the idea is to implement component by component to verify the correct behavior and facilitate the reviews.

The API comes from https://github.com/openshift/cluster-monitoring-operator/blob/7015893ece5ed0a6f888fffe09b6d10a807d6901/pkg/manifests/config.go#L51

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 openshift-eng/jira-lifecycle-plugin repository.

Copy link
Contributor

@JoelSpeed JoelSpeed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review the linter issues and resolve those, in particular, lots of fields aren't marked either as optional or required, they will need to be updated.

Try make lint-fix to help where some issues can be auto-fixed

// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1929
// +openshift:file-pattern=cvoRunLevel=0000_10,operatorName=config-operator,operatorOrdering=01
// +kubebuilder:object:root=true
// +kubebuilder:resource:path=clustermonitoring,scope=Cluster
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so if I'm reading the last few comments correctly, we are happy to proceed with this design as is, and will create a new abstraction at the HostedCluster level for HCP relevant parts of monitoring the management side

@marioferh
Copy link
Contributor Author

/retest

@JoelSpeed
Copy link
Contributor

From the linter, these ones should be fixed. The first four WRT empty json tag is a bug that I'll fix this afternoon

config/v1/types_cluster_monitoring.go:63:2: optionalorrequired: field Items must be marked as optional or required (kal)
	Items []ClusterMonitoring `json:"items"`
	^
config/v1/types_cluster_monitoring.go:[45](https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_api/1929/pull-ci-openshift-api-master-lint/1868744969225768960#1:build-log.txt%3A45):2: requiredfields: field Spec is marked as required, but has the omitempty tag (kal)
	Spec ClusterMonitoringSpec `json:"spec,omitempty"`
	^
config/v1/types_cluster_monitoring.go:70:2: requiredfields: field UserDefined is marked as required, but has the omitempty tag (kal)
	UserDefined UserDefinedMonitoring `json:"userDefined,omitempty"`
	^
config/v1/types_cluster_monitoring.go:81:2: requiredfields: field Mode is marked as required, but has the omitempty tag (kal)
	Mode UserDefinedMode `json:"mode,omitempty"`
	^

Copy link
Contributor

@JoelSpeed JoelSpeed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of nits, plus the linter fixes and I think this is good to go

@marioferh marioferh force-pushed the initial_cmo_api branch 2 times, most recently from 5407e51 to a4ec8a2 Compare December 17, 2024 14:22
Add UserDefinedMonitoring
Add tests
Add FeatureGate
generate files

Signed-off-by: Mario Fernandez <mariofer@redhat.com>
@JoelSpeed
Copy link
Contributor

Changes LGTM, waiting on a linter fix to merge to verify a green lint, and then we can get this merged

In the mean time, will double check on EP updates

@JoelSpeed
Copy link
Contributor

/test lint

@marioferh
Copy link
Contributor Author

/retest-required

@marioferh
Copy link
Contributor Author

/test okd-scos-e2e-aws-ovn

Copy link
Contributor

@jan--f jan--f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 19, 2024
@JoelSpeed
Copy link
Contributor

/lgtm

Copy link
Contributor

openshift-ci bot commented Dec 19, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jan--f, JoelSpeed, marioferh

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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 19, 2024
@marioferh
Copy link
Contributor Author

/retest-required

@JoelSpeed
Copy link
Contributor

/label acknowledge-critical-fixes-only

This only affects the payload in adding a new techpreview CRD. @marioferh is continuing to work on this feature over shutdown, and not having this merged is a blocker for him. I believe this is sufficiently low enough risk to merge even under the critical fixes label

@openshift-ci openshift-ci bot added the acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label Dec 20, 2024
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD b88d067 and 2 for PR HEAD 80c3c40 in total

@marioferh
Copy link
Contributor Author

/retest

@openshift-merge-bot openshift-merge-bot bot merged commit 188620a into openshift:master Dec 22, 2024
20 of 21 checks passed
@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

Distgit: ose-cluster-config-api
This PR has been included in build ose-cluster-config-api-container-v4.19.0-202412230909.p0.g188620a.assembly.stream.el9.
All builds following this will include this PR.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants