-
Notifications
You must be signed in to change notification settings - Fork 483
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: version check for Kong Gateway with KIC >=3.0.0
- Loading branch information
1 parent
5a20e6e
commit 2e1fce6
Showing
4 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{{- /* | ||
This file contains checks of prerequisites to render a fully correct chart that will install a fully functioning application. | ||
In case of failure, it will cause the whole chart to fail with a descriptive message. | ||
*/}} | ||
|
||
{{ $kicVersion := (include "kong.effectiveVersion" .Values.controller.ingressController.image) -}} | ||
{{ $kongGatewayVersion := (include "kong.effectiveVersion" .Values.gateway.image) -}} | ||
{{- if (and (semverCompare ">= 3.0.0" $kicVersion ) (semverCompare "< 3.4.1" $kongGatewayVersion )) -}} | ||
{{- fail (printf "Kong Gateway in version: %s is not supported by Kong Kubernetes Ingress Controller in version: %s (>=3.0.0), the lowest supported version is 3.4.1" | ||
$kongGatewayVersion $kicVersion) -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{{- /* | ||
This file contains checks of prerequisites to render a fully correct chart that will install a fully functioning application. | ||
In case of failure, it will cause the whole chart to fail with a descriptive message. | ||
*/}} | ||
|
||
{{ $kicVersion := (include "kong.effectiveVersion" .Values.ingressController.image) -}} | ||
{{ $kongGatewayVersion := (include "kong.effectiveVersion" .Values.image) -}} | ||
{{- if (and (semverCompare ">= 3.0.0" $kicVersion ) (semverCompare "< 3.4.1" $kongGatewayVersion )) -}} | ||
{{- fail (printf "Kong Gateway in version: %s is not supported by Kong Kubernetes Ingress Controller in version: %s (>=3.0.0), the lowest supported version is 3.4.1" | ||
$kongGatewayVersion $kicVersion) -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters