mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47:04 +02:00
feat(common): Release v2.4.0 (#245)
Signed-off-by: Christopher Larivière <lariviere.c@gmail.com> Co-authored-by: Christopher Larivière <lariviere.c@gmail.com> Co-authored-by: Markus Reiter <me@reitermark.us>
This commit is contained in:
parent
44b1665b61
commit
3d3028b889
30 changed files with 364 additions and 61 deletions
|
@ -31,3 +31,17 @@ tests:
|
|||
equal:
|
||||
path: spec.template.spec.containers[0].image
|
||||
value: ghcr.io/mendhak/http-https-echo:1.23
|
||||
|
||||
- it: template tag should pass
|
||||
set:
|
||||
controllers.main.containers.main.image:
|
||||
repository: ghcr.io/mendhak/http-https-echo
|
||||
tag: "{{.Chart.Version}}"
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].image
|
||||
value: ghcr.io/mendhak/http-https-echo:1.0.0
|
||||
|
|
|
@ -37,13 +37,13 @@ tests:
|
|||
second-container:
|
||||
image:
|
||||
repository: ghcr.io/mendhak/http-https-echo
|
||||
tag: 30
|
||||
tag: 31
|
||||
second:
|
||||
containers:
|
||||
first-container:
|
||||
image:
|
||||
repository: ghcr.io/mendhak/http-https-echo
|
||||
tag: 30
|
||||
tag: 31
|
||||
|
||||
persistence:
|
||||
data:
|
||||
|
@ -268,7 +268,7 @@ tests:
|
|||
second-container:
|
||||
image:
|
||||
repository: ghcr.io/mendhak/http-https-echo
|
||||
tag: 30
|
||||
tag: 31
|
||||
asserts:
|
||||
- documentIndex: &StatefulSetDoc 0
|
||||
isKind:
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
|
||||
suite: container workingDir override
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
- it: default should pass
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
notExists:
|
||||
path: spec.template.spec.containers[0].workingDir
|
||||
|
||||
- it: string should pass
|
||||
set:
|
||||
controllers.main.containers.main.workingDir: /work
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].workingDir
|
||||
value: /work
|
||||
|
||||
- it: quoted string should pass
|
||||
set:
|
||||
controllers.main.containers.main.workingDir: "/work"
|
||||
asserts:
|
||||
- documentIndex: 0
|
||||
isKind:
|
||||
of: Deployment
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.template.spec.containers[0].workingDir
|
||||
value: /work
|
|
@ -26,7 +26,7 @@ tests:
|
|||
main:
|
||||
image:
|
||||
repository: ghcr.io/mendhak/http-https-echo
|
||||
tag: 30
|
||||
tag: 31
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
|
@ -62,7 +62,7 @@ tests:
|
|||
main:
|
||||
image:
|
||||
repository: ghcr.io/mendhak/http-https-echo
|
||||
tag: 30
|
||||
tag: 31
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 3
|
||||
|
|
|
@ -38,13 +38,13 @@ tests:
|
|||
second-container:
|
||||
image:
|
||||
repository: ghcr.io/mendhak/http-https-echo
|
||||
tag: 30
|
||||
tag: 31
|
||||
second:
|
||||
containers:
|
||||
first-container:
|
||||
image:
|
||||
repository: ghcr.io/mendhak/http-https-echo
|
||||
tag: 30
|
||||
tag: 31
|
||||
|
||||
persistence:
|
||||
config:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
|
||||
suite: ingress service reference
|
||||
suite: route service reference
|
||||
templates:
|
||||
- common.yaml
|
||||
tests:
|
||||
|
@ -11,6 +11,14 @@ tests:
|
|||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
rules:
|
||||
- backendRefs:
|
||||
- group: ""
|
||||
kind: Service
|
||||
name: RELEASE-NAME
|
||||
namespace: NAMESPACE
|
||||
port: 8080
|
||||
weight: 1
|
||||
asserts:
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
isKind:
|
||||
|
@ -54,3 +62,55 @@ tests:
|
|||
namespace: serviceNamespace
|
||||
port: 1234
|
||||
weight: 123
|
||||
|
||||
- it: custom service reference with filter should fail
|
||||
set:
|
||||
route.main:
|
||||
enabled: true
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
rules:
|
||||
- backendRefs:
|
||||
- group: test
|
||||
name: pathService
|
||||
port: 1234
|
||||
namespace: serviceNamespace
|
||||
weight: 123
|
||||
filters:
|
||||
- type: RequestRedirect
|
||||
requestRedirect:
|
||||
scheme: https
|
||||
statusCode: 301
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: "backend refs and request redirect filters cannot co-exist."
|
||||
|
||||
- it: custom service with filter should pass
|
||||
set:
|
||||
route.main:
|
||||
enabled: true
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
rules:
|
||||
- filters:
|
||||
- type: RequestRedirect
|
||||
requestRedirect:
|
||||
scheme: https
|
||||
statusCode: 301
|
||||
asserts:
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: *HTTPRouteDocument
|
||||
equal:
|
||||
path: spec.rules[0].filters[0]
|
||||
value:
|
||||
type: RequestRedirect
|
||||
requestRedirect:
|
||||
scheme: https
|
||||
statusCode: 301
|
||||
- documentIndex: *HTTPRouteDocument
|
||||
notExists:
|
||||
path: spec.rules[0].backendRefs[0]
|
||||
|
|
|
@ -73,6 +73,8 @@ tests:
|
|||
- backendRefs:
|
||||
- name: test
|
||||
namespace: test
|
||||
kind: Service
|
||||
weight: 1
|
||||
matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
|
@ -83,6 +85,8 @@ tests:
|
|||
path:
|
||||
type: ReplacePrefixMatch
|
||||
replacePrefixMatch: ""
|
||||
timeouts:
|
||||
backendRequest: 30s
|
||||
grpc:
|
||||
enabled: true
|
||||
kind: GRPCRoute
|
||||
|
@ -93,6 +97,8 @@ tests:
|
|||
- backendRefs:
|
||||
- name: test
|
||||
namespace: test
|
||||
kind: Service
|
||||
weight: 1
|
||||
matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
|
@ -113,6 +119,8 @@ tests:
|
|||
- backendRefs:
|
||||
- name: test
|
||||
namespace: test
|
||||
kind: Service
|
||||
weight: 1
|
||||
matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
|
@ -133,6 +141,8 @@ tests:
|
|||
- backendRefs:
|
||||
- name: test
|
||||
namespace: test
|
||||
kind: Service
|
||||
weight: 1
|
||||
matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
|
@ -153,6 +163,8 @@ tests:
|
|||
- backendRefs:
|
||||
- name: test
|
||||
namespace: test
|
||||
kind: Service
|
||||
weight: 1
|
||||
matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
|
@ -229,6 +241,9 @@ tests:
|
|||
- documentIndex: &HTTPRouteDocument 6
|
||||
notExists:
|
||||
path: spec.rules[0].filters
|
||||
- documentIndex: &HTTPRouteDocument 6
|
||||
notExists:
|
||||
path: spec.rules[0].timeouts
|
||||
|
||||
- it: hostnames shouldn't be used for TCPRoutes and UDPRoutes
|
||||
set:
|
||||
|
@ -291,3 +306,49 @@ tests:
|
|||
equal:
|
||||
path: spec.parentRefs[0].sectionName
|
||||
value: parentSection
|
||||
|
||||
- it: timeouts should only be used for HTTPRoutes
|
||||
set:
|
||||
route:
|
||||
main:
|
||||
enabled: true
|
||||
kind: HTTPRoute
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
rules:
|
||||
- backendRefs:
|
||||
- name: test
|
||||
namespace: test
|
||||
timeouts:
|
||||
backendRequest: 30s
|
||||
grpc:
|
||||
enabled: true
|
||||
kind: GRPCRoute
|
||||
parentRefs:
|
||||
- name: parentName
|
||||
namespace: parentNamespace
|
||||
rules:
|
||||
- backendRefs:
|
||||
- name: test
|
||||
namespace: test
|
||||
matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /test
|
||||
timeouts:
|
||||
backendRequest: 10s
|
||||
asserts:
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
isKind:
|
||||
of: GRPCRoute
|
||||
- documentIndex: &HTTPRouteDocument 2
|
||||
notExists:
|
||||
path: spec.rules[0].timeouts.backendRequest
|
||||
- documentIndex: &HTTPRouteDocument 3
|
||||
isKind:
|
||||
of: HTTPRoute
|
||||
- documentIndex: &HTTPRouteDocument 3
|
||||
equal:
|
||||
path: spec.rules[0].timeouts.backendRequest
|
||||
value: 30s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue