Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Applying ingress-nginx controller produces inconsistent final plan #76

Closed
bscholtes opened this issue Jun 26, 2020 · 1 comment · Fixed by #151
Closed

Applying ingress-nginx controller produces inconsistent final plan #76

bscholtes opened this issue Jun 26, 2020 · 1 comment · Fixed by #151

Comments

@bscholtes
Copy link

bscholtes commented Jun 26, 2020

using the ingress-nginx controller repo throws different errors in the apply process.

Used Versions

Steps to Reproduce (1) - create main.tf from Source

curl https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/cloud/deploy.yaml \ 
| tfk8s -o main.tf

# add "provider = kubernetes-alpha" to all main.tf resources and header
provider "kubernetes-alpha" {
  server_side_planning = true
  config_path = "~/.kube/config"
}

# create required ns
kubectl create ns ingress-nginx

Steps to Reproduce (2) - run terraform

terraform init
TF_LOG=TRACE TF_LOG_PATH=$(pwd)/ingress-nginx-trace.log terraform apply

main.tf

ingress-nginx-controller manifest

log snippet's

cat ingress-nginx-trace.log | egrep -B20 -A5 -i "inconsist|failed"
ingress-nginx-trace.log

Issues

* Error: Provider produced inconsistent final plan
...
kubernetes-alpha" produced an invalid new value for
.object.spec.selector.matchLabels.controller-uid
.object.spec.template.metadata.labels.controller-uid
...
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
...
* spec.ports[0].nodePort: Invalid value: 32769: provided port is not in the valid range.

nginx-controller2

Port behavior might be fixed else where to the k8s API.
nginx-controller3

Second terraform apply

After the first TF apply an ingress-nginx-controller pod was left in ContainerCreating state.

nginx-controller4

By retrying terraform apply a "TERRAFORM CRASH" raises due to the running ContainerCreating
pod in the ingress-nginx ns. Deleting pod or TF destroy was required before applying again.

nginx-controller5

Is that CRASH behavior expected
and why does that error "Provider produced inconsistent final plan" occur ?

I would appreciate it very much
if you could help me get that nginx-controller running the kubernetes-alpha way.

@ghost
Copy link

ghost commented Apr 8, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Apr 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant