Terraform v0.13.5
# Add a startup probe to the containerspec inside of a stateful set
startup_probe {
tcp_socket {
port = 9092
}
tcp_socket {
port = 9093
}
tcp_socket {
port = 9094
}
initial_delay_seconds = 30
timeout_seconds = 1
}
I expected that a startup_probe will be added to the existing statefulset. It is shown in the plan and the apply diff. When I apply this, the cli also say that the change was complete/succesful, however the startup probe is actually never added. The next apply/plan the exact same diff is shown again.
The startup probe is not added to the statefulset set container
a startup_probe to an already (with Terraform) deployed stateful set
I just hit this one too. I learned that this is a Kube issue. It accepts the spec and silently doesn't apply the startupProbe if the feature isn't enabled. This feature is only enabled by default in Kube 1.18 (when the feature enters beta). To get access to this feature in < Kube 1.18 you have to specify a "StartupProbe" feature flag. We don't have this enabled on our cluster, so this silently fails.
https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/
It's really a bummer that this silently fails like this instead of having an error.
This is a problem in some other places to like ttl_seconds_after_finished on the job resource. It's annoying because there isn't an easy way for the provider to check which feature gates are actually switched on so we could warn you about this.
The only way to do it at the moment is to actually grab the args for the apiserver and check for the --feature-gates flag, which probably isn't going to work for clusters with managed control planes.
Most helpful comment
This is a problem in some other places to like
ttl_seconds_after_finishedon the job resource. It's annoying because there isn't an easy way for the provider to check which feature gates are actually switched on so we could warn you about this.The only way to do it at the moment is to actually grab the args for the apiserver and check for the
--feature-gatesflag, which probably isn't going to work for clusters with managed control planes.