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

Fix TF re-adding annotations on every apply #87

Merged
merged 1 commit into from
Nov 22, 2018
Merged

Conversation

sl1pm4t
Copy link
Owner

@sl1pm4t sl1pm4t commented Nov 22, 2018

Fixes #72

This fixes an issue that could cause Terraform to attempt to re-apply certain annotations on every run.
This fix already applied to top level annotations, but needed to be added to annotations within a PodTemplate (i.e nested inside a Deployment, DaemonSet, StatefulSet spec)

Before the fix, the modified Deployment test case fails with:

--- FAIL: TestAccKubernetesDeployment_with_template_metadata (69.35s)
    testing.go:518: Step 0 error: After applying this step, the plan was not empty:

        DIFF:

        UPDATE: kubernetes_deployment.test
          spec.0.template.0.metadata.0.annotations.%:                              "3" => "4"
          spec.0.template.0.metadata.0.annotations.kubernetes.io/egress-bandwidth: "" => "1M"

After the change:

--- PASS: TestAccKubernetesDeployment_with_template_metadata (135.66s)
PASS

@sl1pm4t sl1pm4t merged commit 23b8de8 into custom Nov 22, 2018
@sl1pm4t sl1pm4t deleted the fix-annotations branch November 22, 2018 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

some annotations are being re-applied on every terraform run
1 participant