Introduced InferenceService autogenerated Ingress templates for annotations and tls config #4815
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.
What this PR does / why we need it:
Added full templating support for Ingress/annotations/TLS in the InferenceService controller:
users can now define annotationsTemplate and tlsTemplate in their InferenceServicesConfig
(or ConfigMap) using the fields {{ .Name }}, {{ .Namespace }}, and {{ .IngressDomain }}
to generate annotations, TLS hosts and TLS Secret name dynamically.
Type of changes
Feature/Issue validation/testing:
=== RUN TestNewIngressConfig === RUN TestNewIngressConfig/loads_annotationsTemplate_and_tlsTemplate_from_ingress_config --- PASS: TestNewIngressConfig (0.00s) --- PASS: TestNewIngressConfig/loads_annotationsTemplate_and_tlsTemplate_from_ingress_config (0.00s) === RUN TestRenderStringTemplate_WithIngressDomain --- PASS: TestRenderStringTemplate_WithIngressDomain (0.00s) === RUN TestNewIngressConfigDefaultKnativeService --- PASS: TestNewIngressConfigDefaultKnativeService (0.00s) === RUN TestNewIngressConfig_Validation === RUN TestNewIngressConfig_Validation/returns_error_on_invalid_ingress_config_json === RUN TestNewIngressConfig_Validation/returns_error_if_ingressGateway_is_missing === RUN TestNewIngressConfig_Validation/returns_error_if_pathTemplate_is_invalid_template === RUN TestNewIngressConfig_Validation/returns_error_if_pathTemplate_is_set_but_ingressDomain_is_missing === RUN TestNewIngressConfig_Validation/returns_error_if_EnableGatewayAPI_is_true_and_kserveIngressGateway_is_missing === RUN TestNewIngressConfig_Validation/returns_error_if_EnableGatewayAPI_is_true_and_kserveIngressGateway_is_invalid === RUN TestNewIngressConfig_Validation/returns_config_with_defaults_when_config_map_is_empty === RUN TestNewIngressConfig_Validation/sets_KnativeLocalGatewayService_from_LocalGatewayServiceName_if_missing === RUN TestNewIngressConfig_Validation/returns_error_if_pathTemplate_is_valid_but_ingressDomain_is_empty === RUN TestNewIngressConfig_Validation/returns_config_when_all_required_fields_are_present --- PASS: TestNewIngressConfig_Validation (0.00s) --- PASS: TestNewIngressConfig_Validation/returns_error_on_invalid_ingress_config_json (0.00s) --- PASS: TestNewIngressConfig_Validation/returns_error_if_ingressGateway_is_missing (0.00s) --- PASS: TestNewIngressConfig_Validation/returns_error_if_pathTemplate_is_invalid_template (0.00s) --- PASS: TestNewIngressConfig_Validation/returns_error_if_pathTemplate_is_set_but_ingressDomain_is_missing (0.00s) --- PASS: TestNewIngressConfig_Validation/returns_error_if_EnableGatewayAPI_is_true_and_kserveIngressGateway_is_missing (0.00s) --- PASS: TestNewIngressConfig_Validation/returns_error_if_EnableGatewayAPI_is_true_and_kserveIngressGateway_is_invalid (0.00s) --- PASS: TestNewIngressConfig_Validation/returns_config_with_defaults_when_config_map_is_empty (0.00s) --- PASS: TestNewIngressConfig_Validation/sets_KnativeLocalGatewayService_from_LocalGatewayServiceName_if_missing (0.00s) --- PASS: TestNewIngressConfig_Validation/returns_error_if_pathTemplate_is_valid_but_ingressDomain_is_empty (0.00s) --- PASS: TestNewIngressConfig_Validation/returns_config_when_all_required_fields_are_present (0.00s) PASS ok github.com/kserve/kserve/pkg/apis/serving/v1beta1 0.049sSpecial notes for your reviewer:
NONE
Checklist:
Release note: