Skip to content

Commit 8076741

Browse files
committedMar 1, 2025··
chore: correct gorelease config
Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
1 parent b77b61f commit 8076741

File tree

3 files changed

+73
-51
lines changed

3 files changed

+73
-51
lines changed
 

‎.goreleaser.yml

+4
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,15 @@ release:
3333
footer: |
3434
**Full Changelog**: https://github.com/projectcapsule/{{ .ProjectName }}/compare/{{ .PreviousTag }}...{{ .Tag }}
3535
36+
[!TIP]
37+
[Read this documentation](https://github.com/projectcapsule/{{ .ProjectName }}/blob/{{ .Tag }}/SECURITY.md) to see how you can verify an artifacts we are releasing.
38+
3639
**Docker Images**
3740
- `ghcr.io/projectcapsule/{{ .ProjectName }}:{{ .Version }}`
3841
- `ghcr.io/projectcapsule/{{ .ProjectName }}:latest`
3942
4043
**Helm Chart**
44+
4145
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/cortex-proxy)](https://artifacthub.io/packages/search?repo=cortex-proxy)
4246
4347
**Kubernetes compatibility**

‎SECURITY.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Release Artifacts
2+
3+
[See all the available artifacts](https://github.com/orgs/projectcapsule/packages?repo_name=cortex-proxy)
4+
5+
## Verifing
6+
7+
To verify artifacts you need to have [cosign installed](https://github.com/sigstore/cosign#installation). This guide assumes you are using v2.x of cosign. All of the signatures are created using [keyless signing](https://docs.sigstore.dev/verifying/verify/#keyless-verification-using-openid-connect).
8+
To verify the signature of the docker image, run the following command. Replace `<release_tag>` with an [available release tag](https://github.com/projectcapsule/cortex-proxy/pkgs/container/cortex-proxy). The value `release_tag` is a release but without the prefix `v` (eg. `0.1.0-alpha.3`).
9+
10+
VERSION=<release_tag> cosign verify ghcr.io/projectcapsule/cortex-proxy:${VERSION} \
11+
--certificate-identity-regexp="https://github.com/projectcapsule/cortex-proxy/.github/workflows/docker-publish.yml@refs/tags/*" \
12+
--certificate-oidc-issuer="https://token.actions.githubusercontent.com" | jq
13+
14+
To verify the signature of the helm image, run the following command. Replace `<release_tag>` with an [available release tag](https://github.com/projectcapsule/cortex-proxy/pkgs/container/charts%2Fcortex-proxy). The value `release_tag` is a release but without the prefix `v` (eg. `0.1.0-alpha.3`)
15+
16+
VERSION=<release_tag> cosign verify ghcr.io/projectcapsule/charts/cortex-proxy:${VERSION} \
17+
--certificate-identity-regexp="https://github.com/projectcapsule/cortex-proxy/.github/workflows/helm-publish.yml@refs/tags/*" \
18+
--certificate-oidc-issuer="https://token.actions.githubusercontent.com" | jq
19+
20+
## Verifying Provenance
21+
22+
We create and attest the provenance of our builds using the [SLSA standard](https://slsa.dev/spec/v0.2/provenance) and meets the [SLSA Level 3](https://slsa.dev/spec/v0.1/levels) specification. The attested provenance may be verified using the cosign tool.
23+
24+
Verify the provenance of the docker image. Replace `<release_tag>` with an [available release tag](https://github.com/projectcapsule/cortex-proxy/pkgs/container/cortex-proxy). The value `release_tag` is a release but without the prefix `v` (eg. `0.1.0-alpha.3`)
25+
26+
```bash
27+
cosign verify-attestation --type slsaprovenance \
28+
--certificate-identity-regexp="https://github.com/slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@refs/tags/*" \
29+
--certificate-oidc-issuer="https://token.actions.githubusercontent.com" \
30+
ghcr.io/projectcapsule/cortex-proxy:<release_tag> | jq .payload -r | base64 --decode | jq
31+
```
32+
33+
Verify the provenance of the helm image. Replace `<release_tag>` with an [available release tag](https://github.com/projectcapsule/cortex-proxy/pkgs/container/charts%cortex-proxy). The value `release_tag` is a release but without the prefix `v` (eg. `0.1.0-alpha.3`)
34+
35+
```bash
36+
VERSION=<release_tag> cosign verify-attestation --type slsaprovenance \
37+
--certificate-identity-regexp="https://github.com/slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@refs/tags/*" \
38+
--certificate-oidc-issuer="https://token.actions.githubusercontent.com" \
39+
"ghcr.io/projectcapsule/charts/cortex-proxy:${VERSION}" | jq .payload -r | base64 --decode | jq
40+
```
41+
42+
## Software Bill of Materials (SBOM)
43+
44+
An SBOM (Software Bill of Materials) in CycloneDX JSON format is published for each release, including pre-releases.
45+
46+
To inspect the SBOM of the docker image, run the following command. Replace `<release_tag>` with an [available release tag](https://github.com/projectcapsule/cortex-proxy/pkgs/container/cortex-proxy):
47+
48+
COSIGN_REPOSITORY=ghcr.io/projectcapsule/cortex-proxy cosign download sbom ghcr.io/projectcapsule/cortex-proxy:<release_tag>
49+
50+
To inspect the SBOM of the helm image, run the following command. Replace `<release_tag>` with an [available release tag](https://github.com/projectcapsule/cortex-proxy/pkgs/container/charts%2Fcortex-proxy):
51+
52+
COSIGN_REPOSITORY=ghcr.io/projectcapsule/charts/cortex-proxy cosign download sbom ghcr.io/projectcapsule/charts/cortex-proxy:<release_tag>

‎docs/configuration.md

+17-51
Original file line numberDiff line numberDiff line change
@@ -6,107 +6,74 @@ If both are used then the env vars have precedence (i.e. they override values fr
66
See below for config file format and corresponding env vars.
77

88
```yaml
9-
# Where to listen for incoming write requests from Prometheus
10-
# env: CT_LISTEN
11-
listen: 0.0.0.0:8080
12-
13-
# Profiling API, remove to disable
14-
# env: CT_LISTEN_PPROF
15-
listen_pprof: 0.0.0.0:7008
16-
179
# Where to send the modified requests (Cortex/Mimir)
1810
backend:
1911
url: http://127.0.0.1:9091/receive
2012
# Authentication (optional)
2113
auth:
22-
# Egress HTTP basic auth -> add `Authentication` header to outgoing requests
23-
egress:
24-
# env: CT_AUTH_EGRESS_USERNAME
25-
username: foo
26-
# env: CT_AUTH_EGRESS_PASSWORD
27-
password: bar
14+
username: foo
15+
password: bar
2816

2917
# Whether to enable querying for IPv6 records
30-
# env: CT_ENABLE_IPV6
31-
enable_ipv6: false
18+
ipv6: false
3219

3320
# This parameter sets the limit for the count of outgoing concurrent connections to Cortex / Mimir.
3421
# By default it's 64 and if all of these connections are busy you will get errors when pushing from Prometheus.
3522
# If your `target` is a DNS name that resolves to several IPs then this will be a per-IP limit.
36-
# env: CT_MAX_CONNS_PER_HOST
37-
max_conns_per_host: 0
23+
maxConnectionsPerHost: 0
3824

3925
# HTTP request timeout
40-
# env: CT_TIMEOUT
4126
timeout: 10s
4227

4328
# Timeout to wait on shutdown to allow load balancers detect that we're going away.
4429
# During this period after the shutdown command the /alive endpoint will reply with HTTP 503.
4530
# Set to 0s to disable.
46-
# env: CT_TIMEOUT_SHUTDOWN
47-
timeout_shutdown: 10s
31+
timeoutShutdown: 10s
4832

4933
# Max number of parallel incoming HTTP requests to handle
50-
# env: CT_CONCURRENCY
5134
concurrency: 10
5235

5336
# Whether to forward metrics metadata from Prometheus to Cortex/Mimir
5437
# Since metadata requests have no timeseries in them - we cannot divide them into tenants
5538
# So the metadata requests will be sent to the default tenant only, if one is not defined - they will be dropped
56-
# env: CT_METADATA
5739
metadata: false
5840

59-
# If true response codes from metrics backend will be logged to stdout. This setting can be used to suppress errors
60-
# which can be quite verbose like 400 code - out-of-order samples or 429 on hitting ingestion limits
61-
# Also, those are already reported by other services like Cortex/Mimir distributors and ingesters
62-
# env: CT_LOG_RESPONSE_ERRORS
63-
log_response_errors: true
64-
6541
# Maximum duration to keep outgoing connections alive (to Cortex/Mimir)
6642
# Useful for resetting L4 load-balancer state
6743
# Use 0 to keep them indefinitely
68-
# env: CT_MAX_CONN_DURATION
69-
max_connection_duration: 0s
70-
71-
# Address where metrics are available
72-
# env: CT_LISTEN_METRICS_ADDRESS
73-
listen_metrics_address: 0.0.0.0:9090
44+
maxConnectionDuration: 0s
7445

75-
# If true, then a label with the tenant’s name will be added to the metrics
76-
# env: CT_METRICS_INCLUDE_TENANT
77-
metrics_include_tenant: true
46+
# Select only a subset of tenant to consider for collection
47+
# namespaces which can not be assigned to any tenant will get the
48+
# default value
7849

7950
tenant:
8051
# List of labels examined for tenant information.
81-
# env: CT_TENANT_LABEL_LIST
82-
label_list:
83-
- tenant
84-
- other_tenant
52+
labels:
53+
- namespace
54+
- target_namespace
8555

8656
# Whether to remove the tenant label from the request
87-
# env: CT_TENANT_LABEL_REMOVE
88-
label_remove: true
57+
labelRemove: true
8958

9059
# To which header to add the tenant ID
91-
# env: CT_TENANT_HEADER
9260
header: X-Scope-OrgID
9361

9462
# Which tenant ID to use if the label is missing in any of the timeseries
9563
# If this is not set or empty then the write request with missing tenant label
9664
# will be rejected with HTTP code 400
97-
# env: CT_TENANT_DEFAULT
65+
# Namespaces which can not be assigned to any tenant will get the
66+
# default value
9867
default: foobar
9968

10069
# Enable if you want all metrics from Prometheus to be accepted with a 204 HTTP code
10170
# regardless of the response from upstream. This can lose metrics if Cortex/Mimir is
10271
# throwing rejections.
103-
# env: CT_TENANT_ACCEPT_ALL
104-
accept_all: false
72+
acceptAll: false
10573

10674
# Optional prefix to be added to a tenant header before sending it to Cortex/Mimir.
10775
# Make sure to use only allowed characters:
10876
# https://grafana.com/docs/mimir/latest/configure/about-tenant-ids/
109-
# env: CT_TENANT_PREFIX
11077
prefix: foobar-
11178

11279
# If true will use the tenant ID of the inbound request as the prefix of the new tenant id.
@@ -115,6 +82,5 @@ tenant:
11582
# Prometheus forwards metrics with `X-Scope-OrgID: Prom-A` set in the inbound request.
11683
# This would result in the tenant prefix being set to `Prom-A-`.
11784
# https://grafana.com/docs/mimir/latest/configure/about-tenant-ids/
118-
# env: CT_TENANT_PREFIX_PREFER_SOURCE
119-
prefix_prefer_source: false
85+
prefixPreferSource: false
12086
```

0 commit comments

Comments
 (0)
Please sign in to comment.