I have deployment.yaml which i want to copy my addons to the pod I am creating
this is my deployment.yaml file, it just copies 1 directory in the mountPath but not the files.
apiVersion: apps/v1
kind: Deployment
metadata:
name: odoo
spec:
selector:
matchLabels:
app: odoo
replicas: 1
template:
metadata:
labels:
app: odoo
spec:
restartPolicy: Always
containers:
- name: odoo
image: "odoo:14"
imagePullPolicy: IfNotPresent
resources: {}
env:
- name: USER
value: "odoo"
- name: PASSWORD
value: "odoo"
- name: DATABASE
value: "postgres"
- name: PORT
value: "5432"
- name: HOST
value: "postgres-service"
volumeMounts:
- name: odoo-data
mountPath: /var/lib/odoo
- name: addons-volume
mountPath: /mnt/extra-addons
volumes:
- name: odoo-data
persistentVolumeClaim:
claimName: odoo-data
- name: addons-volume
hostPath:
path: /home/jenkins/minikube/odoo/odoo/addons
type: Directory