16 lines
800 B
Bash
Executable File
16 lines
800 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
cd "$(dirname "$0")"
|
|
helm lint --strict chart/stirling-pdf -f values.example.yaml
|
|
helm template pdf-editor chart/stirling-pdf -n example -f values.example.yaml | python3 -c '
|
|
import sys,yaml
|
|
objects=[x for x in yaml.safe_load_all(sys.stdin) if x]
|
|
one=lambda kind,name: next(x for x in objects if x["kind"]==kind and x["metadata"]["name"]==name)
|
|
d=one("Deployment","pdf-editor"); s=one("Service","pdf-editor"); i=one("Ingress","pdf-editor")
|
|
assert d["spec"]["selector"]["matchLabels"]==s["spec"]["selector"]
|
|
assert i["spec"]["rules"][0]["http"]["paths"][0]["backend"]["service"]["name"]=="pdf-editor"
|
|
c=d["spec"]["template"]["spec"]["containers"][0]
|
|
assert all(k in c for k in ("startupProbe","readinessProbe","livenessProbe"))
|
|
assert not any(x["kind"]=="Secret" for x in objects)
|
|
'
|