|
1 | 1 | # Developing Prometheus Federator
|
2 | 2 |
|
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. |
6 | 7 |
|
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. |
8 | 9 |
|
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`. |
14 | 12 |
|
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. |
23 | 14 |
|
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 |
30 | 16 |
|
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. |
34 | 19 | ##
|
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. |
50 | 34 | docs/
|
51 | 35 |
|
52 | 36 | ## This directory contains an example ProjectHelmChart that can be deployed to create an example Project Monitoring Stack
|
53 | 37 | ## Note: the namespace needs to be modified to be a valid Project Registration Namespace, depending on how you deployed the operator.
|
54 | 38 | examples/
|
55 | 39 |
|
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 |
57 | 48 | package/
|
58 |
| - Dockerfile |
| 49 | + Dockerfile-helm-locker |
| 50 | + Dockerfile-helm-project-operator |
| 51 | + Dockerfile-prometheus-federator |
| 52 | +``` |
59 | 53 |
|
60 |
| -## The main entrypoint into Prometheus Federator that implements Helm Project Operator. |
61 |
| -main.go |
| 54 | +--- |
62 | 55 |
|
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. |
66 | 57 |
|
67 | 58 | ## Making changes to the Helm Charts (`packages/`)
|
68 | 59 |
|
|
0 commit comments