Skip to content
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

Allow generate_name on cluster roles + bindings, and role bindings #1899

Merged
merged 3 commits into from
Jan 4, 2023

Conversation

multani
Copy link
Contributor

@multani multani commented Nov 16, 2022

Description

Acceptance tests

  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output from acceptance testing:

$ KUBE_CONFIG_PATH=~/.kube/config KUBE_CTX_CLUSTER=kind-kind make testacc TESTARGS="-run TestAcc.*Role.*_generatedName -count=1"
==> Checking that code complies with gofmt requirements...
go vet .
TF_ACC=1 go test "/home/jballet/projects/terraform/terraform-provider-kubernetes/kubernetes" -v -run TestAcc.*Role.*_generatedName -count=1 -timeout 3h
=== RUN   TestAccKubernetesClusterRoleBinding_generatedName
--- PASS: TestAccKubernetesClusterRoleBinding_generatedName (3.40s)
=== RUN   TestAccKubernetesClusterRole_generatedName
--- PASS: TestAccKubernetesClusterRole_generatedName (3.37s)
=== RUN   TestAccKubernetesRoleBinding_generatedName
--- PASS: TestAccKubernetesRoleBinding_generatedName (3.40s)
=== RUN   TestAccKubernetesRole_generatedName
--- PASS: TestAccKubernetesRole_generatedName (3.38s)
PASS
ok  	github.com/hashicorp/terraform-provider-kubernetes/kubernetes	13.586s

...

Release Note

Release note for CHANGELOG:

BUG FIXES:

* r/kubernetes_cluster_role: support `generate_name` to produce a unique random name
* r/kubernetes_cluster_role_binding: support `generate_name` to produce a unique random name
* r/kubernetes_cluster_role_binding_v1: support `generate_name` to produce a unique random name
* r/kubernetes_cluster_role_v1: support `generate_name` to produce a unique random name
* r/kubernetes_role_binding: support `generate_name` to produce a unique random name
* r/kubernetes_role_binding_v1: support `generate_name` to produce a unique random name

References

Fix #588

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

Copy link
Contributor

@arybolovlev arybolovlev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @multani,

Thank you for your contribution! All looks great 👍🏻, just one small request from my end.

Could you please add a changelog file so we can then auto-generate a change log for the upcoming release?

It will be a simple text file in .changelog folder. Like this: .changelog/1899.txt. With the following content:

```release-note:enhancement
`resource/kubernetes_cluster_role`: add attribute `generate_name` to produce a unique random name
```

```release-note:enhancement
`resource/kubernetes_cluster_role_v1`: add attribute `generate_name` to produce a unique random name
```

```release-note:enhancement
`resource/kubernetes_cluster_role_binding`: add attribute `generate_name` to produce a unique random name
```

```release-note:enhancement
`resource/kubernetes_cluster_role_binding_v1`: add attribute `generate_name` to produce a unique random name
```

```release-note:enhancement
`resource/kubernetes_role_binding`: add attribute `generate_name` to produce a unique random name
```

```release-note:enhancement
`resource/kubernetes_role_binding_v1`: add attribute `generate_name` to produce a unique random name
```

Thank you! 🙏

@multani multani requested a review from a team as a code owner January 4, 2023 11:58
@multani
Copy link
Contributor Author

multani commented Jan 4, 2023

Hi @arybolovlev ,

I just added the changelog file now 🙇

Copy link
Contributor

@arybolovlev arybolovlev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing! 👍🏻 Thank you and congratulations on the first-time contribution! 🎉

Your changes will be available in the upcoming release. Please keep an eye on the release notes.

Happy New Year! 🎉

@arybolovlev arybolovlev merged commit aee9b24 into hashicorp:main Jan 4, 2023
@multani multani deleted the fix-role-generate-name branch January 4, 2023 13:26
@multani
Copy link
Contributor Author

multani commented Jan 4, 2023

Thanks for the merge @arybolovlev, this will be an excellent New Year's release! 🙇

@github-actions
Copy link

github-actions bot commented Feb 4, 2023

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with generate_name in kubernetes_role_binding and kubernetes_cluster_role_binding
2 participants