Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita una demostración
  • Precios
  • Ayuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyectos
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

Odoo with kubernetes deployment.

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
deploymentodooDockerkubernetes
1 Responder
11353 Vistas
Avatar
Demdoum Walid

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

0
Avatar
Descartar
Avatar
Bassem EL KHANSAA
Mejor respuesta

The issue with your current setup is that you're mounting the directory (/mnt/extra-addons) but not copying the files themselves into the container. If you want the files from the host path to be available in the container, the hostPath approach should work as long as the files exist on the host machine at the specified location (/home/jenkins/minikube/odoo/odoo/addons).

Here are a few things to check and some potential fixes:

1. Check File Permissions

Ensure the directory /home/jenkins/minikube/odoo/odoo/addons and its contents have the correct permissions. The Kubernetes pod needs to have read/write access (as appropriate). You can run the following on your host to check permissions:

bashCopy codels -l /home/jenkins/minikube/odoo/odoo/addons

If permissions are incorrect, you can modify them:

bashCopy codesudo chmod -R 755 /home/jenkins/minikube/odoo/odoo/addons

2. Directory Exists in Host

Verify that the directory /home/jenkins/minikube/odoo/odoo/addons exists and contains the files you expect to be copied.

bashCopy codels /home/jenkins/minikube/odoo/odoo/addons

If the directory or files don’t exist, this will explain why nothing is being mounted inside the pod.

3. Pod Directory

Ensure that /mnt/extra-addons in the container is not already populated with other files or mounted volumes that may interfere with your hostPath volume. You can check inside the running pod by executing:

bashCopy codekubectl exec -it  -- ls /mnt/extra-addons

4. Deployment Fix (Using emptyDir as an Alternative)

If your goal is to copy files from a directory into the pod rather than bind-mount a host directory, you might consider using an emptyDir volume and an init container to copy the files. This could work like:

yamlCopy codeapiVersion: apps/v1
kind: Deployment
metadata:
  name: odoo
spec:
  replicas: 1
  selector:
    matchLabels:
      app: odoo
  template:
    metadata:
      labels:
        app: odoo
    spec:
      containers:
      - name: odoo
        image: "odoo:14"
        volumeMounts:
        - name: addons-volume
          mountPath: /mnt/extra-addons
      initContainers:
      - name: copy-addons
        image: busybox
        command: ["sh", "-c", "cp -r /source/* /mnt/extra-addons"]
        volumeMounts:
        - name: addons-volume
          mountPath: /mnt/extra-addons
        - name: host-addons
          mountPath: /source
      volumes:
      - name: addons-volume
        emptyDir: {}
      - name: host-addons
        hostPath:
          path: /home/jenkins/minikube/odoo/odoo/addons
          type: Directory

In this approach:

  • An initContainer copies the files from the host directory (/home/jenkins/minikube/odoo/odoo/addons) into the pod's addons-volume using emptyDir, ensuring the files are available when the Odoo container starts.

5. PersistentVolumeClaim (Optional Improvement)

If you want to persist files across pod restarts or across different nodes in a cluster, consider using a PersistentVolume and PersistentVolumeClaim instead of hostPath. This is more flexible and works better in a multi-node setup.

Let me know if you'd like help adjusting the solution further or if the files still don't appear!

2
Avatar
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
How to make shop acessible on for registered users Resuelto
odoo Docker
Avatar
Avatar
2
sept 23
2254
How to deploy odoo in azure ?
deployment odoo Docker Azure Container
Avatar
0
oct 22
5563
Odoo on Docker multiple proyects in one server
odoo Docker
Avatar
0
sept 21
4592
ERROR: for odoo-13-docker-compose_odoo13_1 a bytes-like object is required, not 'str' in docker-compose up
odoo Docker
Avatar
0
feb 21
5687
Uncaught TypeError: Cannot read property 'detach' of undefined
odoo Docker
Avatar
0
ago 19
5657
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidad
  • Seguridad
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now