Skip to content

Commit 494b91c

Browse files
Merge pull request #539 from anchore/PrometheusIntegration
Adding Prometheus to the Helm chart - Please see README.md for details
2 parents 1002fd5 + 3995ac0 commit 494b91c

File tree

13 files changed

+722
-5
lines changed

13 files changed

+722
-5
lines changed

.github/workflows/deploy.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
run: |
3737
helm repo add anchore https://charts.anchore.io/stable
3838
helm repo add bitnami https://charts.bitnami.com/bitnami
39+
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
3940
4041
- name: Run chart-releaser not latest
4142
if: github.event.pull_request.base.ref != 'main'

.github/workflows/openshift-test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ jobs:
122122
run: |
123123
helm repo add anchore https://charts.anchore.io || echo "anchore repo already added"
124124
helm repo add bitnami https://charts.bitnami.com/bitnami || echo "bitnami repo already added"
125+
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts || echo "prometheus-community repo already added"
125126
helm repo update
126127
127128
if [[ "${{ matrix.cluster.distribution }}" == "openshift" ]]; then

.github/workflows/test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ jobs:
101101
102102
helm repo add anchore https://charts.anchore.io || echo "anchore repo already added"
103103
helm repo add bitnami https://charts.bitnami.com/bitnami || echo "bitnami repo already added"
104+
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts || echo "prometheus-community repo already added"
104105
helm repo update
105106
helm install enterprise anchore/enterprise --namespace anchore -f stable/anchore-admission-controller/ci/enterprise-vals.yaml --wait
106107
kubectl --namespace anchore get pods

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ charts/
66
*.code-workspace
77
.DS_Store
88
.vscode/
9+
.env
10+
.envrc
11+
*.log
12+
MyValues*.yaml

ct-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ chart-dirs:
55
chart-repos:
66
- anchore=https://charts.anchore.io/stable
77
- bitnami=https://charts.bitnami.com/bitnami
8+
- prometheus-community=https://prometheus-community.github.io/helm-charts
89
namespace: anchore
910
release-label: anchore
1011
exclude-deprecated: true

stable/enterprise/Chart.lock

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@ dependencies:
55
- name: redis
66
repository: oci://registry-1.docker.io/bitnamicharts
77
version: 17.11.8
8-
digest: sha256:0ecd9810e416973f8bc4caa4641764b10ff5224edaecb1a5b66d3b1f82948537
9-
generated: "2024-08-15T22:30:42.63806-07:00"
8+
- name: prometheus
9+
repository: https://prometheus-community.github.io/helm-charts
10+
version: 27.30.0
11+
digest: sha256:2f9084f626cb172c0f0ce0c78b8597541e46fcfda3fdbec81860d60e2b61e4d3
12+
generated: "2025-08-11T10:13:49.8922-04:00"

stable/enterprise/Chart.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: enterprise
3-
version: "3.18.0"
3+
version: "3.19.0"
44
appVersion: "5.23.0"
55
kubeVersion: 1.23.x - 1.34.x || 1.23.x-x - 1.34.x-x
66
description: |
@@ -38,3 +38,8 @@ dependencies:
3838
repository: "oci://registry-1.docker.io/bitnamicharts"
3939
condition: ui-redis.chartEnabled
4040
alias: ui-redis
41+
- name: prometheus
42+
version: "~27.30.0"
43+
repository: "https://prometheus-community.github.io/helm-charts"
44+
condition: prometheus.chartEnabled
45+
alias: prometheus

stable/enterprise/README.md

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,52 @@ anchoreConfig:
418418
419419
For those using the [Prometheus operator](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/developer/getting-started.md), a ServiceMonitor can be deployed within the same namespace as your Anchore Enterprise release. Once deployed, the Prometheus operator will automatically begin scraping the pre-configured endpoints for metrics.
420420
421+
#### Prometheus Metrics Internal Scraping (Optional) - *Beta Feature*
422+
423+
**Note:** This feature is currently in **BETA**. More features, functionality, and support for this is planned.
424+
425+
Enabling this feature is optional. It provides a built-in Prometheus instance configured for monitoring Anchore Enterprise. It is setup to be internal only, scrape targets internally, and the intention is to provide service information and metrics for debugging and troubleshooting purposes. There is no ingress created for this Prometheus instance by default. There are also no dashboards or other human-friendly configurations set inside Prometheus since this iteration is intended to support automated tooling only, not direct human use.
426+
427+
**If you are looking to add Prometheus monitoring to your deployment for Operational purposes, it is recommended to use an external Prometheus instance and configure it to scrape the Anchore Enterprise services as shown above in the "Prometheus Metrics" section above.*
428+
429+
This chart uses the community Prometheus chart and sets up a ConfigMap containing a working `prometheus.yml` with a scalable scrape configuration for Anchore Enterprise and common Kubernetes targets automatically.
430+
431+
- Toggle with `prometheus.chartEnabled` (default: `false`).
432+
- You **MUST** enable the Anchore metrics endpoint as shown above for the Enterprise services to expose metrics.
433+
434+
**Example usage:**
435+
436+
Minimal example to enable metrics and the internal Prometheus:
437+
438+
```yaml
439+
anchoreConfig:
440+
metrics:
441+
enabled: true
442+
# Note: The current beta Prometheus implementation requires metrics to be unauthenticated.
443+
auth_disabled: true
444+
445+
prometheus:
446+
chartEnabled: true
447+
```
448+
449+
**Obtaining more detail by enabling the Node Exporter**
450+
451+
Additionally, adding the optional Node Exporter with this Prometheus deployment can provide additional node-level metrics for your Anchore Enterprise deployment.
452+
453+
Minimal example to enable metrics, the internal Prometheus, and the Node Exporter:
454+
455+
```yaml
456+
anchoreConfig:
457+
metrics:
458+
enabled: true
459+
# Note: The current beta Prometheus implementation requires metrics to be unauthenticated.
460+
auth_disabled: true
461+
prometheus:
462+
chartEnabled: true
463+
prometheus-node-exporter:
464+
enabled: true
465+
```
466+
421467
#### Example ServiceMonitor Configuration
422468
423469
The `targetPort` values in this example use the default Anchore Enterprise service ports.
@@ -1205,16 +1251,44 @@ To restore your deployment to using your previous driver configurations:
12051251
| `osaaMigrationJob.objectStoreMigration.object_store` | The configuration of the object_store for the dest-config.yaml | `{}` |
12061252
| `extraManifests` | List of additional manifests to be included in the chart | `[]` |
12071253
1254+
### Optional Prometheus Monitoring for Anchore Enterprise
1255+
1256+
| Name | Description | Value |
1257+
| -------------------------------------------------------- | ------------------------------------------------------------------------------------- | -------------------------------------- |
1258+
| `prometheus.chartEnabled` | Enable Prometheus monitoring for Anchore Enterprise | `false` |
1259+
| `prometheus.alertmanager.enabled` | Enable Alertmanager for alert management | `false` |
1260+
| `prometheus.server.retention` | Data retention period for Prometheus | `14d` |
1261+
| `prometheus.server.retentionSize` | Maximum storage size for Prometheus data | `12GB` |
1262+
| `prometheus.server.service.type` | Kubernetes service type for Prometheus | `ClusterIP` |
1263+
| `prometheus.server.persistentVolume.enabled` | Enable persistent storage for Prometheus | `true` |
1264+
| `prometheus.server.persistentVolume.size` | Storage size for Prometheus persistent volume | `40Gi` |
1265+
| `prometheus.prometheus-node-exporter.enabled` | Enable node-exporter for node metrics | `false` |
1266+
| `prometheus.kube-state-metrics.enabled` | Enable kube-state-metrics for cluster metrics | `true` |
1267+
| `prometheus.prometheus-pushgateway.enabled` | Enable pushgateway for custom metrics | `false` |
1268+
| `prometheus.server.name` | Name override for Prometheus server resources | `internal-anchore-prometheus-server` |
1269+
| `prometheus.server.configMapOverrideName` | Name of an existing ConfigMap to override the default Prometheus server configuration | `anchore-enterprise-prometheus-config` |
1270+
| `prometheus.server.extraFlags` | Additional Prometheus server flags (list). | `["web.enable-admin-api"]` |
1271+
| `prometheus.prometheus-node-exporter.nameOverride` | Base name for node-exporter resources (will be prefixed by release name) | `enterprise-prometheus-node-exporter` |
1272+
| `prometheus.prometheus-node-exporter.port` | Container port where node-exporter exposes metrics | `9120` |
1273+
| `prometheus.prometheus-node-exporter.service.name` | Service name for node-exporter | `enterprise-prometheus-node-exporter` |
1274+
| `prometheus.prometheus-node-exporter.service.port` | Service port for node-exporter | `9120` |
1275+
| `prometheus.prometheus-node-exporter.service.targetPort` | Target port on the node-exporter pod the Service forwards to | `9120` |
1276+
12081277
## Release Notes
12091278
12101279
For the latest updates and features in Anchore Enterprise, see the official [Release Notes](https://docs.anchore.com/current/docs/releasenotes/).
12111280
1281+
12121282
- **Major Chart Version Change (e.g., v0.1.2 -> v1.0.0)**: Signifies an incompatible breaking change that necessitates manual intervention, such as updates to your values file or data migrations.
12131283
- **Minor Chart Version Change (e.g., v0.1.2 -> v0.2.0)**: Indicates a significant change to the deployment that does not require manual intervention.
12141284
- **Patch Chart Version Change (e.g., v0.1.2 -> v0.1.3)**: Indicates a backwards-compatible bug fix or documentation update.
12151285
1286+
### v3.19.x
1287+
#### V3.19.0
1288+
- Adds an optional Prometheus monitoring setup to Anchore Enterprise for future internal monitoring and support
1289+
12161290
### V3.18.x
1217-
#### V3.17.0
1291+
#### V3.18.0
12181292
- Adds support for specifying custom init containers in deployments and jobs
12191293
12201294
### V3.17.x

0 commit comments

Comments
 (0)