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

Add management support for the multicluster-observability-operator #53

Merged
merged 6 commits into from
Jun 12, 2024

Conversation

periklis
Copy link
Collaborator

@periklis periklis commented Jun 4, 2024

The following PR prepares the addon to be managed by the multicluster-observability-operator. Two major changes are implemented:

  • Support the proposed platform/user-workloads observability capabilities as key-values in the AddonDeploymentConfig.
  • Use as a default deployment namespace open-cluster-management-observability

Furthermore the proposed implementation adds validation support in the logging handler for:

  • Validate that at least one ClusterLogForwarder pipeline includes infrastructure and/or audit input reference when platformLogsCollection set.
  • Validate that at least one ClusterLogForwarder pipeline includes application input reference when userWorkloadLogsCollection set.

The above implementations are not comprehensive but illustrative on how the capabilities defined in the AddonDeploymentConfig can be used within the addon.

@coveralls
Copy link

coveralls commented Jun 4, 2024

Pull Request Test Coverage Report for Build 9464617973

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 46 of 91 (50.55%) changed or added relevant lines in 3 files are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-5.2%) to 57.735%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/addon/helm/values.go 6 10 60.0%
internal/logging/manifests/logging.go 40 47 85.11%
internal/addon/options.go 0 34 0.0%
Files with Coverage Reduction New Missed Lines %
internal/addon/helm/values.go 5 45.76%
Totals Coverage Status
Change from base Build 9448258369: -5.2%
Covered Lines: 209
Relevant Lines: 362

💛 - Coveralls

@periklis periklis marked this pull request as ready for review June 4, 2024 09:34
@periklis periklis requested review from a team as code owners June 4, 2024 09:34
Copy link
Contributor

@iblancasa iblancasa left a comment

Choose a reason for hiding this comment

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

Before merging this PR, we need to address some of the comments/questions/concerns that were made in the proposal.

Also, if I understood well, there is a meeting soon that can change the proposal.

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Show resolved Hide resolved
Copy link
Member

@pavolloffay pavolloffay left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together and moving from the proposal. I would like to clarify the AddOnDeploymentConfig and how multiple options of the same capability are supported.

Copy link
Collaborator

@JoaoBraveCoding JoaoBraveCoding left a comment

Choose a reason for hiding this comment

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

Overall lgtm

CONTRIBUTING.md Outdated Show resolved Hide resolved
internal/addon/helm/values.go Outdated Show resolved Hide resolved
@periklis
Copy link
Collaborator Author

periklis commented Jun 6, 2024

Thanks for putting this together and moving from the proposal. I would like to clarify the AddOnDeploymentConfig and how multiple options of the same capability are supported.

The use of multiple values in an AddOnDeploymentConfig will look like this, e.g.:

customizedVariables:
  - name: userWorkloadLogsCollection
    value: clusterlogforwarders.v1.logging.openshift.io;opentelemetrycollectors.v1beta1.opentelemetry.io

translates in the options.go handling to:

case KeyUserWorkloadLogsCollection:
  if keyvalue.Value == string(ClusterLogForwarderV1) {
	  opts.UserWorkloads.Enabled = true
	  opts.UserWorkloads.Logs.CollectionEnabled = true
	  opts.UserWorkloads.Logs.Kinds = append(opts.UserWorkloads.Logs.Kinds, ClusterLogForwarderV1)
  }
  if keyvalue.Value == string(OpenTelemetryCollectorV1beta1) {
	  opts.UserWorkloads.Enabled = true
	  opts.UserWorkloads.Logs.CollectionEnabled = true
	  opts.UserWorkloads.Logs.Kinds = append(opts.UserWorkloads.Logs.Kinds, OpenTelemetryCollectorV1beta1)
  }					

Note: This is just pseudo-code and not meant to be implemented in this PR yet. I am leaving the room open for you guys to add support for multiple values when you are ready with each signal. WDYT?

Copy link
Member

@pavolloffay pavolloffay left a comment

Choose a reason for hiding this comment

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

LGTM (after we clarified

CONTRIBUTING.md Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
internal/addon/helm/values_test.go Show resolved Hide resolved
@periklis periklis merged commit 0bd1872 into main Jun 12, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants