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:
Bernd Schorgers 2023-12-10 09:56:08 +01:00 committed by GitHub
parent 44b1665b61
commit 3d3028b889
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 364 additions and 61 deletions

View file

@ -4,7 +4,7 @@ controllers:
main:
image:
repository: ghcr.io/mendhak/http-https-echo
tag: 30
tag: 31
pullPolicy: IfNotPresent
env:
@ -25,7 +25,7 @@ controllers:
- third-container
image:
repository: ghcr.io/mendhak/http-https-echo
tag: 30
tag: 31
env:
HTTP_PORT: 8888
HTTPS_PORT: 9998
@ -34,7 +34,7 @@ controllers:
dependsOn: main
image:
repository: ghcr.io/mendhak/http-https-echo
tag: 30
tag: 31
second-controller:
type: deployment
@ -42,7 +42,7 @@ controllers:
main:
image:
repository: ghcr.io/mendhak/http-https-echo
tag: 30
tag: 31
pullPolicy: IfNotPresent
env:
HTTP_PORT: 8889

View file

@ -4,7 +4,7 @@ controllers:
main:
image:
repository: ghcr.io/mendhak/http-https-echo
tag: 30
tag: 31
pullPolicy: IfNotPresent
probes:

View file

@ -7,7 +7,7 @@ controllers:
main:
image:
repository: ghcr.io/mendhak/http-https-echo
tag: 30
tag: 31
pullPolicy: IfNotPresent
service:

View file

@ -4,7 +4,7 @@ controllers:
main:
image:
repository: ghcr.io/mendhak/http-https-echo
tag: 30
tag: 31
pullPolicy: IfNotPresent
service:

View file

@ -59,4 +59,5 @@ persistence:
type: persistentVolumeClaim
accessMode: ReadWriteOnce
size: 1Gi
mountPath: /config
globalMounts:
- path: /config

View file

@ -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

View file

@ -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:

View file

@ -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

View file

@ -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

View file

@ -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:

View file

@ -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]

View file

@ -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

View file

@ -5,7 +5,7 @@ controllers:
main:
image:
repository: ghcr.io/mendhak/http-https-echo
tag: 30
tag: 31
pullPolicy: IfNotPresent
service: