terraform-provider-kubernetes icon indicating copy to clipboard operation
terraform-provider-kubernetes copied to clipboard

New data source: `kubernetes_server_version`

Open matheusfm opened this issue 3 years ago • 3 comments

Description

Would like to be able to have access to server version.

Potential Terraform Configuration

data "kubernetes_server_version" "current" { }

References

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

matheusfm avatar Jul 06 '22 15:07 matheusfm

Hello! Thank you for opening this request, can you comment on what you would be using this feature for?

BBBmau avatar Jul 13 '22 16:07 BBBmau

Hi @BBBmau

With this data source, we could solve the following case:

We have a terraform module that use kubernetes provider to create a ServiceAccount to obtain a non-expiring token.

If the kubernetes server version is greater than 1.24.0, we need to create a Secret annotated with kubernetes.io/service-account.name. Or else we just look for the auto-generated Secret for the ServiceAccount.

Kubernetes 1.24.0 release notes.

matheusfm avatar Jul 13 '22 17:07 matheusfm

@BBBmau, I'd like to give this one a go, are you happy for me to raise a PR?

flynnhandley avatar Sep 23 '22 06:09 flynnhandley

Marking this issue as stale due to inactivity. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. This helps our maintainers find and focus on the active issues. Maintainers may also remove the stale label at their discretion. Thank you!

github-actions[bot] avatar Sep 24 '23 00:09 github-actions[bot]