Skip to content

Commit

Permalink
chore: updates README.md and removes outdated demo (#61)
Browse files Browse the repository at this point in the history
* Updates README.md and removes outdated demo

* address review comments

* docs: improve documentation on testing assets

* Apply suggestions from code review

Co-authored-by: Israel Blancas <[email protected]>

---------

Co-authored-by: Israel Blancas <[email protected]>
  • Loading branch information
JoaoBraveCoding and iblancasa authored Aug 30, 2024
1 parent 3e5d6f7 commit 89ac8d1
Show file tree
Hide file tree
Showing 41 changed files with 85 additions and 2,651 deletions.
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,19 @@ templated with the stanza created in the hub cluster. The instance deployed in
the spoke cluster will have an exact copy of the `Spec` from the stanza.

This MCOA supports all components defined in [OpenShift Documentation](https://docs.openshift.com/container-platform/latest/observability/otel/otel-configuration-of-otel-collector.html#otel-collector-components_otel-configuration-of-otel-collector). Furthermore, since MCOA will simply ship the specified secrets together with `OpenTelemetryCollector` MCOA is also able to support all authentication methods supported by `OpenTelemetryCollector`.

### Test files

Under the `hack` folder there are resources for helping manually testing the operator. For instance, there is a helm chart named `addon-install` for installing the necessary resources for the common use addon use-case. You can install that chart by running:

```shell
helm -n default upgrade --install addon-install hack/addon-install/
```

Note: Be sure to fill in the `values.yaml` file to configure the resources propperly otherwise you might endup with an installtion that doesn't actually work.

If you modify the chart you can the run the same command to apply the new version to the cluster. To clean up you can run the following:

```shell
helm -n default uninstall addon-install
```
83 changes: 64 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ based on the extensibility provided by
[addon-framework](https://github.com/open-cluster-management-io/addon-framework)
which automates the collection and forwarding of observability signals to central stores.

This is acheived through the installation on the spoke clusters of dedicated operators for each observability signal:
This is achieved through the installation of the spoke clusters of dedicated operators for each observability signal:

- For Metrics the addon will deploy an instance of Prometheus running in agent mode, that will forward metrics to the hub.
- Metrics are not supported by this addon. To manage metrics, use the [multicluster-observability-operator](https://github.com/stolostron/multicluster-observability-operator).

- For Logs the operator installed will be [cluster-logging-operator](https://docs.openshift.com/container-platform/latest/logging/cluster-logging.html). The addon will also configure an instance of [ClusterLogForwarder](https://docs.openshift.com/container-platform/latest/logging/log_collection_forwarding/configuring-log-forwarding.html) to forward logs to a configured store.

Expand All @@ -24,30 +24,75 @@ The logging-ocm-addon consists of one component:
### Prerequisite

- OCM registration (>= 0.5.0)
- cert-manager operator
- multicluster-observability-operator (for metrics)

### Steps

#### Installing via Kustomize

1. Install the AddOn using Kustomize

```shell
$ kubectl apply -k deploy/
```

2. The addon should now be installed in you hub cluster
```shell
$ kubectl get ClusterManagementAddOn multicluster-observability-addon
```

3. The addon can now be installed it managed clusters by creating `ManagedClusterAddOn` resources in their respective namespaces

## Demo

Steps to deploy a demo of the addon can be found at [demo/README.md](https://github.com/rhobs/multicluster-observability-addon/tree/main/demo#readme)
```shell
make install-crds
kubectl apply -k deploy/
```

1. The addon should now be installed in you hub cluster

```shell
kubectl get ClusterManagementAddOn multicluster-observability-addon
```

1. The addon will install automatically in spoke clusters once the resources referenced in `ClusterManagementAddOn` are created.

#### Installing via MCO

In 2.12, multicluster-observability-operator has the ability to install MCOA using the [capabilities field](https://github.com/stolostron/multicluster-observability-operator/blob/5d1fc789df365b20951b5fe1c378b5eebb306390/operators/multiclusterobservability/api/v1beta2/multiclusterobservability_types.go#L187-L212).

1. Create a `MultiClusterObservability` resource and configure `capabilities`

```yaml
apiVersion: observability.open-cluster-management.io/v1beta2
kind: MultiClusterObservability
metadata:
name: observability
spec:
capabilities:
platform:
logs:
collection:
enabled: true
userWorkloads:
logs:
collection:
clusterLogForwarder:
enabled: true
traces:
collection:
instrumentation:
enabled: true
openTelemetryCollector:
enabled: false
observabilityAddonSpec: {}
storageConfig:
metricObjectStorage:
name: thanos-object-storage
key: thanos.yaml
```

Note: Deploy a custom image by adding the annotation: `mco-multicluster_observability_addon-image: quay.io/YOUR_ORG_HERE/multicluster-observability-addon:YOUR_TAG_HERE`

1. The addon should now be installed in you hub cluster

```shell
kubectl get ClusterManagementAddOn multicluster-observability-addon
```

1. The addon will install automatically in spoke clusters once the resources referenced in `ClusterManagementAddOn` are created.

## References

- Addon-Framework: [https://github.com/open-cluster-management-io/addon-framework](https://github.com/open-cluster-management-io/addon-framework)
- Open-Cluster-Management: [https://github.com/open-cluster-management-io/ocm](https://github.com/open-cluster-management-io/ocm)
- Addon-Framework: [https://github.com/open-cluster-management-io/addon-framework](https://github.com/open-cluster-management-io/addon-framework)
- Multicluster-Observability-Operator: [https://github.com/stolostron/multicluster-observability-operator](https://github.com/stolostron/multicluster-observability-operator)
- Cluster-Logging-Operator: [https://github.com/openshift/cluster-logging-operator](https://github.com/openshift/cluster-logging-operator)
- OpenTelemetry-Operator: [https://github.com/open-telemetry/opentelemetry-operator](https://github.com/open-telemetry/opentelemetry-operator)
61 changes: 0 additions & 61 deletions demo/README.md

This file was deleted.

13 changes: 0 additions & 13 deletions demo/addon-config/Chart.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions demo/addon-config/charts/logging/Chart.yaml

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions demo/addon-config/charts/logging/values.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions demo/addon-config/charts/tracing/Chart.yaml

This file was deleted.

27 changes: 0 additions & 27 deletions demo/addon-config/charts/tracing/templates/otel-collector.yaml

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion demo/addon-config/charts/tracing/values.yaml

This file was deleted.

22 changes: 0 additions & 22 deletions demo/addon-config/values.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions demo/addon-install/Chart.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions demo/addon-install/templates/logging-url-configmap.yaml

This file was deleted.

Loading

0 comments on commit 89ac8d1

Please sign in to comment.