-
Notifications
You must be signed in to change notification settings - Fork 991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Service Account secret values #241
Comments
sidenote: https://github.com/Ashald/terraform-provider-yaml will probably do nicely to parse what I want from the secret data. |
Stelminator
added a commit
to Stelminator/terraform-provider-kubernetes
that referenced
this issue
Dec 5, 2018
adds data_source_kubernetes_secret hashicorp#241 example use case: ``` resource "kubernetes_service_account" "example" { metadata { name = "terraform-example" } } data "kubernetes_secret" "example" { metadata = { name = "${kubernetes_service_account.example.default_secret_name}" namespace = "${kubernetes_service_account.example.metadata.0.namespace}" } } output "token" { value = "${lookup(data.kubernetes_secret.example.data, "token", "")}" } ```
I have the start of a PR that does what I want:
Edit: added tests. |
alexsomesan
pushed a commit
that referenced
this issue
Dec 13, 2018
adds data_source_kubernetes_secret #241
ghost
locked and limited conversation to collaborators
Apr 21, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I'd like to be able to extract a service account token from a cluster (or generate an appropriate one if possible) to be used as a bearer token.
I'm willing to help create the datasource mentioned below, but could use a sanity check that it's actually a missing feature before I put a bunch of time into that. Additionally, if there's a better way to accomplish the goal, I'd very much appreciate hearing it.
Thanks!
Use case
I'm trying to create a prometheus config that could work from outside of a Kubernetes cluster (really, from inside a separate one) and can be automatically generated from terraform outputs of other projects. I'm trying to provide monitoring as a service while putting the minimal burden for other developers managing their own apps.
To accomplish that, I've found this gist which should give me enough to make the scrapes work if I have the endpoint and the token. The endpoint is easy, but creating a service account and then being able to use it outside the cluster seems to be the missing piece; specifically, access to the Secret data.
Affected Resource(s)
Terraform Configuration Files
maybe something like this:
Expected Behavior
Ability to provide service accounts for access to the Kubernetes API from outside the cluster.
Actual Behavior
We don't seem to have that.
References
default_secret_name
)The text was updated successfully, but these errors were encountered: