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

Add "field_manager" attribute #1831

Merged
merged 2 commits into from Oct 10, 2022
Merged

Add "field_manager" attribute #1831

merged 2 commits into from Oct 10, 2022

Conversation

jrhouston
Copy link
Contributor

Description

Adds a "field_manager" attribute to the kubernetes_labels, kubernetes_annotations, and kubernetes_config_map_v1_data resources to allow configuring of the field manager name from the currently hard coded default of Terraform.

This will allow users to specify the manager name if they wish to have multiple Terraform resources that manage different fields of the same Kubernetes resource.

Fixes #1690

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:

TF_ACC=1 go test "/Users/john/dev/hashicorp/terraform-provider-kubernetes/kubernetes" -v -count=1 -run 'TestAccKubernetes(Labels|Annotations|ConfigMapV1Data)' -timeout 3h
=== RUN   TestAccKubernetesAnnotations_basic
--- PASS: TestAccKubernetesAnnotations_basic (29.02s)
=== RUN   TestAccKubernetesConfigMapV1Data_basic
--- PASS: TestAccKubernetesConfigMapV1Data_basic (27.20s)
=== RUN   TestAccKubernetesLabels_basic
--- PASS: TestAccKubernetesLabels_basic (27.39s)
PASS
ok  	github.com/hashicorp/terraform-provider-kubernetes/kubernetes	84.350s

Release Note

Release note for CHANGELOG:

Add field_manager attribute

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

@jrhouston
Copy link
Contributor Author

cc @BBBmau as you will probably want to add this attribute to the kubernetes_env resource you're working on.

Copy link
Contributor

@BBBmau BBBmau left a comment

Choose a reason for hiding this comment

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

Got it, I'll be sure to add the field to kubernetes_env resource. Looks a lot cleaner with its own field_manager attribute

Copy link
Member

@alexsomesan alexsomesan left a comment

Choose a reason for hiding this comment

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

Nice and simple! Only one observation about handling empty string value.

@jrhouston jrhouston merged commit ccc45c5 into main Oct 10, 2022
@jrhouston jrhouston deleted the field-manager-attr branch October 10, 2022 22:10
@awx-fuyuanchu
Copy link

Hi guys, pretty awesome to have the issue fixed. May I know the target due date of the next release?

@valorl
Copy link

valorl commented Oct 28, 2022

Same here, any indication on when to expect this in registry ? It's a significant blocker for us so would be greatly appreciated.

@LukasKnuth
Copy link

It's now available in the 2.15.0 release!

@github-actions
Copy link

github-actions bot commented Dec 3, 2022

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 Dec 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kubernetes_labels and kubernetes_config_map_v1_data remove each others data from ConfigMap
6 participants