You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| server.selfInit.job.annotations | object |`{}`| Annotations to apply to the self-init bootstrap Job. |
280
+
| server.selfInit.job.autopilot.deadServerLastContactThreshold | string |`"1m"`| Dead-server last-contact threshold for the generated autopilot cleanup request. |
281
+
| server.selfInit.job.autopilot.enabled | bool |`true`| Generate an autopilot cleanup request with the self-init configuration. |
282
+
| server.selfInit.job.autopilot.minQuorum | string |`nil`| Minimum Raft quorum for autopilot dead-server cleanup. Defaults to max(3, server.ha.replicas) when unset. |
283
+
| server.selfInit.job.autopilot.serverStabilizationTime | string |`"10s"`| Server stabilization time for the generated autopilot cleanup request. |
284
+
| server.selfInit.job.backoffLimit | int |`6`| Job backoff limit. |
285
+
| server.selfInit.job.holdSeconds | int |`120`| Number of seconds the bootstrap Job keeps OpenBao running after it observes initialization, giving StatefulSet pods time to retry_join. |
286
+
| server.selfInit.job.podAnnotations | object |`{}`| Annotations to apply to the self-init bootstrap Job pod. |
287
+
| server.selfInit.job.ttlSecondsAfterFinished | string |`nil`| Optional Job ttlSecondsAfterFinished. Leave unset for GitOps so the completed bootstrap Job remains part of observed cluster state. |
Generated Raft retry_join stanzas for self-init bootstrap Job mode.
1223
+
1224
+
This helper must be rendered inside the storage "raft" block.
1225
+
*/}}
1226
+
{{- define"openbao.selfInit.raftRetryJoin" -}}
1227
+
{{- $root:=. -}}
1228
+
{{- if include "openbao.selfInit.job.enabled"$root }}
1229
+
retry_join {
1230
+
leader_api_addr ="{{ include "openbao.scheme" $root }}://{{ include "openbao.selfInit.job.serviceName" $root }}.{{ include "openbao.namespace" $root }}.svc:{{ $root.Values.server.service.port }}"
1231
+
}
1232
+
{{- $replicas:= int (include "openbao.replicas"$root) }}
1233
+
{{- range$i:= until $replicas }}
1234
+
retry_join {
1235
+
leader_api_addr ="{{ include "openbao.scheme" $root }}://{{ include "openbao.fullname" $root }}-{{ $i }}.{{ include "openbao.fullname" $root }}-internal.{{ include "openbao.namespace" $root }}.svc:{{ $root.Values.server.service.port }}"
1236
+
}
1237
+
{{- end }}
1238
+
{{- end }}
1239
+
{{- end -}}
1240
+
1241
+
{{/*
1242
+
Render the bootstrap Job's base server config without generated retry_join
1243
+
stanzas. The Job initializes an empty temporary Raft data directory; StatefulSet
1244
+
pods join the Job, not the other way around.
1245
+
*/}}
1246
+
{{- define"openbao.selfInit.job.config" -}}
1247
+
{{- $jobCtx:= deepCopy . -}}
1248
+
{{- $_:= set $jobCtx.Values.server.selfInit"enabled" false -}}
1249
+
{{ tpl .Values.server.ha.raft.config$jobCtx| nindent 4 | trim }}
1250
+
{{- end -}}
1251
+
1252
+
{{/*
1253
+
Set's the args for the self-init bootstrap Job.
1254
+
*/}}
1255
+
{{- define"openbao.selfInit.job.args" -}}
1256
+
- |
1257
+
{{- $replicas:= int (include "openbao.replicas".) }}
1258
+
{{- range$i:= until $replicas }}
1259
+
if BAO_ADDR="{{ include "openbao.scheme" $ }}://{{ include "openbao.fullname" $ }}-{{ $i }}.{{ include "openbao.fullname" $ }}-internal.{{ include "openbao.namespace" $ }}.svc:{{ $.Values.server.service.port }}" bao status -tls-skip-verify -format=json 2>/dev/null | grep -Eq '"initialized"[[:space:]]*:[[:space:]]*true'; then
1260
+
echo "OpenBao is already initialized; skipping self-init bootstrap.";
until BAO_ADDR="{{ include "openbao.scheme" . }}://127.0.0.1:8200" bao status -tls-skip-verify -format=json 2>/dev/null | grep -Eq '"initialized"[[:space:]]*:[[:space:]]*true'; do
0 commit comments