Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
🚀
This server has been upgraded to GitLab release
15.7
.
🚀
Open sidebar
helm-charts
Shibboleth SP
Helm Chart
Commits
df22c6ab
Commit
df22c6ab
authored
Aug 15, 2021
by
Sandro Mathys
Browse files
make helm tests configurable
parent
832edac4
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ci/values.yaml
View file @
df22c6ab
...
...
@@ -42,3 +42,15 @@ frontend:
accessRules
:
|
Require shib-attr homeOrganization switch.ch
tests
:
enabled
:
true
imagePullSecrets
:
# personal(!) access token with read AND write privileges to the registry in order to use the dependency proxy
-
name
:
shibboleth-sp-dependency-proxy
image
:
repository
:
"
gitlab.switch.ch/helm-charts/shibboleth-sp/dependency_proxy/containers/curlimages/curl"
tag
:
"
latest"
pullPolicy
:
"
Always"
templates/_helpers.tpl
View file @
df22c6ab
...
...
@@ -148,6 +148,13 @@ Create the names of the images and pull policies to use
{{- .Values.backend.shibboleth.sessionCache.sealerKeys.image.pullPolicy | default (include "shibboleth-sp.backend.imagePullPolicy" .) }}
{{- end }}
{{- define "shibboleth-sp.tests.image" -}}
{{- printf "%s:%s" .Values.tests.image.repository .Values.tests.image.tag }}
{{- end }}
{{- define "shibboleth-sp.tests.imagePullPolicy" -}}
{{- .Values.tests.image.pullPolicy }}
{{- end }}
{
{
/*
Create
the
names
of
the
secrets
to
use
*/
}
}
...
...
templates/tests/curl.yaml
View file @
df22c6ab
{{
- if .Values.tests.enabled
}}
---
apiVersion
:
v1
kind
:
Pod
metadata
:
name
:
{{
include "shibboleth-sp.name" .
}}
-helm-test-curl
name
:
{{
include "shibboleth-sp.
full
name" .
}}
-helm-test-curl
annotations
:
"
helm.sh/hook"
:
test
spec
:
{{
- if .Values.tests.imagePullSecrets
}}
imagePullSecrets
:
# personal(!) access token with read AND write privileges to the registry in order to use the dependency proxy
-
name
:
shibboleth-sp-dependency-proxy
{{
- with .Values.tests.imagePullSecrets
}}
{{
- toYaml . | nindent 8
}}
{{
- end
}}
{{
- end
}}
containers
:
# check apache is responding
-
name
:
root
image
:
"
gitlab.switch.ch/helm-charts/shibboleth-sp/dependency_proxy/containers/curlimages/curl:7.75.0"
image
:
"
{{
include
"shibboleth-sp.tests.image" . }}"
imagePullPolicy
:
"
{{
include
"shibboleth-sp.tests.imagePullPolicy" . }}"
command
:
-
"
sh"
-
"
-c"
...
...
@@ -27,7 +32,8 @@ spec:
grep "Location: https://wayf.switch.ch/SWITCHaai/WAYF" /tmp/header.out
# check shibboleth is responding
-
name
:
session
image
:
"
gitlab.switch.ch/helm-charts/shibboleth-sp/dependency_proxy/containers/curlimages/curl:7.75.0"
image
:
"
{{
include
"shibboleth-sp.tests.image" . }}"
imagePullPolicy
:
"
{{
include
"shibboleth-sp.tests.imagePullPolicy" . }}"
command
:
-
"
sh"
-
"
-c"
...
...
@@ -41,3 +47,4 @@ spec:
grep "200 OK" /tmp/header.out
grep "A valid session was not found." /tmp/document.out
restartPolicy
:
Never
{{
- end -
}}
values.yaml
View file @
df22c6ab
...
...
@@ -321,3 +321,16 @@ frontend:
proxyPreserveHost
:
"
"
# default: "off"
remoteURL
:
"
"
# must be absolute (i.e. starting with http:// or https://)
accessRules
:
"
"
# helm tests
tests
:
enabled
:
false
# imagePullSecrets:
# - name:
# requires sh, echo, cat, curl, grep in the path of the image
image
:
repository
:
"
docker.io/curlimages/curl"
tag
:
"
latest"
pullPolicy
:
"
IfNotPresent"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment