Skip to content

MON-3902: add initial Monitoring CRD api#1929

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:masterfrom
marioferh:initial_cmo_api
Dec 22, 2024
Merged

MON-3902: add initial Monitoring CRD api#1929
openshift-merge-bot[bot] merged 1 commit into
openshift:masterfrom
marioferh:initial_cmo_api

Conversation

@marioferh

@marioferh marioferh commented Jun 12, 2024

Copy link
Copy Markdown
Contributor

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
@openshift-ci

openshift-ci Bot commented Jun 12, 2024

Copy link
Copy Markdown
Contributor

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

@openshift-ci

openshift-ci Bot commented Jun 12, 2024

Copy link
Copy Markdown
Contributor

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
Comment thread config/v1/types_cmo.go Outdated
@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

openshift-ci-robot commented Jun 12, 2024

Copy link
Copy Markdown

@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.

Details

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
Comment thread config/v1/types_cmo.go Outdated
@marioferh marioferh changed the title MON-3902: add initial ClusterMonitoring CRD api MON-3902: add initial Monitoring CRD api Jun 18, 2024
Comment thread config/v1/types_monitoring.go Outdated
Comment thread config/v1/types_monitoring.go Outdated
Comment thread config/v1/types_monitoring.go Outdated
Comment thread config/v1/types_monitoring.go Outdated
Comment thread config/v1/types_monitoring.go Outdated
@marioferh

Copy link
Copy Markdown
Contributor Author

/retest-required

@JoelSpeed

Copy link
Copy Markdown
Contributor

/test e2e-upgrade-minor

@marioferh

Copy link
Copy Markdown
Contributor Author

/retest-required

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

Copy link
Copy Markdown
Contributor

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.

Comment thread config/v1/types_cluster_monitoring.go Outdated
Comment thread config/v1/types_cluster_monitoring.go
Comment thread config/v1/types_cluster_monitoring.go Outdated
Comment thread config/v1/types_cluster_monitoring.go Outdated
Comment thread config/v1/types_cluster_monitoring.go Outdated
Comment thread config/v1/types_cluster_monitoring.go Outdated
Comment thread config/v1/types_cluster_monitoring.go Outdated
Comment thread config/v1/types_cluster_monitoring.go Outdated
Comment thread config/v1/types_cluster_monitoring.go Outdated
Comment thread config/v1/types_cluster_monitoring.go

@JoelSpeed JoelSpeed left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

Comment thread config/v1/types_cluster_monitoring.go
Comment thread config/v1/types_cluster_monitoring.go Outdated
Comment thread config/v1/types_cluster_monitoring.go
@marioferh

Copy link
Copy Markdown
Contributor Author

/retest

@JoelSpeed

Copy link
Copy Markdown
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"`
	^

@JoelSpeed JoelSpeed left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread config/v1/types_cluster_monitoring.go Outdated
Comment thread config/v1/types_cluster_monitoring.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
Copy Markdown
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
Copy Markdown
Contributor

/test lint

@marioferh

Copy link
Copy Markdown
Contributor Author

/retest-required

@marioferh

Copy link
Copy Markdown
Contributor Author

/test okd-scos-e2e-aws-ovn

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

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

/lgtm

@openshift-ci

openshift-ci Bot commented Dec 19, 2024

Copy link
Copy Markdown
Contributor

[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

Details 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
Copy Markdown
Contributor Author

/retest-required

@JoelSpeed

Copy link
Copy Markdown
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
Copy Markdown

/retest-required

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

@marioferh

Copy link
Copy Markdown
Contributor Author

/retest

@openshift-merge-bot
openshift-merge-bot Bot merged commit 188620a into openshift:master Dec 22, 2024
@openshift-bot

Copy link
Copy Markdown

[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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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