Files
vmware-api-simulator/helm/vmware-api-simulator/templates/seed-job.yaml
T
inecs f8d3cbdd59 Initial commit: VMware vSphere API simulator scaffold.
Add the FastAPI app, PostgreSQL migrations, Docker/Helm packaging, API
contracts, docs, client examples, and the unit/integration/compatibility
test suite for local client and tooling labs without a real vCenter.
2026-07-18 04:42:11 +03:00

57 lines
1.9 KiB
YAML

{{- if .Values.seed.enabled }}
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "vmware-api-simulator.fullname" . }}-seed
labels:
{{- include "vmware-api-simulator.labels" . | nindent 4 }}
app.kubernetes.io/component: seed
annotations:
"helm.sh/hook": post-install,post-upgrade
"helm.sh/hook-weight": "5"
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
spec:
backoffLimit: {{ .Values.seed.backoffLimit }}
template:
metadata:
labels:
{{- include "vmware-api-simulator.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: seed
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "vmware-api-simulator.serviceAccountName" . }}
restartPolicy: OnFailure
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: seed
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: {{ include "vmware-api-simulator.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: {{ include "vmware-api-simulator.secretName" . }}
key: DATABASE_URL
- name: SEED_VSPHERE_PROFILE
value: {{ .Values.seed.profile | quote }}
- name: ENABLE_PVE_STUB
value: {{ .Values.config.enablePveStub | quote }}
- name: LOG_LEVEL
value: {{ .Values.config.logLevel | quote }}
command: ["python", "-m", "app.simulation.seed_cli"]
resources:
{{- toYaml .Values.seed.resources | nindent 12 }}
volumeMounts:
- name: tmp
mountPath: /tmp
volumes:
- name: tmp
emptyDir: {}
{{- end }}