Use capabilities introspection to know which API version should be targeted for the resources #114
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.
Description
This allows the
k8s-service
chart to be more flexible in targeting different Kubernetes versions, while still avoiding deprecated interfaces. For example,PodDisruptionBudget
was located inpolicy/v1beta1
, but has been moved topolicy/v1
, and the version inpolicy/v1beta1
is now marked for deprecation since k8s 1.21. If the helm chart is being installed to a k8s cluster <1.21, then it is preferred to usepolicy/v1beta1
, while targeting k8s cluster >=1.21 requires usingpolicy/v1
. To support this, we can introspect theCapabilities
built in object to get metadata about the target k8s cluster, and select the right version to use based on that.This PR addresses this kind of API discrepancy for
Ingress
andPodDisruptionBudget
resources.TODOs
feature/new-vpc-endpoints-955
orbug/missing-count-param-434
.