terraform-provider-helm
terraform-provider-helm copied to clipboard
issue with helm_release upgrade
Terraform Version and Provider Version
Terraform v0.12.20
Provider Version
terraform-provider-helm_v1.0.0_x4
Affected Resource(s)
- helm_release
### Terraform Configuration Files
resource "helm_release" "node0" {
atomic = "true"
chart = "./node"
force_update = "true"
name = "node81-bde8-41"
namespace = "default"
set {
name = "offering_version"
value ="10.21.0"
}
recreate_pods = "true"
values = [ file("./override.yaml")]
wait = "false"
}
Debug Output
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
~ update in-place
Terraform will perform the following actions:
2020/06/08 03:57:43 [DEBUG] command: asking for input: "Do you want to perform these actions?"
# helm_release.node0 will be updated in-place
~ resource "helm_release" "node0" {
atomic = true
chart = "./node"
cleanup_on_fail = false
dependency_update = false
disable_crd_hooks = false
disable_webhooks = false
force_update = true
id = "node81-bde8-41"
max_history = 0
metadata = [
{
chart = "node"
name = "node81-bde8-41"
namespace = "default"
revision = 3
values = jsonencode(
{
affinity = {}
applicationPort = 3000
externaldb = {
type = "osba"
}
extraEnv = {}
getAppFromExternalRepository = true
git = {
pullPolicy = "IfNotPresent"
registry = "docker.io"
repository = "bitnami/git"
tag = "2.26.2-debian-10-r22"
}
global = {
storageClass = "ibmc-block-gold"
}
image = {
pullPolicy = "IfNotPresent"
registry = "docker.io"
repository = "bitnami/node"
tag = "10.20.1-debian-10-r33"
}
ingress = {
enabled = false
hosts = [
{
annotations = null
certManager = false
name = "node.local"
tls = false
tlsSecret = "node.local-tls"
},
]
}
mongodb = {
install = true
}
nodeSelector = {}
offering_version = "10.20.1"
persistence = {
accessMode = "ReadWriteOnce"
enabled = false
path = "/app/data"
size = "1Gi"
}
replicas = 1
repository = "https://github.com/bitnami/sample-mean.git"
resources = {
limits = {}
requests = {}
}
revision = "master"
securityContext = {
enabled = true
fsGroup = 1001
runAsUser = 1001
}
service = {
annotations = {}
port = 80
type = "ClusterIP"
}
tolerations = {}
volumePermissions = {
enabled = false
image = {
pullPolicy = "Always"
registry = "docker.io"
repository = "bitnami/minideb"
tag = "buster"
}
resources = {
limits = {}
requests = {}
}
}
}
)
version = "11.4.22"
},
]
name = "node81-bde8-41"
namespace = "default"
recreate_pods = true
render_subchart_notes = true
replace = false
reset_values = false
reuse_values = false
skip_crds = false
~ status = "failed" -> "deployed"
timeout = 300
values = [
<<~EOT
affinity: {}
applicationPort: 3000
externaldb:
type: osba
extraEnv: {}
getAppFromExternalRepository: true
git:
pullPolicy: IfNotPresent
registry: docker.io
repository: bitnami/git
tag: 2.26.2-debian-10-r22
global:
storageClass: ibmc-block-gold
image:
pullPolicy: IfNotPresent
registry: docker.io
repository: bitnami/node
tag: 10.20.1-debian-10-r33
ingress:
enabled: false
hosts:
- annotations: null
certManager: false
name: node.local
tls: false
tlsSecret: node.local-tls
mongodb:
install: true
nodeSelector: {}
persistence:
accessMode: ReadWriteOnce
enabled: false
path: /app/data
size: 1Gi
replicas: 1
repository: https://github.com/bitnami/sample-mean.git
resources:
limits: {}
requests: {}
revision: master
securityContext:
enabled: true
fsGroup: 1001
runAsUser: 1001
service:
annotations: {}
port: 80
type: ClusterIP
tolerations: {}
volumePermissions:
enabled: false
image:
pullPolicy: Always
registry: docker.io
repository: bitnami/minideb
tag: buster
resources:
limits: {}
requests: {}
EOT,
]
verify = false
~ version = "11.4.22" -> "11.4.23"
wait = false
set {
name = "offering_version"
value = "10.21.0"
}
}
# null_resource.post_exec will be created
+ resource "null_resource" "post_exec" {
+ id = (known after apply)
+ triggers = {
+ "offering_version" = "10.21.0"
}
}
Plan: 1 to add, 1 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
2020/06/08 03:57:46 [INFO] backend/local: apply calling Apply
2020/06/08 03:57:46 [INFO] terraform: building graph: GraphTypeApply
2020/06/08 03:57:46 [DEBUG] Resource state not found for node "null_resource.post_exec", instance null_resource.post_exec
2020/06/08 03:57:46 [DEBUG] adding implicit provider configuration provider.null, implied first by null_resource.post_exec (prepare state)
2020/06/08 03:57:46 [DEBUG] ProviderTransformer: "helm_release.node0" (*terraform.NodeApplyableResourceInstance) needs provider.helm
2020/06/08 03:57:46 [DEBUG] ProviderTransformer: "data.ibm_container_cluster_config.clusterConfig (prepare state)" (*terraform.NodeApplyableResource) needs provider.ibm
2020/06/08 03:57:46 [DEBUG] ProviderTransformer: "null_resource.post_exec" (*terraform.NodeApplyableResourceInstance) needs provider.null
2020/06/08 03:57:46 [DEBUG] ProviderTransformer: "helm_release.node0 (prepare state)" (*terraform.NodeApplyableResource) needs provider.helm
2020/06/08 03:57:46 [DEBUG] ProviderTransformer: "null_resource.post_exec (prepare state)" (*terraform.NodeApplyableResource) needs provider.null
2020/06/08 03:57:46 [DEBUG] ReferenceTransformer: "data.ibm_container_cluster_config.clusterConfig (prepare state)" references: []
2020/06/08 03:57:46 [DEBUG] ReferenceTransformer: "provider.helm" references: [data.ibm_container_cluster_config.clusterConfig (prepare state)]
2020/06/08 03:57:46 [DEBUG] ReferenceTransformer: "helm_release.node0" references: []
2020/06/08 03:57:46 [DEBUG] ReferenceTransformer: "null_resource.post_exec" references: [data.ibm_container_cluster_config.clusterConfig (prepare state) helm_release.node0 helm_release.node0 helm_release.node0 (prepare state)]
2020/06/08 03:57:46 [DEBUG] ReferenceTransformer: "provisioner.local-exec" references: []
2020/06/08 03:57:46 [DEBUG] ReferenceTransformer: "provider.ibm" references: []
2020/06/08 03:57:46 [DEBUG] ReferenceTransformer: "provider.null" references: []
2020/06/08 03:57:46 [DEBUG] ReferenceTransformer: "helm_release.node0 (prepare state)" references: []
2020/06/08 03:57:46 [DEBUG] ReferenceTransformer: "null_resource.post_exec (prepare state)" references: []
2020/06/08 03:57:46 [DEBUG] Starting graph walk: walkApply
3Z [INFO] plugin: configuring client automatic mTLS
2020-06-08T03:57:46.573Z [DEBUG] plugin: starting plugin: path=/go/bin/terraform args=[/go/bin/terraform, internal-plugin, provisioner, local-exec]
2020-06-08T03:57:46.574Z [DEBUG] plugin: plugin started: path=/go/bin/terraform pid=1405
2020-06-08T03:57:46.574Z [DEBUG] plugin: waiting for RPC address: path=/go/bin/terraform
2020-06-08T03:57:46.607Z [DEBUG] plugin.terraform: 2020/06/08 03:57:46 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
2020-06-08T03:57:46.607Z [DEBUG] plugin.terraform: Use TF_LOG=TRACE to see Terraform's internal logs.
2020-06-08T03:57:46.607Z [DEBUG] plugin.terraform: ----
2020-06-08T03:57:46.629Z [DEBUG] plugin: starting plugin: path=/tmp/tfws-711432217/.terraform/plugins/linux_amd64/terraform-provider-null_v2.1.2_x4 args=[/tmp/tfws-711432217/.terraform/plugins/linux_amd64/terraform-provider-null_v2.1.2_x4]
2020-06-08T03:57:46.632Z [DEBUG] plugin.terraform: 2020/06/08 03:57:46 [INFO] Terraform version: 0.12.20
2020-06-08T03:57:46.632Z [DEBUG] plugin.terraform: 2020/06/08 03:57:46 [INFO] Go runtime version: go1.12.13
2020-06-08T03:57:46.632Z [DEBUG] plugin.terraform: 2020/06/08 03:57:46 [INFO] CLI args: []string{"/go/bin/terraform", "internal-plugin", "provisioner", "local-exec"}
2020-06-08T03:57:46.632Z [DEBUG] plugin.terraform: 2020/06/08 03:57:46 [DEBUG] Attempting to open CLI config file: /home/appuser/.terraformrc
2020-06-08T03:57:46.632Z [DEBUG] plugin.terraform: 2020/06/08 03:57:46 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020-06-08T03:57:46.633Z [DEBUG] plugin: plugin started: path=/tmp/tfws-711432217/.terraform/plugins/linux_amd64/terraform-provider-null_v2.1.2_x4 pid=1426
2020-06-08T03:57:46.633Z [DEBUG] plugin: waiting for RPC address: path=/tmp/tfws-711432217/.terraform/plugins/linux_amd64/terraform-provider-null_v2.1.2_x4
2020-06-08T03:57:46.635Z [DEBUG] plugin.terraform: 2020/06/08 03:57:46 [INFO] CLI command args: []string{"internal-plugin", "provisioner", "local-exec"}
2020-06-08T03:57:46.635Z [DEBUG] plugin.terraform: local-exec-provisioner (internal) 2020/06/08 03:57:46 [INFO] Starting provisioner plugin local-exec
2020-06-08T03:57:46.635Z [DEBUG] plugin.terraform: plugin address: network=unix address=/tmp/plugin811931217 timestamp=2020-06-08T03:57:46.634Z
2020-06-08T03:57:46.635Z [DEBUG] plugin: using plugin: version=5
2020-06-08T03:57:46.648Z [INFO] plugin.terraform-provider-null_v2.1.2_x4: configuring server automatic mTLS: timestamp=2020-06-08T03:57:46.648Z
2020-06-08T03:57:46.689Z [DEBUG] plugin.terraform-provider-null_v2.1.2_x4: plugin address: address=/tmp/plugin955548101 network=unix timestamp=2020-06-08T03:57:46.689Z
2020-06-08T03:57:46.690Z [DEBUG] plugin: using plugin: version=5
2020-06-08T03:57:46.692Z [INFO] plugin: configuring client automatic mTLS
2020-06-08T03:57:46.750Z [DEBUG] plugin: starting plugin: path=/tmp/tfws-711432217/.terraform/plugins/linux_amd64/terraform-provider-ibm_v1.5.1 args=[/tmp/tfws-711432217/.terraform/plugins/linux_amd64/terraform-provider-ibm_v1.5.1]
2020-06-08T03:57:46.751Z [DEBUG] plugin: plugin started: path=/tmp/tfws-711432217/.terraform/plugins/linux_amd64/terraform-provider-ibm_v1.5.1 pid=1438
2020-06-08T03:57:46.751Z [DEBUG] plugin: waiting for RPC address: path=/tmp/tfws-711432217/.terraform/plugins/linux_amd64/terraform-provider-ibm_v1.5.1
2020-06-08T03:57:46.822Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: 2020/06/08 03:57:46 IBM Cloud Provider version 1.5.1
2020-06-08T03:57:46.827Z [INFO] plugin.terraform-provider-ibm_v1.5.1: configuring server automatic mTLS: timestamp=2020-06-08T03:57:46.826Z
2020-06-08T03:57:46.862Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: plugin address: address=/tmp/plugin530654921 network=unix timestamp=2020-06-08T03:57:46.862Z
2020-06-08T03:57:46.862Z [DEBUG] plugin: using plugin: version=5
2020-06-08T03:57:46.955Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: 2020/06/08 03:57:46 Configuring SoftLayer Session with token
2020-06-08T03:57:46.956Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: 2020/06/08 03:57:46 Configuring IBM Cloud Session with token
2020-06-08T03:57:47.402Z [DEBUG] plugin.terraform-provider-ibm_v1.5.1: 2020/06/08 03:57:47 the apiendpoint url for power is us-south.power-iaas.cloud.ibm.com
2020-06-08T03:57:47.404Z [INFO] plugin: configuring client automatic mTLS
2020-06-08T03:57:47.436Z [DEBUG] plugin: starting plugin: path=/tmp/tfws-711432217/.terraform/plugins/linux_amd64/terraform-provider-helm_v1.0.0_x4 args=[/tmp/tfws-711432217/.terraform/plugins/linux_amd64/terraform-provider-helm_v1.0.0_x4]
2020-06-08T03:57:47.437Z [DEBUG] plugin: plugin started: path=/tmp/tfws-711432217/.terraform/plugins/linux_amd64/terraform-provider-helm_v1.0.0_x4 pid=1449
2020-06-08T03:57:47.437Z [DEBUG] plugin: waiting for RPC address: path=/tmp/tfws-711432217/.terraform/plugins/linux_amd64/terraform-provider-helm_v1.0.0_x4
2020-06-08T03:57:47.503Z [INFO] plugin.terraform-provider-helm_v1.0.0_x4: configuring server automatic mTLS: timestamp=2020-06-08T03:57:47.503Z
2020-06-08T03:57:47.550Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: plugin address: address=/tmp/plugin210273128 network=unix timestamp=2020-06-08T03:57:47.549Z
2020-06-08T03:57:47.551Z [DEBUG] plugin: using plugin: version=5
2020-06-08T03:57:47.561Z [DEBUG] plugin: plugin process exited: path=/tmp/tfws-711432217/.terraform/plugins/linux_amd64/terraform-provider-ibm_v1.5.1 pid=1438
2020-06-08T03:57:47.561Z [DEBUG] plugin: plugin exited
helm_release.node0: Modifying... [id=node81-bde8-41]
2020/06/08 03:57:47 [DEBUG] helm_release.node0: applying the planned Update change
2020-06-08T03:57:47.702Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:57:47 [INFO] Successfully initialized config
2020-06-08T03:57:47.717Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:57:47 ---[ values.yaml ]-----------------------------------
2020-06-08T03:57:47.717Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: affinity: {}
2020-06-08T03:57:47.717Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: applicationPort: 3000
2020-06-08T03:57:47.717Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: externaldb:
2020-06-08T03:57:47.717Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: type: osba
2020-06-08T03:57:47.717Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: extraEnv: {}
2020-06-08T03:57:47.717Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: getAppFromExternalRepository: true
2020-06-08T03:57:47.718Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: git:
2020-06-08T03:57:47.718Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: pullPolicy: IfNotPresent
2020-06-08T03:57:47.718Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: registry: docker.io
2020-06-08T03:57:47.718Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: repository: bitnami/git
2020-06-08T03:57:47.718Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: tag: 2.26.2-debian-10-r22
2020-06-08T03:57:47.718Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: global:
2020-06-08T03:57:47.718Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: storageClass: ibmc-block-gold
2020-06-08T03:57:47.718Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: image:
2020-06-08T03:57:47.718Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: pullPolicy: IfNotPresent
2020-06-08T03:57:47.718Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: registry: docker.io
2020-06-08T03:57:47.718Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: repository: bitnami/node
2020-06-08T03:57:47.718Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: tag: 10.20.1-debian-10-r33
2020-06-08T03:57:47.718Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: ingress:
2020-06-08T03:57:47.718Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: enabled: false
2020-06-08T03:57:47.718Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: hosts:
2020-06-08T03:57:47.718Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: - annotations: null
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: certManager: false
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: name: node.local
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: tls: false
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: tlsSecret: node.local-tls
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: mongodb:
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: install: true
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: nodeSelector: {}
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: offering_version: 10.21.0
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: persistence:
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: accessMode: ReadWriteOnce
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: enabled: false
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: path: /app/data
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: size: 1Gi
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: replicas: 1
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: repository: https://github.com/bitnami/sample-mean.git
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: resources:
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: limits: {}
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: requests: {}
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: revision: master
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: securityContext:
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: enabled: true
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: fsGroup: 1001
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: runAsUser: 1001
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: service:
2020-06-08T03:57:47.719Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: annotations: {}
2020-06-08T03:57:47.720Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: port: 80
2020-06-08T03:57:47.720Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: type: ClusterIP
2020-06-08T03:57:47.720Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: tolerations: {}
2020-06-08T03:57:47.720Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: volumePermissions:
2020-06-08T03:57:47.720Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: enabled: false
2020-06-08T03:57:47.720Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: image:
2020-06-08T03:57:47.720Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: pullPolicy: Always
2020-06-08T03:57:47.720Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: registry: docker.io
2020-06-08T03:57:47.720Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: repository: bitnami/minideb
2020-06-08T03:57:47.720Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: tag: buster
2020-06-08T03:57:47.720Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: resources:
2020-06-08T03:57:47.720Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: limits: {}
2020-06-08T03:57:47.720Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: requests: {}
2020-06-08T03:57:47.720Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4:
2020-06-08T03:57:47.720Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:57:47 [DEBUG] preparing upgrade for node81-bde8-41
helm_release.node0: Still modifying... [id=node81-bde8-41, 10s elapsed]
helm_release.node0: Still modifying... [id=node81-bde8-41, 20s elapsed]
2020-06-08T03:58:11.738Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:58:11 [DEBUG] performing update for node81-bde8-41
helm_release.node0: Still modifying... [id=node81-bde8-41, 30s elapsed]
helm_release.node0: Still modifying... [id=node81-bde8-41, 40s elapsed]
2020-06-08T03:58:33.235Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:58:33 [DEBUG] creating upgraded release for node81-bde8-41
2020-06-08T03:58:33.928Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:58:33 [DEBUG] checking 7 resources for changes
2020-06-08T03:58:35.039Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:58:35 [DEBUG] Replaced "node81-bde8-41-mongodb" with kind Secret for kind Secret
2020-06-08T03:58:36.170Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:58:36 [DEBUG] error updating the resource "node81-bde8-41-mongodb":
2020-06-08T03:58:36.170Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: failed to replace object: PersistentVolumeClaim "node81-bde8-41-mongodb" is invalid: spec: Forbidden: is immutable after creation except resources.requests for bound claims
2020-06-08T03:58:37.303Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:58:37 [DEBUG] Replaced "node81-bde8-41-mongodb" with kind ServiceAccount for kind ServiceAccount
helm_release.node0: Still modifying... [id=node81-bde8-41, 50s elapsed]
2020-06-08T03:58:38.496Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:58:38 [DEBUG] error updating the resource "node81-bde8-41-mongodb":
2020-06-08T03:58:38.496Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: failed to replace object: Service "node81-bde8-41-mongodb" is invalid: spec.clusterIP: Invalid value: "": field is immutable
2020-06-08T03:58:39.660Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:58:39 [DEBUG] error updating the resource "node81-bde8-41":
2020-06-08T03:58:39.660Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: failed to replace object: Service "node81-bde8-41" is invalid: spec.clusterIP: Invalid value: "": field is immutable
2020-06-08T03:58:40.862Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:58:40 [DEBUG] Replaced "node81-bde8-41-mongodb" with kind Deployment for kind Deployment
2020-06-08T03:58:41.959Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:58:41 [DEBUG] Replaced "node81-bde8-41" with kind Deployment for kind Deployment
2020-06-08T03:58:42.286Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:58:42 [DEBUG] warning: Upgrade "node81-bde8-41" failed: failed to replace object: PersistentVolumeClaim "node81-bde8-41-mongodb" is invalid: spec: Forbidden: is immutable after creation except resources.requests for bound claims && failed to replace object: Service "node81-bde8-41-mongodb" is invalid: spec.clusterIP: Invalid value: "": field is immutable && failed to replace object: Service "node81-bde8-41" is invalid: spec.clusterIP: Invalid value: "": field is immutable
2020-06-08T03:58:42.611Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:58:42 [DEBUG] Upgrade failed and atomic is set, rolling back to last successful release
2020-06-08T03:58:42.887Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:58:42 [DEBUG] getting history for release node81-bde8-41
2020-06-08T03:58:43.467Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:58:43 [DEBUG] preparing rollback of node81-bde8-41
2020-06-08T03:58:43.773Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:58:43 [DEBUG] rolling back node81-bde8-41 (current: v4, target: v2)
2020-06-08T03:58:44.049Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:58:44 [DEBUG] creating rolled back release for node81-bde8-41
2020-06-08T03:58:44.369Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:58:44 [DEBUG] performing rollback of node81-bde8-41
helm_release.node0: Still modifying... [id=node81-bde8-41, 1m0s elapsed]
helm_release.node0: Still modifying... [id=node81-bde8-41, 1m10s elapsed]
2020-06-08T03:59:05.569Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:59:05 [DEBUG] checking 7 resources for changes
2020-06-08T03:59:06.793Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:59:06 [DEBUG] Replaced "node81-bde8-41-mongodb" with kind Secret for kind Secret
helm_release.node0: Still modifying... [id=node81-bde8-41, 1m20s elapsed]
2020-06-08T03:59:07.924Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:59:07 [DEBUG] error updating the resource "node81-bde8-41-mongodb":
2020-06-08T03:59:07.924Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: failed to replace object: PersistentVolumeClaim "node81-bde8-41-mongodb" is invalid: spec: Forbidden: is immutable after creation except resources.requests for bound claims
2020-06-08T03:59:09.012Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:59:09 [DEBUG] Replaced "node81-bde8-41-mongodb" with kind ServiceAccount for kind ServiceAccount
2020-06-08T03:59:10.101Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:59:10 [DEBUG] error updating the resource "node81-bde8-41-mongodb":
2020-06-08T03:59:10.102Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: failed to replace object: Service "node81-bde8-41-mongodb" is invalid: spec.clusterIP: Invalid value: "": field is immutable
2020-06-08T03:59:11.186Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:59:11 [DEBUG] error updating the resource "node81-bde8-41":
2020-06-08T03:59:11.187Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: failed to replace object: Service "node81-bde8-41" is invalid: spec.clusterIP: Invalid value: "": field is immutable
2020-06-08T03:59:12.278Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:59:12 [DEBUG] Replaced "node81-bde8-41-mongodb" with kind Deployment for kind Deployment
2020-06-08T03:59:13.377Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:59:13 [DEBUG] Replaced "node81-bde8-41" with kind Deployment for kind Deployment
2020-06-08T03:59:13.377Z [DEBUG] plugin.terraform-provider-helm_v1.0.0_x4: 2020/06/08 03:59:13 [DEBUG] warning: Rollback "node81-bde8-41" failed: failed to replace object: PersistentVolumeClaim "node81-bde8-41-mongodb" is invalid: spec: Forbidden: is immutable after creation except resources.requests for bound claims && failed to replace object: Service "node81-bde8-41-mongodb" is invalid: spec.clusterIP: Invalid value: "": field is immutable && failed to replace object: Service "node81-bde8-41" is invalid: spec.clusterIP: Invalid value: "": field is immutable
2020/06/08 03:59:14 [DEBUG] helm_release.node0: apply errored, but we're indicating that via the Error pointer rather than returning it: an error occurred while rolling back the release. original upgrade error: failed to replace object: PersistentVolumeClaim "node81-bde8-41-mongodb" is invalid: spec: Forbidden: is immutable after creation except resources.requests for bound claims && failed to replace object: Service "node81-bde8-41-mongodb" is invalid: spec.clusterIP: Invalid value: "": field is immutable && failed to replace object: Service "node81-bde8-41" is invalid: spec.clusterIP: Invalid value: "": field is immutable: failed to replace object: PersistentVolumeClaim "node81-bde8-41-mongodb" is invalid: spec: Forbidden: is immutable after creation except resources.requests for bound claims && failed to replace object: Service "node81-bde8-41-mongodb" is invalid: spec.clusterIP: Invalid value: "": field is immutable && failed to replace object: Service "node81-bde8-41" is invalid: spec.clusterIP: Invalid value: "": field is immutable
2020/06/08 03:59:14 [ERROR] <root>: eval: *terraform.EvalApplyPost, err: an error occurred while rolling back the release. original upgrade error: failed to replace object: PersistentVolumeClaim "node81-bde8-41-mongodb" is invalid: spec: Forbidden: is immutable after creation except resources.requests for bound claims && failed to replace object: Service "node81-bde8-41-mongodb" is invalid: spec.clusterIP: Invalid value: "": field is immutable && failed to replace object: Service "node81-bde8-41" is invalid: spec.clusterIP: Invalid value: "": field is immutable: failed to replace object: PersistentVolumeClaim "node81-bde8-41-mongodb" is invalid: spec: Forbidden: is immutable after creation except resources.requests for bound claims && failed to replace object: Service "node81-bde8-41-mongodb" is invalid: spec.clusterIP: Invalid value: "": field is immutable && failed to replace object: Service "node81-bde8-41" is invalid: spec.clusterIP: Invalid value: "": field is immutable
s invalid: spec.clusterIP: Invalid value: "": field is immutable && failed to replace object: Service "node81-bde8-41" is invalid: spec.clusterIP: Invalid value: "": field is immutable
2020-06-08T03:59:14.033Z [DEBUG] plugin: plugin process exited: path=/tmp/tfws-711432217/.terraform/plugins/linux_amd64/terraform-provider-null_v2.1.2_x4 pid=1426
2020-06-08T03:59:14.033Z [DEBUG] plugin: plugin exited
2020-06-08T03:59:14.037Z [DEBUG] plugin: plugin process exited: path=/go/bin/terraform pid=1405
2020-06-08T03:59:14.037Z [DEBUG] plugin: plugin exited
Error: an error occurred while rolling back the release. original upgrade error: failed to replace object: PersistentVolumeClaim "node81-bde8-41-mongodb" is invalid: spec: Forbidden: is immutable after creation except resources.requests for bound claims && failed to replace object: Service "node81-bde8-41-mongodb" is invalid: spec.clusterIP: Invalid value: "": field is immutable && failed to replace object: Service "node81-bde8-41" is invalid: spec.clusterIP: Invalid value: "": field is immutable: failed to replace object: PersistentVolumeClaim "node81-bde8-41-mongodb" is invalid: spec: Forbidden: is immutable after creation except resources.requests for bound claims && failed to replace object: Service "node81-bde8-41-mongodb" is invalid: spec.clusterIP: Invalid value: "": field is immutable && failed to replace object: Service "node81-bde8-41" is invalid: spec.clusterIP: Invalid value: "": field is immutable
on main.tf line 42, in resource "helm_release" "node0":
42: resource "helm_release" "node0" {
2020-06-08T03:59:14.045Z [DEBUG] plugin: plugin process exited: path=/tmp/tfws-711432217/.terraform/plugins/linux_amd64/terraform-provider-helm_v1.0.0_x4 pid=1449
2020-06-08T03:59:14.045Z [DEBUG] plugin: plugin exited
Panic Output
Expected Behavior
Terraform apply should update the latest helm release without failure.
Actual Behavior
Terraform apply failed with error
Error: an error occurred while rolling back the release. original upgrade error: failed to replace object: PersistentVolumeClaim "node81-bde8-41-mongodb" is invalid: spec: Forbidden: is immutable after creation except resources.requests for bound claims && failed to replace object: Service "node81-bde8-41-mongodb" is invalid: spec.clusterIP: Invalid value: "": field is immutable && failed to replace object: Service "node81-bde8-41" is invalid: spec.clusterIP: Invalid value: "": field is immutable: failed to replace object: PersistentVolumeClaim "node81-bde8-41-mongodb" is invalid: spec: Forbidden: is immutable after creation except resources.requests for bound claims && failed to replace object: Service "node81-bde8-41-mongodb" is invalid: spec.clusterIP: Invalid value: "": field is immutable && failed to replace object: Service "node81-bde8-41" is invalid: spec.clusterIP: Invalid value: "": field is immutable
Steps to Reproduce
- Create local helm release repo with https://charts.bitnami.com/ibm/node-11.4.22.tgz
- Extract above zip into folder called
node
- Create terraform template with IKS cluster and helm release
resource "helm_release" "node0" {
atomic = "false"
chart = "./node"
force_update = "true"
name = "node81-bde8-41"
namespace = "default"
set {
name = "offering_version"
value ="10.20.1"
}
recreate_pods = "true"
values = [ file("./override.yaml")]
wait = "false"
}
- Do terraform apply with proper IKS cluster details
- Initial helm release version will complete without any issue.
- Now update the
node
folder with latest node helm charthttps://charts.bitnami.com/ibm/node-11.4.23.tgz
- Update the Terraform template with latest version details so that helm release will be updated with latest version.
resource "helm_release" "node0" {
atomic = "true"
chart = "./node"
force_update = "true"
name = "node81-bde8-41"
namespace = "default"
set {
name = "offering_version"
value ="10.21.0"
}
recreate_pods = "true"
values = [ file("./override.yaml")]
wait = "false"
}
8. Now perform terraform apply and it fails with
**"failed to replace object: PersistentVolumeClaim "node81-bde8-41-mongodb" is invalid: spec: Forbidden: is immutable after creation except resources.requests for bound claims && failed to replace object: Service "node81-bde8-41-mongodb" is invalid: spec.clusterIP: Invalid value: "": field is immutable && failed to replace object: Service "node81-bde8-41" is invalid: spec.clusterIP: Invalid value: "": field is immutable: failed to replace object: PersistentVolumeClaim "node81-bde8-41-mongodb" is invalid: spec: Forbidden: is immutable after creation except resources.requests for bound claims && failed to replace object: Service "node81-bde8-41-mongodb" is invalid: spec.clusterIP: Invalid value: "": field is immutable && failed to replace object: Service "node81-bde8-41" is invalid: spec.clusterIP: Invalid value: "": field is immutable"**
Note :
1. If i remove "recreate_pods = "true" from the terraform template then there is no error, the PODS is recreated but not with latest version (pod image version not updated to latest release)
2. Same issue with latest terraform helm provider version 1.2.2 also
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
@mkmrah is this issue reproducible when upgrading the chart with helm (without the provider)?
@aareet sorry for the delay.. not yet tried with helm client and i suspect this may be related to https://github.com/helm/helm/issues/7956
I see this same issue with several charts (such as bitnami/harbor), and it is not reproducible when using helm directly - I can upgrade the chart fine when using helm. Here is the error I get when attempting to upgrade the chart listed above:
Error: failed to replace object: PersistentVolumeClaim "harbor-chartmuseum" is invalid: spec: Forbidden: is immutable after creation except resources.requests for bound claims && failed to replace object: PersistentVolumeClaim "harbor-jobservice" is invalid: spec: Forbidden: is immutable after creation except resources.requests for bound claims && failed to replace object: PersistentVolumeClaim "harbor-registry" is invalid: spec: Forbidden: is immutable after creation except resources.requests for bound claims && failed to replace object: Service "harbor-chartmuseum" is invalid: spec.clusterIP: Invalid value: "": field is immutable && failed to replace object: Service "harbor-clair" is invalid: spec.clusterIP: Invalid value: "": field is immutable && failed to replace object: Service "harbor-core" is invalid: spec.clusterIP: Invalid value: "": field is immutable && failed to replace object: Service "harbor-jobservice" is invalid: spec.clusterIP: Invalid value: "": field is immutable && failed to replace object: Service "harbor-notary-server" is invalid: spec.clusterIP: Invalid value: "": field is immutable && failed to replace object: Service "harbor-notary-signer" is invalid: spec.clusterIP: Invalid value: "": field is immutable && failed to replace object: Service "harbor-portal" is invalid: spec.clusterIP: Invalid value: "": field is immutable && failed to replace object: Service "harbor-registry" is invalid: spec.clusterIP: Invalid value: "": field is immutable && failed to replace object: Service "harbor-trivy" is invalid: spec.clusterIP: Invalid value: "": field is immutable
Upgrading the chart via helm succeeds, after which I can run the terraform script without errors.
This happens with seemingly every single chart I change any values on, tons on immutable errors. Currently the only way to change anything properly is to then taint the helm_release and redeploy it. And that is with using much newer versions than the OP.
We have the same problem using the official gitlab chart : https://docs.gitlab.com/charts/
With the provider (v2.0.2) after setting a fake value to force upgrade :
`helm_release.code: Modifying... [id=code]
helm_release.code: Still modifying... [id=code, 10s elapsed]
helm_release.code: Still modifying... [id=code, 20s elapsed]
helm_release.code: Still modifying... [id=code, 30s elapsed]
Error: failed to replace object: Service "code-gitlab-exporter" is invalid: spec.clusterIP: Invalid value: "": field is immutable && failed to replace object: Service "code-gitlab-shell" is invalid: spec.clusterIP: Invalid value: "": field is immutable && failed to replace object: Service "code-webservice-default" is invalid: spec.clusterIP: Invalid value: "":`
With helm in command line (v3.5.2):
helm get values code > value_update.yaml
// Modifying a fake value
helm upgrade code ./ -f value_update.yaml
Release "code" has been upgraded. Happy Helming!
NAME: code
LAST DEPLOYED: Wed Feb 10 16:12:50 2021
NAMESPACE: debug
STATUS: deployed
REVISION: 3
It seems to be related to either the force_update
or the recreate_pods
options, if we set both to false it runs.
So we have:
recreate_pods = false
reuse_values = true
force_update = false
as options and the updates progress correctly. (Although pods are of course not restarted)
If we try as below , any new changes to the helm values is not getting applied. It just stays with the older version
recreate_pods = false
reuse_values = true
force_update = false
In case of the loki-stack
helm chart (from https://grafana.github.io/helm-charts) none of the listed workarounds are working when upgrading the chart version.
I'm also getting this with the bitnami/redis charts. Its VERY frustrating that this is easily reproduced, very problematic if it prevents security upgrades, and yet is completely broken for over 18 months. Simple replication.
- Deploy bitnami/redis helm chart
- Change the persistent storage disk size or try to upgrade to a more recent version. It will fail with ALL combinations of true and false for "recreate_pods" "reuse_values" and "force_update"... not being able to upgrade any chart using statefulsets is a massive limitation that needs to either be documented in 144pt bold flashing font... or fixed.
Almost three years later and this is still in "needs-investigation"? Come on, guys. This is a big issue!
This also happens to me when deploying prometheus and chaos-mesh Helm Charts. Updating them manually with helm
works fine!
Here's a sample output for the helm_release
:
Error: failed to replace object: PersistentVolumeClaim "chaos-mesh-chaos-dashboard" is invalid: spec: Forbidden: spec is immutable after creation except resources.requests for bound claims
core.PersistentVolumeClaimSpec{
AccessModes: {"ReadWriteOnce"},
Selector: nil,
Resources: {Requests: {s"storage": {i: {...}, Format: "BinarySI"}}},
- VolumeName: "pvc-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+ VolumeName: "",
StorageClassName: &"standard-rwo",
VolumeMode: &"Filesystem",
... // 2 identical fields
}
Having the same issue of immutable values when trying to update the step-issuer
Helm chart.
Do we have any updates on this? Or still an issue? Anyone able to implement a workaround?
Still a problem...
For JupyterHub zero to Kubernetes if a config change occurs as everyone else has mentioned, it'll give the immutable PVC error as shown. A hack is to have the helm_resource depend on kubectl_manifest, or something that can be used to delete the pod + pvc. This is much better then having to taint the whole helm release.