Files
service-catalog/manifests/helm/lakekeeper/0.11.0/templates/tests/bootstrap.yaml
T
wbsong111 f4d287abef update lakekeeper/0.11.0
- chart 0.8.1 → 0.11.0 (appVersion 0.10.4 → 0.12.2)
- deps: postgres 1.5.8 → 1.5.13, openfga 0.2.44 → 0.2.62
- ingress: Kong → APISIX (use-regex + path /.*, cluster-issuer)
- openfga.playground 비활성화 (preshared 인증 패닉 방지)
- breaking=false, custom-values 키 전부 호환

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 09:13:31 +09:00

46 lines
1.5 KiB
YAML

apiVersion: v1
kind: Pod
metadata:
name: "{{ include "iceberg-catalog.fullname" . }}-test-bootstrap"
namespace: {{ .Release.Namespace }}
labels:
{{- include "iceberg-catalog.labels" . | nindent 4 }}
component: catalog
annotations:
"helm.sh/hook": test
spec:
serviceAccountName: {{ include "iceberg-catalog.serviceAccountName" . }}
containers:
- name: base
image: curlimages/curl:latest
command: ['sh', "-c"]
args:
- |
set -e
TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
BOOTSTRAP_URL="http://{{ include "iceberg-catalog.fullname" . }}:8181/management/v1/bootstrap"
if [ -n "$TOKEN" ]; then
echo "Found K8s Service Account token"
else
echo "No K8s Service Account token found"
fi
for i in {1..45}; do
RESPONSE=$(curl --location "$BOOTSTRAP_URL" \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $TOKEN" \
--data '{"accept-terms-of-use": true}' \
--write-out "HTTP_CODE:%{http_code}" --silent --output /dev/null)
if [[ "$RESPONSE" == *"HTTP_CODE:204"* ]]; then
echo "Bootstrapping successful"
exit 0
else
echo "Request failed with status code and response: $RESPONSE"
fi
sleep 2
done
echo "Failed to bootstrap within the given time"
exit 1
restartPolicy: Never