Skip to content

Commit fee4282

Browse files
authored
Merge pull request #1586 from StackVista/stac-22206
STAC-22206: Document changes to agent external secrets setup [MERGE ON NEXT AGENT RELEASE]
2 parents 4200cc0 + f80350d commit fee4282

3 files changed

Lines changed: 60 additions & 13 deletions

File tree

SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
* [Proxy Configuration](setup/agent/k8s-network-configuration-proxy.md)
8787
* [Using a custom registry](k8s-suse-rancher-prime-agent-air-gapped.md)
8888
* [Custom Secret Management](setup/agent/k8s-custom-secrets-setup.md)
89+
* [Custom Secret Management (Deprecated)](setup/agent/k8s-custom-secrets-setup-deprecated.md)
8990
* [Request tracing](setup/agent/k8sTs-agent-request-tracing.md)
9091
* [Certificates for sidecar injection](setup/agent/k8sTs-agent-request-tracing-certificates.md)
9192

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
## Custom Secret Management (Deprecated)
2+
3+
### Overview
4+
5+
The SUSE Observability agent supports specifying the name of a custom secret that contains the API key and cluster authorization token. This feature is useful for users who wish to manage their own secrets and avoid the automatic creation of secrets by the Helm chart.
6+
7+
{% hint style="warning" %}
8+
**This method of customizing secrets is deprecated and is incompatible with the RBAC feature.**
9+
10+
Please use [the new method](./k8s-custom-secrets-setup.md) for using external secrets.
11+
{% endhint %}
12+
13+
### Regarding the Helm Chart
14+
15+
#### Configuration Options
16+
17+
- `stackstate.manageOwnSecrets`: A boolean flag that determines whether the user wishes to manage their own secrets. Default value is `false`.
18+
- `stackstate.customSecretName`: (Optional) Name of the custom secret to be created by the user. Required if `stackstate.manageOwnSecrets` is set to `true`.
19+
- `stackstate.customApiKeySecretKey`: (Optional) Key name for the API key within the custom secret. Required if `stackstate.manageOwnSecrets` is set to `true`.
20+
- `stackstate.customClusterAuthTokenSecretKey`: (Optional) Key name for the cluster authorization token within the custom secret. Required if `stackstate.manageOwnSecrets` is set to `true`.
21+
22+
#### Behavior Description
23+
24+
- **Automatic Secret Creation**: By default, the chart continues to automatically create secrets as before if `stackstate.manageOwnSecrets` is set to `false`.
25+
- **Custom Secret Management**: If `stackstate.manageOwnSecrets` is set to `true`, the chart expects the user to provide the name of the custom secret (`stackstate.customSecretName`) along with the keys for the API key and authorization token (`stackstate.customApiKeySecretKey` and `stackstate.customClusterAuthTokenSecretKey`, respectively).
26+
- **Implied Omission**: When specifying that you would like to manage your own secrets, the chart will ignore values for `stackstate.apiKey` and `stackstate.cluster.authToken`.
27+
### How to Use in values.yaml
28+
29+
1. **Using Automatic Secret Creation (Default)**:
30+
```yaml
31+
stackstate:
32+
manageOwnSecrets: false
33+
apiKey: "<your api key>"
34+
```
35+
36+
2. **Managing Own Secrets**:
37+
```yaml
38+
stackstate:
39+
manageOwnSecrets: true
40+
customSecretName: my-custom-secret
41+
customApiKeySecretKey: api-key
42+
customClusterAuthTokenSecretKey: auth-token
43+
```
Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,40 @@
11
## Custom Secret Management
22

3+
34
### Overview
45

5-
The stackstate/stackstate-k8s-agent (starting from version 1.0.79) supports specifying the name of a custom secret that contains the API key and cluster authorization token. This feature is useful for users who wish to manage their own secrets and avoid the automatic creation of secrets by the Helm chart.
6+
The SUSE Observability Agent supports specifying the name of a custom secret that contains the API key and cluster authorization token. This feature is useful for users who wish to manage their own secrets and avoid the automatic creation of secrets by the Helm chart.
7+
8+
{% hint style="info" %}
9+
**There was a previous method of specifying this that is now deprecated, see the [deprecated method](./k8s-custom-secrets-setup-deprecated.md) .**
10+
{% endhint %}
611

712
### Regarding the Helm Chart
813

914
#### Configuration Options
1015

11-
- `stackstate.manageOwnSecrets`: A boolean flag that determines whether the user wishes to manage their own secrets. Default value is `false`.
12-
- `stackstate.customSecretName`: (Optional) Name of the custom secret to be created by the user. Required if `stackstate.manageOwnSecrets` is set to `true`.
13-
- `stackstate.customApiKeySecretKey`: (Optional) Key name for the API key within the custom secret. Required if `stackstate.manageOwnSecrets` is set to `true`.
14-
- `stackstate.customClusterAuthTokenSecretKey`: (Optional) Key name for the cluster authorization token within the custom secret. Required if `stackstate.manageOwnSecrets` is set to `true`.
16+
- `global.apiKey.fromSecret`: Specify a pre-existing secret name residing in the same namespace which contains an `STS_API_KEY` field containing the api key.
17+
- `global.clusterAgentAuthToken.fromSecret`: Specify a pre-existing secret name residing in the same namespace which contains an `STS_CLUSTER_AGENT_AUTH_TOKEN` field containing a token for securing connections between the cluster and node agents.
1518

1619
#### Behavior Description
1720

18-
- **Automatic Secret Creation**: By default, the chart continues to automatically create secrets as before if `stackstate.manageOwnSecrets` is set to `false`.
19-
- **Custom Secret Management**: If `stackstate.manageOwnSecrets` is set to `true`, the chart expects the user to provide the name of the custom secret (`stackstate.customSecretName`) along with the keys for the API key and authorization token (`stackstate.customApiKeySecretKey` and `stackstate.customClusterAuthTokenSecretKey`, respectively).
21+
- **Automatic Secret Creation**: By default, the chart requires an `stackstate.apiKey` to be specified and will create a secret by itself. The `STS_CLUSTER_AGENT_AUTH_TOKEN` is generated automatically.
22+
- **Custom Secret Management**: When overriding the `fromSecret` fields, the api key and cluster auth token will be taken from those secrets.
2023
- **Implied Omission**: When specifying that you would like to manage your own secrets, the chart will ignore values for `stackstate.apiKey` and `stackstate.cluster.authToken`.
24+
2125
### How to Use in values.yaml
2226

2327
1. **Using Automatic Secret Creation (Default)**:
2428
```yaml
2529
stackstate:
26-
manageOwnSecrets: false
2730
apiKey: "<your api key>"
2831
```
2932
3033
2. **Managing Own Secrets**:
3134
```yaml
32-
stackstate:
33-
manageOwnSecrets: true
34-
customSecretName: my-custom-secret
35-
customApiKeySecretKey: api-key
36-
customClusterAuthTokenSecretKey: auth-token
35+
global:
36+
apiKey:
37+
fromSecret: "name-of-my-api-key-secret"
38+
clusterAgentAuthToken:
39+
fromSecret: "name-of-my-cluster-agent-auth-token-secret"
3740
```

0 commit comments

Comments
 (0)