84 lines
2.2 KiB
YAML
84 lines
2.2 KiB
YAML
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
kind: Kustomization
|
|
|
|
resources:
|
|
- ../../base
|
|
- minio-pvc.yaml
|
|
|
|
patchesStrategicMerge:
|
|
- local-config.yaml
|
|
|
|
patches:
|
|
# Gateway as NodePort for local access
|
|
- target:
|
|
kind: Service
|
|
name: gateway
|
|
patch: |
|
|
- op: replace
|
|
path: /spec/type
|
|
value: NodePort
|
|
- op: add
|
|
path: /spec/ports/0/nodePort
|
|
value: 30080
|
|
|
|
# Redis as NodePort for redis-cli access from host
|
|
- target:
|
|
kind: Service
|
|
name: redis
|
|
patch: |
|
|
- op: replace
|
|
path: /spec/type
|
|
value: NodePort
|
|
- op: add
|
|
path: /spec/ports/0/nodePort
|
|
value: 30379
|
|
|
|
# Postgres as NodePort for external access
|
|
- target:
|
|
kind: Service
|
|
name: postgres
|
|
patch: |
|
|
- op: replace
|
|
path: /spec/type
|
|
value: NodePort
|
|
- op: add
|
|
path: /spec/ports/0/nodePort
|
|
value: 30432
|
|
|
|
# MinIO with persistent storage + host media mount for seeding.
|
|
# PV survives pod restarts. Host mount is read-only for mc mirror seeding.
|
|
# Requires kind cluster created with MEDIA_HOST_PATH extraMount (see kind-create.sh).
|
|
- target:
|
|
kind: Deployment
|
|
name: minio
|
|
patch: |
|
|
- op: replace
|
|
path: /spec/template/spec/volumes/0
|
|
value:
|
|
name: data
|
|
persistentVolumeClaim:
|
|
claimName: minio-data
|
|
- op: add
|
|
path: /spec/template/spec/containers/0/volumeMounts/-
|
|
value:
|
|
name: host-media
|
|
mountPath: /host-media
|
|
readOnly: true
|
|
- op: add
|
|
path: /spec/template/spec/volumes/-
|
|
value:
|
|
name: host-media
|
|
hostPath:
|
|
path: /mnt/media
|
|
type: DirectoryOrCreate
|
|
- op: replace
|
|
path: /spec/template/spec/containers/0/lifecycle/postStart/exec/command
|
|
value:
|
|
- /bin/sh
|
|
- -c
|
|
- |
|
|
until curl -sf http://localhost:9000/minio/health/live; do sleep 1; done
|
|
/usr/bin/mc alias set local http://localhost:9000 minioadmin minioadmin --quiet
|
|
/usr/bin/mc mb --ignore-existing local/mpr
|
|
/usr/bin/mc cp --recursive /host-media/mpr/out/ local/mpr/out/ --quiet || true
|