-
Notifications
You must be signed in to change notification settings - Fork 61
failed to create typed patch object #152
Comments
@ggolub I just tried your configuration with the new v0.3.0 and I can apply it successfully. Be aware of that you currently need to specify a value for the Once you add the |
For reference, this is the configuration that worked for me:
|
@alexsomesan Thanks for the update. I upgraded to 3.0 and, using your configuration, was able to get past the original error. However, I've since changed path to use jaeger-operator and am running into a similar issue:
Here's the code:
Removing resource kubernetes_manifest.jaeger-instance allows the plan to complete successfully. |
Terraform, Provider, Kubernetes versions
Affected Resource(s)
kubernetes_manifest
Terraform Configuration Files
resource "kubernetes_manifest" "deployment_jaeger" {
provider = kubernetes-alpha
manifest = {
"apiVersion" = "apps/v1"
"kind" = "Deployment"
"metadata" = {
"labels" = {
"app" = "jaeger"
}
"name" = "jaeger"
"namespace" = "istio-system"
}
"spec" = {
"selector" = {
"matchLabels" = {
"app" = "jaeger"
}
}
"template" = {
"metadata" = {
"annotations" = {
"prometheus.io/port" = "14269"
"prometheus.io/scrape" = "true"
"sidecar.istio.io/inject" = "false"
}
"labels" = {
"app" = "jaeger"
}
}
"spec" = {
"containers" = [
{
"env" = [
{
"name" = "BADGER_EPHEMERAL"
"value" = "false"
},
{
"name" = "SPAN_STORAGE_TYPE"
"value" = "badger"
},
{
"name" = "BADGER_DIRECTORY_VALUE"
"value" = "/badger/data"
},
{
"name" = "BADGER_DIRECTORY_KEY"
"value" = "/badger/key"
},
{
"name" = "COLLECTOR_ZIPKIN_HTTP_PORT"
"value" = "9411"
},
{
"name" = "MEMORY_MAX_TRACES"
"value" = "50000"
},
{
"name" = "QUERY_BASE_PATH"
"value" = "/jaeger"
},
]
"image" = "docker.io/jaegertracing/all-in-one:1.20"
"livenessProbe" = {
"httpGet" = {
"path" = "/"
"port" = 14269
}
}
"name" = "jaeger"
"readinessProbe" = {
"httpGet" = {
"path" = "/"
"port" = 14269
}
}
"resources" = {
"requests" = {
"cpu" = "10m"
}
}
"volumeMounts" = [
{
"mountPath" = "/badger"
"name" = "data"
},
]
},
]
"volumes" = [
{
"emptyDir" = {}
"name" = "data"
},
]
}
}
}
}
}
resource "kubernetes_manifest" "service_tracing" {
provider = kubernetes-alpha
manifest = {
"apiVersion" = "v1"
"kind" = "Service"
"metadata" = {
"labels" = {
"app" = "jaeger"
}
"name" = "tracing"
"namespace" = "istio-system"
}
"spec" = {
"ports" = [
{
"name" = "http-query"
"port" = 80
"protocol" = "TCP"
"targetPort" = 16686
},
]
"selector" = {
"app" = "jaeger"
}
"type" = "ClusterIP"
}
}
}
resource "kubernetes_manifest" "service_zipkin" {
provider = kubernetes-alpha
manifest = {
"apiVersion" = "v1"
"kind" = "Service"
"metadata" = {
"labels" = {
"name" = "zipkin"
}
"name" = "zipkin"
"namespace" = "istio-system"
}
"spec" = {
"ports" = [
{
"name" = "http-query"
"port" = 9411
"targetPort" = 9411
},
]
"selector" = {
"app" = "jaeger"
}
}
}
}
resource "kubernetes_manifest" "service_jaeger_collector" {
provider = kubernetes-alpha
manifest = {
"apiVersion" = "v1"
"kind" = "Service"
"metadata" = {
"labels" = {
"app" = "jaeger"
}
"name" = "jaeger-collector"
"namespace" = "istio-system"
}
"spec" = {
"ports" = [
{
"name" = "jaeger-collector-http"
"port" = 14268
"protocol" = "TCP"
"targetPort" = 14268
},
{
"name" = "jaeger-collector-grpc"
"port" = 14250
"protocol" = "TCP"
"targetPort" = 14250
},
]
"selector" = {
"app" = "jaeger"
}
"type" = "ClusterIP"
}
}
}
Debug Output
Panic Output
Steps to Reproduce
terraform plan -out config.plan
Expected Behavior
What should have happened?
Jaeger deployed to Kubernetes cluster
Actual Behavior
What actually happened? Got error during plan:
Error: rpc error: code = Unknown desc = update dry-run for 'istio-system/zipkin' failed: failed to create typed patch object: .spec.ports: element 0: associative list with keys has an element that omits key field "protocol"
Important Factoids
References
Community Note
The text was updated successfully, but these errors were encountered: