Skip to content

Commit

Permalink
SCALRCORE-30353 agent-k8s helm chart - support configurable data key …
Browse files Browse the repository at this point in the history
…for tokenExistingSecret (#59)
  • Loading branch information
mermoldy authored Sep 30, 2024
1 parent ce3c2f0 commit d02f822
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/agent-docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ Multiple Deployments can be created within a single Kubernetes cluster.
| tolerations | list | `[]` | Tolerations for the Scalr Agent pods, allowing them to run on tainted nodes |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
2 changes: 2 additions & 0 deletions charts/agent-k8s/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [UNRELEASED]

- Added `agent.tokenExistingSecretKey` option to specify the custom secret key for the agent token.

## [v0.5.18]

### Updated
Expand Down
3 changes: 2 additions & 1 deletion charts/agent-k8s/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ $ helm upgrade ... \
| agent.log_format | string | `"json"` | The log formatter. Options: "plain" or "dev" or "json". |
| agent.token | string | `""` | The agent pool token. |
| agent.tokenExistingSecret | string | `""` | The name of the secret containing the agent pool token. Secret is created if left empty. |
| agent.tokenExistingSecretKey | string | `"token"` | The key of the secret containing the agent pool token. |
| agent.url | string | `""` | The Scalr url. |
| agent.worker_drain_timeout | int | `3600` | The timeout for draining worker tasks in seconds. After this timeout, tasks will be terminated via the SIGTERM signal. |
| agent.worker_on_stop_action | string | `"drain"` | Defines the SIGTERM/SIGHUP/SIGINT signal handler's shutdown behavior. Options: "drain" or "grace-shutdown" or "force-shutdown". |
Expand All @@ -138,4 +139,4 @@ $ helm upgrade ... \
| workerTolerations | list | `[]` | Kubernetes Node Tolerations for the agent worker and the agent task pods. Expects input structure as per specification <https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#toleration-v1-core>. Example: `--set workerTolerations[0].operator=Equal,workerTolerations[0].effect=NoSchedule,workerTolerations[0].key=dedicated,workerTolerations[0].value=scalr-agent-worker-pool` |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
2 changes: 1 addition & 1 deletion charts/agent-k8s/templates/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ spec:
valueFrom:
secretKeyRef:
name: {{ .Values.agent.tokenExistingSecret | default (include "agent-k8s.name" .) }}
key: token
key: {{ .Values.agent.tokenExistingSecretKey | default "token" }}
optional: false
- name: SCALR_AGENT_NAME
valueFrom:
Expand Down
2 changes: 1 addition & 1 deletion charts/agent-k8s/templates/worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
valueFrom:
secretKeyRef:
name: {{ .Values.agent.tokenExistingSecret | default (include "agent-k8s.name" .) }}
key: token
key: {{ .Values.agent.tokenExistingSecretKey | default "token" }}
optional: false
- name: SCALR_AGENT_NAME
valueFrom:
Expand Down
2 changes: 2 additions & 0 deletions charts/agent-k8s/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ agent:
token: ""
# -- The name of the secret containing the agent pool token. Secret is created if left empty.
tokenExistingSecret: ""
# -- The key of the secret containing the agent pool token.
tokenExistingSecretKey: "token"
# -- Enable debug logs
debug: false
# -- The log formatter. Options: "plain" or "dev" or "json".
Expand Down

0 comments on commit d02f822

Please sign in to comment.