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

r/deployment - allow updating from rolling update to recreate strategy #1255

Merged
merged 1 commit into from
May 14, 2021

Conversation

DrFaust92
Copy link
Contributor

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:

$ make testacc TESTARGS='-run=TestAccKubernetesDeployment_'
--- PASS: TestAccKubernetesDeployment_minimal (5.73s)
--- PASS: TestAccKubernetesDeployment_basic (18.66s)--- PASS: TestAccKubernetesDeployment_initContainerForceNew (37.71s)--- PASS: TestAccKubernetesDeployment_generatedName (6.83s)--- PASS: TestAccKubernetesDeployment_with_security_context (4.34s)--- PASS: TestAccKubernetesDeployment_with_security_context_run_as_group (6.33s)--- PASS: TestAccKubernetesDeployment_with_security_context_sysctl (6.02s)--- PASS: TestAccKubernetesDeployment_with_tolerations (6.39s)
--- PASS: TestAccKubernetesDeployment_with_tolerations_unset_toleration_seconds (4.55s)
--- PASS: TestAccKubernetesDeployment_with_container_liveness_probe_using_exec (6.06s)
--- PASS: TestAccKubernetesDeployment_with_container_liveness_probe_using_http_get (5.88s)
--- PASS: TestAccKubernetesDeployment_with_container_liveness_probe_using_tcp (6.41s)
--- PASS: TestAccKubernetesDeployment_with_container_lifecycle (6.28s)
--- PASS: TestAccKubernetesDeployment_with_container_security_context (6.14s)
--- PASS: TestAccKubernetesDeployment_with_container_security_context_run_as_group (6.07s)
--- PASS: TestAccKubernetesDeployment_with_volume_mount (5.46s)
--- PASS: TestAccKubernetesDeployment_ForceNew (13.35s)
--- PASS: TestAccKubernetesDeployment_with_resource_requirements (2.48s)
--- PASS: TestAccKubernetesDeployment_with_empty_dir_volume (5.86s)
--- PASS: TestAccKubernetesDeployment_with_deployment_strategy_rollingupdate (10.07s)
--- PASS: TestAccKubernetesDeployment_with_share_process_namespace (6.05s)
--- PASS: TestAccKubernetesDeployment_no_rollout_wait (3.01s)
--- PASS: TestAccKubernetesDeployment_with_deployment_strategy_rollingupdate_max_surge_30perc_max_unavailable_40perc (9.99s)
--- PASS: TestAccKubernetesDeployment_with_deployment_strategy_rollingupdate_max_surge_200perc_max_unavailable_0perc (5.94s)
--- PASS: TestAccKubernetesDeployment_with_deployment_strategy_rollingupdate_max_surge_0_max_unavailable_1 (6.01s)
--- PASS: TestAccKubernetesDeployment_with_deployment_strategy_rollingupdate_max_surge_1_max_unavailable_0 (4.01s)
--- PASS: TestAccKubernetesDeployment_with_deployment_strategy_rollingupdate_max_surge_1_max_unavailable_2 (4.21s)
--- PASS: TestAccKubernetesDeployment_with_deployment_strategy_recreate (4.00s)
--- PASS: TestAccKubernetesDeployment_with_host_aliases (4.02s)
--- PASS: TestAccKubernetesDeployment_with_resource_field_selector (9.85s)
--- PASS: TestAccKubernetesDeployment_config_with_automount_service_account_token (6.03s)

Release Note

Release note for CHANGELOG:

resource_kubernetes_deployment - allow updating from rolling update to recreate strategy
...

References

Closes #585

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

@ghost ghost added size/S labels Apr 30, 2021
@DrFaust92
Copy link
Contributor Author

FYI TestAccKubernetesDeployment_regression test failed for me on the following:

          # kubernetes_deployment.test will be updated in-place
          ~ resource "kubernetes_deployment" "test" {
                id               = "default/tf-acc-test-sftczcqhqj"
                wait_for_rollout = true
        
              ~ metadata {
                  ~ annotations      = {
                      - "deployment.kubernetes.io/revision" = "2" -> null
                    }

I believe its unrelated to the above change

Copy link
Contributor

@dak1n1 dak1n1 left a comment

Choose a reason for hiding this comment

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

Looks good! Tests are passing. Thanks for adding this!

@dak1n1 dak1n1 merged commit 6eb06c1 into hashicorp:main May 14, 2021
@github-actions
Copy link

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 Jun 14, 2021
@DrFaust92 DrFaust92 deleted the r/deployment_rolling_to_recreate branch June 14, 2021 04:40
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.

kubernetes_deployment: changing strategy to Recreate from Rolling breaks the update
2 participants