Skip to content

Instantly share code, notes, and snippets.

@hieutrluu
Created November 4, 2021 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hieutrluu/e48562c1576a9ef30623a01d63fb5da5 to your computer and use it in GitHub Desktop.
Save hieutrluu/e48562c1576a9ef30623a01d63fb5da5 to your computer and use it in GitHub Desktop.
attemp at creating erp new-site using k8s job
apiVersion: batch/v1
kind: Job
metadata:
name: create-new-site-erp.cluster.local
spec:
backoffLimit: 1
template:
spec:
securityContext:
supplementalGroups: [1000]
containers:
- name: create-site
image: frappe/erpnext-worker:v13.13.0
args: ["new"]
imagePullPolicy: IfNotPresent
volumeMounts:
- name: sites-dir
mountPath: /home/frappe/frappe-bench/sites
env:
- name: "SITE_NAME"
value: erp.cluster.local
- name: "DB_ROOT_USER"
value: root
- name: "MYSQL_ROOT_PASSWORD"
valueFrom:
secretKeyRef:
name: mariadb-erpnext
key: mariadb-root-password
- name: "ADMIN_PASSWORD"
value: admin
- name: "INSTALL_APPS"
value: "erpnext"
restartPolicy: Never
volumes:
- name: sites-dir
persistentVolumeClaim:
claimName: frappe-bench-1-erpnext
readOnly: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment