Merge Helm to Master branch (#302)

* Added chart

* Added github actions

* Fix actions

* Added README.md

Co-authored-by: David Bomba <turbo124@gmail.com>
This commit is contained in:
Ween Jiann
2021-03-24 09:33:29 +08:00
committed by GitHub
parent 789e49fe1b
commit e19641f754
19 changed files with 1346 additions and 0 deletions

6
.github/ct-install.yaml vendored Normal file
View File

@@ -0,0 +1,6 @@
chart-dirs:
- chart
chart-repos:
- bitnami=https://charts.bitnami.com/bitnami
check-version-increment: true
debug: true

9
.github/ct-lint.yaml vendored Normal file
View File

@@ -0,0 +1,9 @@
chart-dirs:
- chart
chart-repos:
- bitnami=https://charts.bitnami.com/bitnami
check-version-increment: true
debug: false
validate-chart-schema: true
validate-maintainers: true
validate-yaml: true

95
.github/workflows/charts.yaml vendored Normal file
View File

@@ -0,0 +1,95 @@
name: Lint and Test Charts
on: pull_request
jobs:
lint-chart:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fetch history
run: git fetch --prune --unshallow
- name: Set up Helm
uses: azure/setup-helm@v1
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.0.1
- name: Run chart-testing (list-changed)
id: list-changed
run: |
echo "::set-output name=changed::[\"$(ct list-changed --config .github/ct-lint.yaml)\"]"
- name: Parse list-changed
id: set-matrix
env:
CHANGED: ${{ steps.list-changed.outputs.changed }}
run: |
echo "::set-output name=matrix::$(echo "${CHANGED//\\n/\",\"}")"
- name: Run chart-testing (lint)
run: ct lint --config .github/ct-lint.yaml
kubeval-chart:
runs-on: ubuntu-latest
needs:
- lint-chart
strategy:
matrix:
chart: ${{ fromJson(needs.lint-chart.outputs.matrix) }}
k8s:
- v1.17.11
- v1.18.8
- v1.19.4
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Update Helm depdendencies
env:
CHART_DIR: ${{ matrix.chart }}
run: |
helm dependency update "${CHART_DIR}"
mkdir kubeval
helm template "${CHART_DIR}" > kubeval/combined.yaml
- name: Run kubeval
uses: instrumenta/kubeval-action@master
with:
files: kubeval
version: ${{ matrix.k8s }}
install-chart:
name: install-chart
runs-on: ubuntu-latest
needs:
- lint-chart
- kubeval-chart
strategy:
matrix:
k8s:
- v1.17.11
- v1.18.8
- v1.19.4
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Create kind ${{ matrix.k8s }} cluster
uses: helm/kind-action@v1.1.0
with:
node_image: kindest/node:${{ matrix.k8s }}
- name: Run chart-testing (install)
uses: helm/chart-testing-action@v2.0.1
with:
command: install
config: .github/ct-install.yaml

32
.github/workflows/release.yaml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: Release Charts
on:
push:
branches:
- master
paths:
- "chart/**"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- uses: azure/setup-helm@v1
id: install
- name: Add Helm repos
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Run chart-releaser
uses: helm/chart-releaser-action@master
env:
CR_TOKEN: "${{ secrets.CR_TOKEN }}"

11
.gitignore vendored Normal file
View File

@@ -0,0 +1,11 @@
# OS files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# Helm
chart/**/charts/

View File

@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

View File

@@ -0,0 +1,12 @@
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
version: 1.4.1
- name: nginx
repository: https://charts.bitnami.com/bitnami
version: 8.8.0
- name: mariadb
repository: https://charts.bitnami.com/bitnami
version: 9.3.5
digest: sha256:d809702ee601a8a0019defb9ee3fc5a5b5332968e1038cca8b44d5332b14a275
generated: "2021-03-23T00:33:02.690189+08:00"

View File

@@ -0,0 +1,42 @@
apiVersion: v2
name: invoiceninja
description: A Helm chart to install Invoiceninja
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 5.1.30
keywords:
- invoiceninja
home: https://github.com/lwj5/invoiceninja-chart
sources:
- https://github.com/invoiceninja/invoiceninja
- https://github.com/invoiceninja/dockerfiles
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
tags:
- bitnami-common
version: 1.x.x
- name: nginx
repository: https://charts.bitnami.com/bitnami
version: 8.8.x
- condition: mariadb.enabled
name: mariadb
repository: https://charts.bitnami.com/bitnami
version: 9.3.x
maintainers:
- email: lwj5@hotmail.com
name: lwj5

View File

@@ -0,0 +1,195 @@
# Invoiceninja
This helm chart installs a Invoiceninja and its dependencies into a running
Kubernetes cluster.
The chart installs the [Invoiceninja](https://hub.docker.com/r/invoiceninja/invoiceninja) docker image.
Please read [Upgrading](#upgrading) section before upgrading MAJOR versions.
## Dependencies
- The Bitnami [common](https://github.com/bitnami/charts/tree/master/bitnami/common) helm chart
- The Bitnami [mariadb](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) helm chart
- The Bitnami [nginx](https://github.com/bitnami/charts/tree/master/bitnami/nginx) helm chart
- Tested on Kubernetes 1.17+
## Installing the Chart
To install the chart with the release name `invoiceninja`:
```bash
helm repo add invoiceninja https://<add url>
helm install invoiceninja invoiceninja/invoiceninja
```
The command deploys Invoiceninja on the Kubernetes cluster in the default namespace. The [Parameters](#parameters) section lists the parameters that can be configured during installation.
> **Tip**: List all releases using `helm list`
## Uninstalling the Chart
To uninstall/delete the `invoiceninja` deployment:
```bash
helm delete invoiceninja
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
## Parameters
The following table lists the configurable parameters of the Invoiceninja chart and their default values.
### Global Configuration
The following table shows the configuration options for the Invoiceninja helm chart:
### Global parameters
| Parameter | Description | Default |
| ------------------------- | ----------------------------------------------- | ------------------------------------------------------- |
| `global.imageRegistry` | Global Docker image registry | `nil` |
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `global.storageClass` | Global storage class for dynamic provisioning | `nil` |
### Common parameters
| Parameter | Description | Default |
| ------------------- | -------------------------------------------------------------------- | ------------------------------ |
| `nameOverride` | String to partially override common.names.fullname | `nil` |
| `fullnameOverride` | String to fully override common.names.fullname | `nil` |
| `clusterDomain` | Default Kubernetes cluster domain | `cluster.local` |
| `commonLabels` | Labels to add to all deployed objects | `{}` |
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` |
| `kubeVersion` | Force target Kubernetes version (using Helm capabilities if not set) | `nil` |
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` (evaluated as a template) |
### Invoiceninja parameters
| Parameter | Description | Default |
| -------------------- | --------------------------------------------------------------- | ------------------------------------------------------- |
| `image.registry` | Invoiceninja image registry | `docker.io` |
| `image.repository` | Invoiceninja image name | `invoiceninja/invoiceninja` |
| `image.tag` | Invoiceninja image tag | Check `values.yaml` file |
| `image.pullPolicy` | Invoiceninja image pull policy | `IfNotPresent` |
| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `image.debug` | Specify if debug logs should be enabled | `false` |
| `serviceAccountName` | Name of a service account for the Invoiceninja pods | `default` |
| `debug` | Turn on debug mode on Invoiceninja | `false` |
| `appKey` | Laravel Application Key | _random 32 character alphanumeric string_ |
| `extraEnvVars` | Extra environment variables to be set on Invoiceninja container | `{}` |
| `extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars | `nil` |
| `extraEnvVarsSecret` | Name of existing Secret containing extra env vars | `nil` |
### Invoiceninja deployment parameters
| Parameter | Description | Default |
| --------------------------- | ----------------------------------------------------------------------------------------- | ------------------------------ |
| `replicaCount` | Number of Invoiceninja Pods to run | `1` |
| `containerPorts.fastcgi` | FastCGI port to expose at container level | `9000` |
| `podSecurityContext` | Invoiceninja pods' Security Context | Check `values.yaml` file |
| `containerSecurityContext` | Invoiceninja containers' Security Context | Check `values.yaml` file |
| `resources` | The resources for the Invoiceninja container | `{}` |
| `livenessProbe` | Liveness probe configuration for Invoiceninja | Check `values.yaml` file |
| `readinessProbe` | Readiness probe configuration for Invoiceninja | Check `values.yaml` file |
| `updateStrategy` | Set up update strategy | `RollingUpdate` |
| `podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` |
| `nodeAffinityPreset.type` | Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `nodeAffinityPreset.key` | Node label key to match. Ignored if `affinity` is set. | `""` |
| `nodeAffinityPreset.values` | Node label values to match. Ignored if `affinity` is set. | `[]` |
| `affinity` | Affinity for pod assignment | `{}` (evaluated as a template) |
| `nodeSelector` | Node labels for pod assignment | `{}` (evaluated as a template) |
| `tolerations` | Tolerations for pod assignment | `[]` (evaluated as a template) |
| `podLabels` | Extra labels for Invoiceninja pods | `{}` |
| `podAnnotations` | Annotations for Invoiceninja pods | `{}` |
| `extraVolumeMounts` | Additional volume mounts | `[]` |
| `extraVolumes` | Additional volumes | `[]` |
### Exposure parameters
| Parameter | Description | Default |
| ---------------------------------- | -------------------------------------------------------------------------- | ------------------------------ |
| `service.type` | Kubernetes Service type | `ClusterIP` |
| `service.port` | Service FastCGI port | `9000` |
| `service.nodePort` | Kubernetes FastCGI node port | `""` |
| `service.clusterIP` | Invoiceninja service clusterIP IP | `None` |
| `service.loadBalancerSourceRanges` | Restricts access for LoadBalancer (only with `service.type: LoadBalancer`) | `[]` |
| `service.loadBalancerIP` | loadBalancerIP if service type is `LoadBalancer` | `nil` |
| `service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` |
| `service.annotations` | Service annotations | `{}` (evaluated as a template) |
### Ingress parameters
| Parameter | Description | Default |
| ------------------------------------------------------- | ------------------------------------- | ------------------------ |
| `nginx.service.type` | Kubernetes Service type | `ClusterIP` |
| `nginx.ingress.enabled` | Enable ingress controller resource | `true` |
| `nginx.ingress.hostname` | Default host for the ingress resource | `invoiceninja.local` |
| `nginx.serverBlock` | Custom NGINX server block | `nil` |
| `nginx.extraVolumes` | Array to add extra volumes | Check `values.yaml` file |
| `nginx.extraVolumes[0].persistentVolumeClaim.claimName` | Name of Invoiceninja public PVC | `invoiceninja-public` |
| `nginx.extraVolumeMounts` | Array to add extra mount | Check `values.yaml` file |
> See [Dependencies](#dependencies) for more.
### Persistence parameters
| Parameter | Description | Default |
| ----------------------------------- | ---------------------------------------- | ----------------- |
| `persistence.public.enabled` | Enable persistence using PVC | `true` |
| `persistence.public.existingClaim` | Enable persistence using an existing PVC | `nil` |
| `persistence.public.storageClass` | PVC Storage Class | `nil` |
| `persistence.public.accessModes` | PVC Access Modes | `[ReadWriteMany]` |
| `persistence.public.size` | PVC Storage Request | `1Gi` |
| `persistence.public.dataSource` | PVC data source | `{}` |
| `persistence.storage.enabled` | Enable persistence using PVC | `true` |
| `persistence.storage.existingClaim` | Enable persistence using an existing PVC | `nil` |
| `persistence.storage.storageClass` | PVC Storage Class | `nil` |
| `persistence.storage.accessModes` | PVC Access Modes | `[ReadWriteMany]` |
| `persistence.storage.size` | PVC Storage Request | `5Gi` |
| `persistence.storage.dataSource` | PVC data source | `{}` |
### Database parameters
| Parameter | Description | Default |
| --------------------------- | ------------------------------------ | ----------------------------------------- |
| `mariadb.enabled` | Deploy MariaDB container(s) | `true` |
| `mariadb.auth.rootPassword` | Password for the MariaDB `root` user | _random 10 character alphanumeric string_ |
| `mariadb.auth.database` | Database name to create | `invoiceninja` |
| `mariadb.auth.username` | Database user to create | `invoiceninja` |
| `mariadb.auth.password` | Password for the database | _random 10 character alphanumeric string_ |
> See [Dependencies](#dependencies) for more.
### Other parameters
| Parameter | Description | Default |
| -------------------------- | --------------------------------------- | ------- |
| `autoscaling.enabled` | Enable autoscaling for Invoiceninja | `false` |
| `autoscaling.minReplicas` | Minimum number of Invoiceninja replicas | `1` |
| `autoscaling.maxReplicas` | Maximum number of Invoiceninja replicas | `11` |
| `autoscaling.targetCPU` | Target CPU utilization percentage | `nil` |
| `autoscaling.targetMemory` | Target Memory utilization percentage | `nil` |
## Installing with Arguments
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```bash
helm install invoiceninja \
--set replicaCount=3,livenessProbe.initialDelaySeconds=90 \
invoiceninja/invoiceninja
```
The above command sets the number of replicas to 4, and the liveness probe delay to 90 seconds.
Alternatively, a YAML file that specifies the values for the parameters can be provided while [installing](https://helm.sh/docs/helm/helm_install/) the chart. For example,
```bash
helm install invoiceninja -f values.yaml invoiceninja/invoiceninja
```
## Upgrading
Nothing yet.

View File

@@ -0,0 +1,33 @@
** Please be patient while the chart is being deployed **
Your controller can be accessed through the following DNS name from within your cluster:
http://{{ include "invoiceninja.nginx.fullname" . }}.{{ .Release.Namespace }}.svc
To access your controller from outside the cluster follow the steps below:
{{- if or .Values.nginx.ingress.enabled }}
Externally through the following DNS name:
http://{{ .Values.nginx.ingress.hostname }}
-- OR --
{{ end }}
{{- if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.names.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "common.names.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.names.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "common.names.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl -n {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
{{- end }}

View File

@@ -0,0 +1,127 @@
{{/*
Return the proper image name
*/}}
{{- define "invoiceninja.image" -}}
{{- include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) -}}
{{- end -}}
{{/*
Return the proper Docker Image Registry Secret Names
*/}}
{{- define "invoiceninja.imagePullSecrets" -}}
{{- include "common.images.pullSecrets" (dict "images" (list .Values.image ) "global" .Values.global) -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "invoiceninja.mariadb.fullname" -}}
{{- printf "%s-%s" .Release.Name "mariadb" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "invoiceninja.nginx.fullname" -}}
{{- printf "%s-%s" .Release.Name "nginx" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "invoiceninja.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "common.names.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{- default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{/*
Return the proper Storage Class
*/}}
{{- define "invoiceninja.public.storageClass" -}}
{{- include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) -}}
{{- end -}}
{{/*
Return the proper Storage Class
*/}}
{{- define "invoiceninja.storage.storageClass" -}}
{{- include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) -}}
{{- end -}}
{{/*
Return the proper Storage Name
*/}}
{{- define "invoiceninja.public.storageName" -}}
{{- printf "%s-%s" .Release.Name "public" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Return the proper Storage Name
*/}}
{{- define "invoiceninja.storage.storageName" -}}
{{- printf "%s-%s" .Release.Name "storage" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Return the MariaDB Hostname
*/}}
{{- define "invoiceninja.databaseHost" -}}
{{- if .Values.mariadb.enabled }}
{{- if eq .Values.mariadb.architecture "replication" }}
{{- printf "%s-%s" (include "invoiceninja.mariadb.fullname" .) "primary" | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s" (include "invoiceninja.mariadb.fullname" .) -}}
{{- end -}}
{{- else -}}
{{- printf "%s" .Values.externalDatabase.host -}}
{{- end -}}
{{- end -}}
{{/*
Return the MariaDB Port
*/}}
{{- define "invoiceninja.databasePort" -}}
{{- if .Values.mariadb.enabled }}
{{- printf "3306" -}}
{{- else -}}
{{- printf "%d" (.Values.externalDatabase.port | int ) -}}
{{- end -}}
{{- end -}}
{{/*
Return the MariaDB Database Name
*/}}
{{- define "invoiceninja.databaseName" -}}
{{- if .Values.mariadb.enabled }}
{{- printf "%s" .Values.mariadb.auth.database -}}
{{- else -}}
{{- printf "%s" .Values.externalDatabase.database -}}
{{- end -}}
{{- end -}}
{{/*
Return the MariaDB User
*/}}
{{- define "invoiceninja.databaseUser" -}}
{{- if .Values.mariadb.enabled }}
{{- printf "%s" .Values.mariadb.auth.username -}}
{{- else -}}
{{- printf "%s" .Values.externalDatabase.user -}}
{{- end -}}
{{- end -}}
{{/*
Return the MariaDB Secret Name
*/}}
{{- define "invoiceninja.databaseSecretName" -}}
{{- if .Values.externalDatabase.existingSecret -}}
{{- printf "%s" .Values.externalDatabase.existingSecret -}}
{{- else -}}
{{- printf "%s" (include "invoiceninja.mariadb.fullname" .) -}}
{{- end -}}
{{- end -}}

View File

@@ -0,0 +1,21 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels.standard" $ | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations:
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
APP_URL: "http://{{ include "common.names.fullname" . }}/"
APP_DEBUG: {{ .Values.debug | quote }}
MULTI_DB_ENABLED: "false"
DB_HOST1: {{ include "invoiceninja.databaseHost" . | quote }}
DB_PORT1: {{ include "invoiceninja.databasePort" . | quote }}
DB_USERNAME1: {{ include "invoiceninja.databaseUser" . | quote }}
DB_DATABASE1: {{ include "invoiceninja.databaseName" . | quote }}

View File

@@ -0,0 +1,138 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels.standard" $ | nindent 4 }}
app.kubernetes.io/component: server
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations:
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
{{- if .Values.updateStrategy }}
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
{{- end }}
selector:
matchLabels:
{{- include "common.labels.matchLabels" $ | nindent 6 }}
app.kubernetes.io/component: server
template:
metadata:
{{- if .Values.podAnnotations }}
annotations:
{{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
{{- end }}
labels:
{{- include "common.labels.standard" $ | nindent 8 }}
app.kubernetes.io/component: server
{{- if .Values.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
{{- end }}
spec:
{{- include "invoiceninja.imagePullSecrets" . | nindent 6 }}
serviceAccountName: {{ include "invoiceninja.serviceAccountName" . }}
{{- if .Values.affinity }}
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
image: {{ include "invoiceninja.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: fastcgi
containerPort: {{ .Values.containerPorts.fastcgi }}
protocol: TCP
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
timeoutSeconds: {{ $.Values.livenessProbe.timeoutSeconds }}
successThreshold: {{ $.Values.livenessProbe.successThreshold }}
failureThreshold: {{ $.Values.livenessProbe.failureThreshold }}
tcpSocket:
port: {{ .Values.livenessProbe.port }}
{{- end }}
{{- if .Values.readinessProbe.enabled }}
readinessProbe:
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ $.Values.readinessProbe.timeoutSeconds }}
successThreshold: {{ $.Values.readinessProbe.successThreshold }}
failureThreshold: {{ $.Values.readinessProbe.failureThreshold }}
tcpSocket:
port: {{ .Values.readinessProbe.port }}
{{- end }}
envFrom:
- configMapRef:
name: {{ include "common.names.fullname" . }}
- secretRef:
name: {{ include "common.names.fullname" . }}
{{- if .Values.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsSecret "context" $) }}
{{- end }}
env:
- name: IS_DOCKER
value: "true"
- name: DB_PASSWORD1
valueFrom:
secretKeyRef:
name: {{ include "invoiceninja.databaseSecretName" . }}
key: mariadb-password
{{- if .Values.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- mountPath: /var/www/app/public
name: public
- mountPath: /var/www/app/storage
name: storage
{{- if .Values.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
volumes:
- name: public
{{- if .Values.persistence.public.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.public.existingClaim | default (include "invoiceninja.public.storageName" .) }}
{{- else }}
emptyDir: {}
{{ end }}
- name: storage
{{- if .Values.persistence.storage.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.storage.existingClaim | default (include "invoiceninja.storage.storageName" .) }}
{{- else }}
emptyDir: {}
{{ end }}
{{- if .Values.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }}
{{- end }}

View File

@@ -0,0 +1,35 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels.standard" $ | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations:
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "common.names.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,52 @@
{{- if and .Values.persistence.public.enabled (not .Values.persistence.public.existingClaim) }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ include "invoiceninja.public.storageName" . }}
labels:
{{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations:
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
accessModes:
- {{ .Values.persistence.public.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.public.size | quote }}
{{- include "invoiceninja.public.storageClass" . | nindent 2 }}
{{- if .Values.persistence.public.dataSource }}
dataSource: {{- include "common.tplvalues.render" ( dict "value" .Values.persistence.public.dataSource "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
---
{{- if and .Values.persistence.storage.enabled (not .Values.persistence.storage.existingClaim) }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ include "invoiceninja.storage.storageName" . }}
labels:
{{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations:
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
accessModes:
- {{ .Values.persistence.storage.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.storage.size | quote }}
{{- include "invoiceninja.storage.storageClass" . | nindent 2 }}
{{- if .Values.persistence.storage.dataSource }}
dataSource: {{- include "common.tplvalues.render" ( dict "value" .Values.persistence.storage.dataSource "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,39 @@
{{- if not (or .Values.mariadb.enabled .Values.externalDatabase.existingSecret) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "invoiceninja.mariadb.fullname" . }}
labels:
{{- include "common.labels.standard" $ | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations:
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
data:
mariadb-password: {{ .Values.externalDatabase.password | b64enc | quote }}
{{- end }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels.standard" $ | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations:
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
data:
{{- if not (empty .Values.appKey) }}
APP_KEY: {{ .Values.appKey | b64enc | quote }}
{{- else }}
APP_KEY: {{ randAlphaNum 32 | b64enc | quote }}
{{- end }}

View File

@@ -0,0 +1,47 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels.standard" $ | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if or .Values.service.annotations .Values.commonAnnotations }}
annotations:
{{- if .Values.service.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.service.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
spec:
type: {{ .Values.service.type }}
{{- if and .Values.service.clusterIP (eq .Values.service.type "ClusterIP") }}
clusterIP: {{ .Values.service.clusterIP }}
{{- end }}
{{- if (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }}
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }}
{{- end }}
{{- if (and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerSourceRanges) }}
loadBalancerSourceRanges: {{- toYaml . | nindent 4 }}
{{- end }}
{{- if (and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP))) }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
ports:
{{- if not (empty .Values.service.port) }}
- name: fastcgi
port: {{ .Values.service.port }}
protocol: TCP
targetPort: fastcgi
{{- if (and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePort))) }}
nodePort: {{ .Values.service.nodePort }}
{{- else if eq .Values.service.type "ClusterIP" }}
nodePort: null
{{- end }}
{{- end }}
selector:
{{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/component: server

View File

@@ -0,0 +1,20 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "invoiceninja.serviceAccountName" . }}
labels:
{{- include "common.labels.standard" $ | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }}
annotations:
{{- if .Values.serviceAccount.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.serviceAccount.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,409 @@
# Default values for invoiceninja.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
## Global Docker image parameters
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
## Current available global Docker image parameters: imageRegistry, imagePullSecrets and storageClass
##
# global:
# imageRegistry: myRegistryName
# imagePullSecrets:
# - myRegistryKeySecretName
# storageClass: myStorageClass
## Invoiceninja image version
## ref: https://github.com/invoiceninja/dockerfiles
##
image:
registry: docker.io
repository: invoiceninja/invoiceninja
tag: 5.1.31
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
##
pullPolicy: IfNotPresent
## Optionally specify an array of imagePullSecrets.
## Secrets must be manually created in the namespace.
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
##
# pullSecrets:
# - myRegistryKeySecretName
## String to turn on debug mode in Invoiceninja
##
debug: false
## A 32 character long Application Key
##
appKey: ""
## String to partially override fullname template (will maintain the release name)
##
# nameOverride:
## String to fully override fullname template
##
# fullnameOverride:
## Add labels to all the deployed resources
##
commonLabels: {}
## Add annotations to all the deployed resources
##
commonAnnotations: {}
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
## Pod Labels
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
##
podLabels: {}
## Pod annotations
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
##
podAnnotations: {}
## Pod affinity preset
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
## Allowed values: soft, hard
##
podAffinityPreset: ""
## Pod anti-affinity preset
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
## Allowed values: soft, hard
##
podAntiAffinityPreset: soft
## Node affinity preset
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
## Allowed values: soft, hard
##
nodeAffinityPreset:
## Node affinity type
## Allowed values: soft, hard
##
type: ""
## Node label key to match
## E.g.
## key: "kubernetes.io/e2e-az-name"
##
key: ""
## Node label values to match
## E.g.
## values:
## - e2e-az1
## - e2e-az2
##
values: []
## Affinity for pod assignment. Evaluated as a template.
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
## Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set
##
affinity: {}
## Node labels for pod assignment. Evaluated as a template.
## ref: https://kubernetes.io/docs/user-guide/node-selection/
##
nodeSelector: {}
## Tolerations for pod assignment. Evaluated as a template.
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
##
tolerations: []
## Configure Pods Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
##
podSecurityContext:
fsGroup: 1500
## Configure Container Security Context (only main container)
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
##
containerSecurityContext:
runAsNonRoot: true
runAsUser: 1500
# runAsGroup: 1500
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
## Number of replicas (requires ReadWriteMany PVC support)
##
replicaCount: 1
## Set up update strategy for Invoiceninja installation. Set to Recreate if you use persistent volume that cannot be mounted by more than one pods to makesure the pods is destroyed first.
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
## Example:
## updateStrategy:
## type: RollingUpdate
## rollingUpdate:
## maxSurge: 25%
## maxUnavailable: 25%
##
updateStrategy:
type: RollingUpdate
## Container ports
##
containerPorts:
fastcgi: 9000
## An array to add extra env vars
## Example:
## extraEnvVars:
## - name: FOO
## value: "bar"
##
extraEnvVars: []
## ConfigMap with extra environment variables
##
extraEnvVarsCM:
## Secret with extra environment variables
##
extraEnvVarsSecret:
## Extra volumes to add to the deployment
##
extraVolumes: []
## Extra volume mounts to add to the container
##
extraVolumeMounts: []
## Kubernetes service type
## ref: https://kubernetes.io/docs/concepts/services-networking/service/
## Set this to NodePort, LoadBalancer or ClusterIP
##
service:
## Service type
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
##
type: ClusterIP
## Service ports
##
port: 9000
## Specify the nodePort value for the LoadBalancer and NodePort service types.
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
##
nodePort: ""
## Service clusterIP.
##
# clusterIP: None
## Specify the loadBalancerIP value for LoadBalancer service types.
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer
##
# loadBalancerIP:
## Specify the loadBalancerSourceRanges value for LoadBalancer service types.
## ref: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
##
loadBalancerSourceRanges: []
## Enable client source IP preservation
## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
##
externalTrafficPolicy: Cluster
## Additional service annotations (evaluate as a template)
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
##
annotations: {}
## Configure extra options for liveness and readiness probes
## This applies to all the Invoiceninja in the sharded cluster
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
##
livenessProbe:
enabled: true
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
successThreshold: 1
port: fastcgi
readinessProbe:
enabled: true
initialDelaySeconds: 15
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
successThreshold: 1
port: fastcgi
resources:
{}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
## Enable persistence using Persistent Volume Claims
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
##
persistence:
public:
enabled: true
## Invoiceninja data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
# storageClass: "-"
##
## If you want to reuse an existing claim, you can pass the name of the PVC using
## the existingClaim variable
# existingClaim: your-claim
accessMode: ReadWriteMany
size: 1Gi
## Custom dataSource
##
dataSource: {}
storage:
enabled: true
## Invoiceninja data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
# storageClass: "-"
##
## If you want to reuse an existing claim, you can pass the name of the PVC using
## the existingClaim variable
# existingClaim: your-claim
accessMode: ReadWriteMany
size: 10Gi
## Custom dataSource
##
dataSource: {}
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 10
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
## MariaDB chart configuration
## ref: https://github.com/bitnami/charts/blob/master/bitnami/mariadb/values.yaml
##
mariadb:
## Whether to deploy a MariaDB server to satisfy the applications database requirements.
## To use an external database set this to false and configure the externaldb parameters
##
enabled: true
## MariaDB Authentication parameters
##
auth:
## MariaDB root password
##
# rootPassword: changeit
## MariaDB custom user and database
##
username: invoiceninja
database: invoiceninja
# password: changeit
## External Database Configuration
##
## All of these values are only used when mariadb.enabled is set to false
##
externalDatabase:
## Database host
##
host: localhost
## non-root Username for Invoiceninja Database
##
user: invoiceninja
## Database password
##
password: ""
## Database name
##
database: invoiceninja
## Database port number
##
port: 3306
## Use existing secret (ignores previous password)
## must contain key `mariadb-password`
## NOTE: When it's set, the `externalDatabase.password` parameter is ignored
##
# existingSecret:
## Nginx chart configuration
## ref: https://github.com/bitnami/charts/blob/master/bitnami/nginx/values.yaml
##
nginx:
service:
## Service type
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
##
type: ClusterIP
## Configure the ingress resource that allows you to access the Invoiceninja
## ref: http://kubernetes.io/docs/user-guide/ingress/
##
ingress:
enabled: true
hostname: invoiceninja.local
## Configure the serverblock for Invoiceninja
## Note: you may need to replace the fastcgi_pass value if the release name is different
##
serverBlock: |
server {
listen 8080 default_server;
server_name _;
root /var/www/app/public/;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass invoiceninja:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
}
}
## Configure the extraVolumes and extraVolumeMounts for Invoiceninja
## Note: you may need to replace the claimName if the release name is different
##
extraVolumes:
- name: public
persistentVolumeClaim:
claimName: invoiceninja-public
extraVolumeMounts:
- mountPath: /var/www/app/public
name: public
readOnly: true