terraform-provider-kubernetes
terraform-provider-kubernetes copied to clipboard
ETA of support of features > 1.28. K8s already at 1.32.
Question
K8s is already at version 1.32.... When will the provider start supporting features > 1.28. This is getting more and more of a pain to work with.
We can't use sidecars unless we use kubernetes_manifest -> https://github.com/hashicorp/terraform-provider-kubernetes/issues/2446
~The go provider is so old than even with kubernetes_manifest we can't create a sidecar with a startup probe..~
Edit: that part was actually a mistake/one off.
...
"startupProbe" = {
"exec" = {
"command" = [
"sh", "-c", "nc -z localhost 8000"
]
}
"initialDelaySeconds" = 3
"periodSeconds" = 2
"failureThreshold" = 30
}
...
│ Error: spec.template.spec.initContainers[1].startupProbe
...
│ 13: resource "kubernetes_manifest" "deployment" {
│
│ Required value: must specify a handler type
Hi and thanks for raising this issue. We're aware that restart_policy is missing from init_container and this isn't the only schema inconsistency in the provider. We're working on a comprehensive solution to cover all of the missing attributes consistently, through code generation.
In the example you shared, the error message that you are getting ("Required value: must specify a handler type") is actually coming from the Kubernetes API and not the provider itself. One possible reason is the PodLifecycleSleepAction API feature gate not being ON for cluster versions up to 1.29.
Which version are you running this example on?
Hi and thanks for raising this issue. We're aware that
restart_policyis missing frominit_containerand this isn't the only schema inconsistency in the provider. We're working on a comprehensive solution to cover all of the missing attributes consistently, through code generation.
But still no ETA on that?
At least it's a good news that you guys are working on something that will automate that process so that in the future you can keep up with K8s release more easily.
In the example you shared, the error message that you are getting ("Required value: must specify a handler type") is actually coming from the Kubernetes API and not the provider itself. One possible reason is the
PodLifecycleSleepActionAPI feature gate not being ON for cluster versions up to 1.29.Which version are you running this example on?
We're using 1.31. I made a simple test this morning to show the issue and I couldn't reproduce. It's actually working. I've asked my coworker to try to reproduce that error again and he can't....
@alexsomesan Still we cannot use sidecars with the current version of the provider.
Even with kubernetes_manifest there are blockers on resources that are as complex as deployments:
- https://github.com/hashicorp/terraform-provider-kubernetes/issues/2259
- https://github.com/hashicorp/terraform-provider-kubernetes/issues/2681
- https://github.com/hashicorp/terraform-provider-kubernetes/issues/2639
- https://github.com/hashicorp/terraform-provider-kubernetes/issues/2436
TL;DR; Always cause drift, startup probe not working, etc ...
We're working on a comprehensive solution to cover all of the missing attributes consistently, through code generation.
Is there any update on this future solution?
Also blocked by lack of restart_policy.
@alexsomesan we are currently trying to use PodLifecycleSleepAction instead of exec based preStop hooks since our images no longer provide a shell/sleep. Could you please share when we can expect an update to the terraform provider so that we can make use of the feature? (Our cluster already runs version 1.33.x - so the terraform provider is the only blocker atm)
We're also blocked by this. Any progress?
Just to throw another name on the list, we would love to use the deployment resource but are forced to use the manifest escape hatch because of the sidecar pattern not being supported.
@jrhouston you seem to be the most active reviewer on this repository. Can you give us any information related to this issue? Can we expect anything any time soon?