Skip to content

IMIO/helm-odoo

Repository files navigation

Helm Chart for Odoo

License version test release

Introduction

This Helm chart installs Odoo in a Kubernetes cluster.

Important

This helm chart is designed for @IMIO specific needs and is not intended to resolve all use cases. But we are open to contributions and suggestions to improve this helm chart. This helm chart runs an Odoo in version 16.0, it may not work with other versions.

Prerequisites

  • Kubernetes cluster 1.18+
  • Helm 3.8.0+
  • PV provisioner support in the underlying infrastructure.
  • Postgres DB (This chart can install a postgresql database based on the bitnami/postgresql chart). We use it for testing purposes.

Why do we not use the bitnami/odoo chart?

  • we want to use the official Odoo Docker Image or our custom Odoo Docker Image.
  • we need some specific configuration for our Odoo instance.

Installation

Pull Helm release

helm repo add imio https://imio.github.io/helm-charts
helm repo update

Configure the chart

The following items can be set via --set flag during installation or configured by editing the values.yaml directly (need to download the chart first).

See the values.yaml file for more information.

Install the chart

helm install [RELEASE_NAME] imio/odoo

or by cloning this repository:

git clone https://github.com/imio/helm-odoo.git
cd helm-odoo
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm dep up
helm upgrade odoo . -f values.yaml --namespace odoo --create-namespace --install

Configuration

The following table lists the configurable parameters of the plausible-analytics chart and the default values.

See the values.yaml file for more information.

Use an existing Secret for Odoo configuration

You can use an existing secret for the Odoo configuration.

In the values.yaml file, set the existingSecret.enabled parameter to true. Then, you need to have a Secret in your namespace with the following name: your-release-name-odoo-odoo-conf Or if you set the fullnameOverride parameter, the Secret name will be fullnameOverride-odoo-conf.

Use external-secret.io for Odoo configuration

In the values.yaml file, set the externalsecrets.enabled parameter to true.

You need to have the external-secret.io operator installed in your cluster. See the [external-secrets.io](documentation] for more information.

Local Setup for development

Create a kind cluster:

cat <<EOF | kind create cluster --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
  kubeadmConfigPatches:
  - |
    kind: InitConfiguration
    nodeRegistration:
      kubeletExtraArgs:
        node-labels: "ingress-ready=true"
  extraPortMappings:
  - containerPort: 80
    hostPort: 80
    protocol: TCP
  - containerPort: 443
    hostPort: 443
    protocol: TCP
EOF

Install the Nginx Ingress Controller:

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml

Create the odoo namespace:

kubectl create namespace odoo

Get the IP address of the kind-control-plane:

 docker container inspect kind-control-plane --format '{{ .NetworkSettings.Networks.kind.IPAddress }}'

Modify the /etc/hosts file with the IP address of the kind-control-plane and add the hostnames:

nano /etc/hosts
172.18.0.2 odoo.local

Contributing

Feel free to contribute by making a pull request.

Please read the official Helm Contribution Guide from Helm for more information on how you can contribute to this Chart.

License

Apache License 2.0