templates/post-install-job.yaml を追加
This commit is contained in:
39
templates/post-install-job.yaml
Normal file
39
templates/post-install-job.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ include "wordpress-nginx.fullname" . }}-show-password
|
||||
labels:
|
||||
{{- include "wordpress-nginx.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/hook": post-install
|
||||
"helm.sh/hook-weight": "1"
|
||||
"helm.sh/hook-delete-policy": before-hook-creation
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
name: {{ include "wordpress-nginx.fullname" . }}-show-password
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: show-password
|
||||
image: busybox:latest
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
echo "================================================"
|
||||
echo "WordPress Installation Information"
|
||||
echo "================================================"
|
||||
echo ""
|
||||
echo "Admin User: {{ .Values.wordpress.adminUser }}"
|
||||
{{- if .Values.wordpress.adminPassword }}
|
||||
echo "Admin Password: {{ .Values.wordpress.adminPassword }}"
|
||||
{{- else }}
|
||||
echo "Admin Password: (Auto-generated - check Secret or Pod logs)"
|
||||
echo ""
|
||||
echo "To retrieve the auto-generated password, run:"
|
||||
echo "kubectl get secret {{ include "wordpress-nginx.fullname" . }}-secret -o jsonpath='{.data.admin-password}' | base64 -d"
|
||||
{{- end }}
|
||||
echo ""
|
||||
echo "Site URL: {{ .Values.wordpress.siteUrl }}"
|
||||
echo "================================================"
|
||||
Reference in New Issue
Block a user