chore: only provision BackendConfig if available #76
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add
.Capablities
checks for the cloud.google.com/v1 group to the lighttpd and krakend BackendConfig resources. This CRD is only available on GKE and blocks install on other cluster types otherwise.Caveats:
More on these after the jump.
No generic replacement
This particular resource appears like it'd only be useful on GKE. The generic equivalent of the healthcheck is the Pod template readiness or liveness check. krakend already uses an equivalent readiness check, but lighttp uses a command-based readiness check instead.
Some features of BackendConfig may be available in GWAPI configuration, but those configuration parameters will almost always be in Extended support, and won't be available across all GWAPI implementations.
GWAPI does not provide an healthcheck feature specific to individual Route resources AFAIK.
As an example of something that is available via both BackendConfig and GWAPI, https://gateway-api.sigs.k8s.io/geps/gep-1742 does appear to be in the released GWAPI APIs (based on https://gateway-api.sigs.k8s.io/reference/spec/#gateway.networking.k8s.io/v1.HTTPRouteTimeouts). We're not setting timeouts though, so I don't think there's any reason to add that or other Extended configuration to the HTTPRoutes yet.
CD integrations do not support standard Helm features that require API server communication
.Capabilities
checks (and anything that involves talking to the Kubernetes API server, such aslookup
) historically have not played nicely with CD Helm integrations that invokehelm template
instead ofhelm install
. Some CD applications have partial workarounds for this.IIRC ArgoCD does a decent job of handling its own
.Capabilities
-style lookups and passing--api-versions
tohelm template
. I don't recall other CD solutions that do, but I have less experience with them. I didn't find good info for FluxCD on a cursory search.helm/helm#9426 maybe allows CD systems that use
helm template
(somewhat confusingly, you can use--dry-run
withhelm template
, and IIRC the server communication works as expected with it--I recall playing with it a while ago). However, I haven't reviewed adoption of this feature across CD solutions. Some have feature issues linked to that Helm issue.