aws-eks: allow passing secret to cluster.addHelmChart and cluster.addManifest
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
it would be good if CDK would resolve references to SecretsManager for `values` passed to `addHelmChart`
### Use Case
I'm trying to do this: read a secret, apply a helm chart with values referencing that secret. Code:
```python
secret = secretsmanager.Secret.from_secret_name_v2(scope, 'linkerDSecret', '/kubernetescluster/linkerd')
cluster.add_helm_chart(
id='linkerd2',
chart='linkerd2',
repository='https://helm.linkerd.io/stable',
create_namespace=True,
release='linkerd',
values={
'identityTrustAnchorsPEM': secret.secret_value_from_json(key='identityTrustAnchorsPEM'),
'identity': {
'issuer': {
'crtExpiry': secret.secret_value_from_json(key='identityissuerCertExpiry'),
'tls': {
'crtPEM': secret.secret_value_from_json(key='identityissuertlscrtPEM'),
'keyPEM': secret.secret_value_from_json(key='identityissuertlskeyPEM'),
}
}
}
}
)
```
However, this seems to not be supported - secrets are not resolved. It would be good if this was supported, so that we have a way of sending secrets to Helm charts.
### Proposed Solution
### Other
cluster.addManifest also does not resolve secrets. As far as I can see, this means that there's no way to pass secrets to a helm template or kubernetes manifest managed by CDK. This is quite problematic for us, as we'd hoped to be using CDK for all "core cluster" helm charts (ingress controllers, linkerd setup, etc)
* [ ] :wave: I may be able to implement this feature request
* [ ] :warning: This feature might incur a breaking change
---
This is a :rocket: Feature Request
Contributor guide
Research direction
Start with the EKS cluster.add_helm_chart and addManifest entry points, then trace how their values and manifests are rendered. Define completion as resolving SecretsManager references for both Helm chart values and Kubernetes manifests, with coverage for the nested secret values shown in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, helm, kubernetes, typescript
- Domain
- cloud, devops, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100