You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An error occurs when attempting to install the file sloth.slok.dev_prometheusservicelevels.yaml using terraform and the kubernetes provider (kubernetes_manifest resource). Reproduced using hashicorp/kubernetes v2.7.1 and Terraform v1.0.11
Error: Forbidden attribute key in "manifest" value
with kubernetes_manifest.sloth_crd,
on sloth.tf line 16, in resource "kubernetes_manifest" "sloth_crd":
16: resource "kubernetes_manifest" "sloth_crd" {
'status' attribute key is not allowed in manifest configuration
Using the sloth CRD to install the sloth operator via terraform generates an error due to the unexpected .status element at the root level.
As mentioned in the kubernetes-alpha provider repo here "..the status field seems to be a read-only field from the user perspective. It makes little sense to pass this field to the API server ..in Terraform we use the exact configuration supplied by the user and instead validate before applying and report an error."
The workaround is to remove the .status properties (and sub-elements) from the CRD yaml file.
The text was updated successfully, but these errors were encountered:
The CRDs are autogenerated with official Kubernetes tooling (https://github.com/kubernetes/code-generator). As you may see in these examples of official and very common deployed stacks, also have it:
I'm not saying that is ok, however, ignoring status it's a minor thing, that doesn't hurt anyone and reduces complexity on all sides, even, other official tools like kubectl/apiserver are already doing it.
An error occurs when attempting to install the file sloth.slok.dev_prometheusservicelevels.yaml using terraform and the kubernetes provider (kubernetes_manifest resource). Reproduced using hashicorp/kubernetes v2.7.1 and Terraform v1.0.11
example terraform:
Using the sloth CRD to install the sloth operator via terraform generates an error due to the unexpected .status element at the root level.
As mentioned in the kubernetes-alpha provider repo here "..the status field seems to be a read-only field from the user perspective. It makes little sense to pass this field to the API server ..in Terraform we use the exact configuration supplied by the user and instead validate before applying and report an error."
The workaround is to remove the .status properties (and sub-elements) from the CRD yaml file.
The text was updated successfully, but these errors were encountered: