Skip to content

Commit 3686267

Browse files
committed
Update docs for new structure while we're here
1 parent 7df2b76 commit 3686267

File tree

2 files changed

+51
-50
lines changed

2 files changed

+51
-50
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,22 @@ For more information on ProjectHelmCharts and how to configure the underlying op
5050
For more information on how to configure the underlying Project Monitoring Stack, please read the [`README.md` of the underlying chart](packages/rancher-project-monitoring/charts/README.md) (`rancher-project-monitoring`).
5151

5252
## Developing
53+
For more information, see the [Developing guide](docs/prometheus-federator/developing.md).
5354

5455
### Which branch do I make changes on?
5556

56-
Prometheus Federator is built and released off the contents of the `main` branch. To make a contribution, open up a PR to the `main` branch.
57+
This depends on the component of Prometheus Federator you're seeing to modify.
58+
Here's a good guide:
5759

58-
For more information, see the [Developing guide](docs/prometheus-federator/developing.md).
60+
- Prometheus Federator directly: Target the `main` branch by default, unless change is specific to a Rancher Minor.
61+
- Rancher Project Monitoring:
62+
1. Use the [rancher/ob-team-charts](https://github.com/rancher/ob-team-charts) repo `main` branch,
63+
2. After chart updated in `ob-team-charts`, update `build.yaml` version on your target branch (likely main, then backport)
64+
65+
### How do I know what version of Rancher Project Monitoring is used?
66+
There are a few options depending on where you're working.
67+
For compiled binaries, you can use the `debug-chart` command to dump the static chart.
68+
Or, you can check `build.yaml` on the target branch/tag you're curious about.
5969

6070
## Building
6171

docs/prometheus-federator/developing.md

Lines changed: 39 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,59 @@
11
# Developing Prometheus Federator
22

3-
The Prometheus Federator repository is primarily comprised of just two things:
4-
- A simple `main.go` that implements [Helm Project Operator](https://github.com/rancher/helm-project-operator) for the [`rancher-project-monitoring` chart](charts/rancher-project-monitoring)
5-
- A `packages/` directory that corresponds to a [`rancher/charts-build-scripts`](https://github.com/rancher/charts-build-scripts) repository
3+
The Prometheus Federator project is primarily composed of two components:
4+
- The golang code that implements a [Helm Project Operator](../../cmd/helm-project-operator/README.md), and
5+
- The charts used for `rancher-project-monitoring` which are ultimately based on `rancher-monitoring`
6+
- This component heavily relies on [`rancher/charts-build-scripts`](https://github.com/rancher/charts-build-scripts) and mimics a smaller `rancher/charts` for O&B team.
67

7-
In **most** circumstances, you will only ever have to make changes to the `packages/` directory; if you need to make changes to the underlying code of the operator that is deployed, it is likely that you intend to make this change in [rancher/helm-project-operator](https://github.com/rancher/helm-project-operator) instead.
8+
The golang half can be found here in this repo and the Charts half in our [rancher/ob-team-charts](https://github.com/rancher/ob-team-charts) repo.
89

9-
## Repository Structure
10-
11-
```bash
12-
## This directory is a [`rancher/charts-build-scripts`](https://github.com/rancher/charts-build-scripts) packages directory. See below for more details.
13-
packages/
10+
In **most** circumstances, you will primarily make changes to the charts half and work in [rancher/ob-team-charts](https://github.com/rancher/ob-team-charts) repo first.
11+
Then, after that bump versions here in `build.yaml` and create your RC/alpha release after that. Finally, you can land that change in `rancher/charts`.
1412

15-
## This directory contains **auto-generated** Helm chart archives that can be used to deploy Prometheus Federator in a Kubernetes cluster in
16-
## the cattle-monitoring-system namespace, which deploys rancher-project-monitoring (located under charts/rancher-project-monitoring)
17-
## on seeing a ProjectHelmChart with spec.helmApiVersion: monitoring.cattle.io/v1alpha1.
18-
##
19-
## IMPORTANT: You should never modify the contents of this directory directly; you should always modify `packages` since that will
20-
## overwrite the changes that are observed in this directory on running a `make charts`.
21-
##
22-
assets/
13+
When you want to make changes to Prometheus Federator directly you do not need to interact with [rancher/ob-team-charts](https://github.com/rancher/ob-team-charts) repo.
2314

24-
## This file is an **auto-generated** Helm index.yaml identifying this repository as a valid Helm repository that contains Helm charts.
25-
##
26-
## IMPORTANT: You should never modify the contents of this file directly; you should always modify `packages` since that will
27-
## overwrite the changes that are observed in this directory on running a `make charts` or `make index`.
28-
##
29-
index.yaml
15+
## Repository Structure
3016

31-
## This directory contains **auto-generated** Helm charts that can be used to deploy Prometheus Federator in a Kubernetes cluster in
32-
## the cattle-monitoring-system namespace, which deploys rancher-project-monitoring (located under charts/rancher-project-monitoring)
33-
## on seeing a ProjectHelmChart with spec.helmApiVersion: monitoring.cattle.io/v1alpha1.
17+
```bash
18+
## This directory contains the source chart for the Prometheus Federator chart.
3419
##
35-
## IMPORTANT: You should never modify the contents of this directory directly; you should always modify `packages` since that will
36-
## overwrite the changes that are observed in this directory on running a `make charts`.
37-
charts/
38-
39-
## The main chart that deploys Prometheus Federator in the cluster.
40-
prometheus-federator/*
41-
42-
## A chart based on https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack that deploys a Project
43-
## Monitoring Stack onto the cluster on seeing a valid ProjectHelmChart (which means that it is contained within a Project Registration Namespace
44-
## with spec.helmApiVersion set to monitoring.cattle.io/v1alpha1)
45-
##
46-
## This chart is not expected to ever be deployed standalone; it is embedded into the Prometheus Federator binary itself.
47-
rancher-project-monitoring/*
48-
49-
## This directory will contain additional docs to assist users in getting started with using Helm Project Operator.
20+
## At build time it is used as a template to generate a 1:1 release chart to the image tag.
21+
## If you modify the Prometheus Federator chart you should consider if it needs to be back ported from `main` to other release branches.
22+
charts/prometheus-federator
23+
24+
## This directory contains all CLI entry points of the Prometheus Federator (and internal projects)
25+
cmd/
26+
## The directory contains the helm-locker cli entrypoint used by devs.
27+
helm-locker
28+
## The directory contains the helm-project-operator cli entrypoint used by devs.
29+
helm-project-operator
30+
## The directory contains the prometheus-federator cli entrypoint
31+
prometheus-federator
32+
33+
## This directory will contain additional docs to assist users in getting started with using Prometheus Federator.
5034
docs/
5135

5236
## This directory contains an example ProjectHelmChart that can be deployed to create an example Project Monitoring Stack
5337
## Note: the namespace needs to be modified to be a valid Project Registration Namespace, depending on how you deployed the operator.
5438
examples/
5539

56-
## This directory contains the image that is used to build rancher/helm-project-operator, which is hosted on hub.docker.com.
40+
## This directory contains all the internal code used by Prometheus Federator
41+
internal/
42+
## The directory contains the helm-locker internal project code.
43+
helm-locker
44+
## The directory contains the helm-project-operator internal project code.
45+
helm-project-operator
46+
47+
## This directory contains Dockerfile* to produce images for Prod and Dev
5748
package/
58-
Dockerfile
49+
Dockerfile-helm-locker
50+
Dockerfile-helm-project-operator
51+
Dockerfile-prometheus-federator
52+
```
5953

60-
## The main entrypoint into Prometheus Federator that implements Helm Project Operator.
61-
main.go
54+
---
6255

63-
## The Dockerfile used to run CI and other scripts executed by make in a Docker container (powered by https://github.com/rancher/dapper)
64-
Dockerfile.dapper
65-
```
56+
> TODO: Migrate the following content to [rancher/ob-team-charts](https://github.com/rancher/ob-team-charts) repo.
6657
6758
## Making changes to the Helm Charts (`packages/`)
6859

0 commit comments

Comments
 (0)