Skip to content

Commit 62969f4

Browse files
committed
docs: add schema validation section to both README
1 parent 28d2cb6 commit 62969f4

File tree

2 files changed

+1194
-1146
lines changed

2 files changed

+1194
-1146
lines changed

charts/sentry-kubernetes/README.md

Lines changed: 51 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,32 @@ $ helm install sentry/sentry-kubernetes --name my-release --set sentry.dsn=<your
1212

1313
The following table lists the configurable parameters of the sentry-kubernetes chart and their default values:
1414

15-
| Parameter | Description | Default |
16-
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------- | ----------------------------- |
17-
| `sentry.dsn` | Sentry DSN | Empty |
18-
| `existingSecret` | Existing secret to read DSN from | Empty |
19-
| `sentry.environment` | Sentry environment | Empty |
20-
| `sentry.release` | Sentry release version | Empty |
21-
| `sentry.logLevel` | Sentry log level (trace, debug, info, warn, error, disabled) | `info` |
22-
| `sentry.watchNamespaces`| Comma-separated list of namespaces to watch (set to `__all__` to watch all namespaces) | `default` |
23-
| `sentry.watchHistorical`| Set to `1` to report all existing (old) events, `0` to only report new events | `0` |
24-
| `sentry.clusterConfigType` | Cluster configuration type (`auto`, `in-cluster`, `out-cluster`) | `auto` |
25-
| `sentry.kubeconfigPath` | Filesystem path to the kubeconfig used to connect to the cluster (used if `clusterConfigType` is `out-cluster`) | Empty |
26-
| `sentry.monitorCronjobs` | Set to `1` to enable Sentry Crons integration for CronJob objects | `0` |
27-
| `sentry.customDsns` | Set to `1` to enable custom DSN specified in annotations with the key `k8s.sentry.io/dsn` | `0` |
28-
| `image.repository` | Container image name | `getsentry/sentry-kubernetes` |
29-
| `image.tag` | Container image tag | `latest` |
30-
| `rbac.create` | If `true`, create and use RBAC resources | `true` |
31-
| `serviceAccount.name` | Service account to be used. If not set and serviceAccount.create is `true`, a name is generated using the fullname template | Empty |
32-
| `serviceAccount.create` | If true, create a new service account | `true` |
33-
| `priorityClassName` | pod priorityClassName | Empty |
34-
| `resources` | Resource requests and limits | `{}` |
35-
| `nodeSelector` | Node labels for pod assignment | `{}` |
36-
| `tolerations` | Tolerations for pod assignment | `[]` |
37-
| `podAnnotations` | Annotations to add to the pod | `{}` |
38-
| `podLabels` | Additional labels to add to the pod | `{}` |
39-
| `rbac.custom_rules` | List of custom RBAC rules to extend default permissions. Each rule can specify `apiGroups`, `resources`, and `verbs`. | `[]` |
40-
| `sentry.appendEnv` | List of custom environment variables to append. Each item can specify a `name` and either a `value` or a `valueFrom` reference. | `[]` |
15+
| Parameter | Description | Default |
16+
|----------------------------|---------------------------------------------------------------------------------------------------------------------------------|-------------------------------|
17+
| `sentry.dsn` | Sentry DSN | Empty |
18+
| `existingSecret` | Existing secret to read DSN from | Empty |
19+
| `sentry.environment` | Sentry environment | Empty |
20+
| `sentry.release` | Sentry release version | Empty |
21+
| `sentry.logLevel` | Sentry log level (trace, debug, info, warn, error, disabled) | `info` |
22+
| `sentry.watchNamespaces` | Comma-separated list of namespaces to watch (set to `__all__` to watch all namespaces) | `default` |
23+
| `sentry.watchHistorical` | Set to `1` to report all existing (old) events, `0` to only report new events | `0` |
24+
| `sentry.clusterConfigType` | Cluster configuration type (`auto`, `in-cluster`, `out-cluster`) | `auto` |
25+
| `sentry.kubeconfigPath` | Filesystem path to the kubeconfig used to connect to the cluster (used if `clusterConfigType` is `out-cluster`) | Empty |
26+
| `sentry.monitorCronjobs` | Set to `1` to enable Sentry Crons integration for CronJob objects | `0` |
27+
| `sentry.customDsns` | Set to `1` to enable custom DSN specified in annotations with the key `k8s.sentry.io/dsn` | `0` |
28+
| `image.repository` | Container image name | `getsentry/sentry-kubernetes` |
29+
| `image.tag` | Container image tag | `latest` |
30+
| `rbac.create` | If `true`, create and use RBAC resources | `true` |
31+
| `serviceAccount.name` | Service account to be used. If not set and serviceAccount.create is `true`, a name is generated using the fullname template | Empty |
32+
| `serviceAccount.create` | If true, create a new service account | `true` |
33+
| `priorityClassName` | pod priorityClassName | Empty |
34+
| `resources` | Resource requests and limits | `{}` |
35+
| `nodeSelector` | Node labels for pod assignment | `{}` |
36+
| `tolerations` | Tolerations for pod assignment | `[]` |
37+
| `podAnnotations` | Annotations to add to the pod | `{}` |
38+
| `podLabels` | Additional labels to add to the pod | `{}` |
39+
| `rbac.custom_rules` | List of custom RBAC rules to extend default permissions. Each rule can specify `apiGroups`, `resources`, and `verbs`. | `[]` |
40+
| `sentry.appendEnv` | List of custom environment variables to append. Each item can specify a `name` and either a `value` or a `valueFrom` reference. | `[]` |
4141

4242
## Usage
4343

@@ -48,7 +48,6 @@ After installing the chart, you can configure various aspects of the sentry-kube
4848
Here's an example `values.yaml` that sets up sentry-kubernetes with custom configurations (remove unused values for default values):
4949

5050
```yaml
51-
5251
sentry:
5352
dsn: <your-dsn>
5453
environment: production
@@ -66,7 +65,6 @@ sentry:
6665
- name: SENTRY_NEW_ENV_2
6766
value: "newvalues"
6867

69-
7068
rbac:
7169
# Specifies whether RBAC resources should be created
7270
create: true
@@ -95,4 +93,29 @@ resources:
9593
requests:
9694
cpu: 250m
9795
memory: 256Mi
96+
```
97+
98+
## 📑 Schema Validation
99+
100+
This enables autocompletion and live validation of your values.yaml file in editors that support JSON Schema (YAML Language Server, VS Code, JetBrains, etc.).
101+
102+
**Editor support:** To enable autocompletion and live validation, choose one:
103+
104+
* **Add a schema hint** at the top of `values.yaml`:
105+
106+
```yaml
107+
# yaml-language-server: $schema=https://raw.githubusercontent.com/sentry-kubernetes/charts/develop/charts/sentry-kubernetes/values.schema.json
108+
```
109+
110+
* **Map the schema URL** in your IDE:
111+
112+
* **VS Code**: add to `yaml.schemas` in your settings:
98113

114+
```jsonc
115+
"yaml.schemas": {
116+
"https://raw.githubusercontent.com/sentry-kubernetes/charts/develop/charts/sentry-kubernetes/values.schema.json": [
117+
"values.yaml"
118+
]
119+
}
120+
```
121+
* **JetBrains IDEs**: in **Settings > Languages & Frameworks > Schemas and DTDs > JSON Schema Mappings**, add the schema URL for `values.yaml`.

0 commit comments

Comments
 (0)