Deploy dolibarr
This commit is contained in:
parent
f6a4beb263
commit
78ecd63c50
3 changed files with 149 additions and 0 deletions
94
namespaces/apps/dolibarr/kustomization.yaml
Normal file
94
namespaces/apps/dolibarr/kustomization.yaml
Normal file
|
@ -0,0 +1,94 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
transformers:
|
||||
- |-
|
||||
apiVersion: builtin
|
||||
kind: NamespaceTransformer
|
||||
metadata:
|
||||
name: notImportantHere
|
||||
namespace: apps
|
||||
unsetOnly: true
|
||||
|
||||
namePrefix: dolibarr-
|
||||
resources:
|
||||
- ../../../kustomize/public-oidc/
|
||||
|
||||
replacements:
|
||||
- source:
|
||||
kind: Service
|
||||
name: svc
|
||||
targets:
|
||||
- select:
|
||||
kind: HTTPRoute
|
||||
options:
|
||||
create: true
|
||||
fieldPaths:
|
||||
- spec.rules.0.backendRefs.0.name
|
||||
- source:
|
||||
kind: Deployment
|
||||
fieldPath: metadata.labels.[app.kubernetes.io/appName]
|
||||
targets:
|
||||
- select:
|
||||
kind: HTTPRoute
|
||||
options:
|
||||
create: true
|
||||
delimiter: "."
|
||||
index: 0
|
||||
fieldPaths:
|
||||
- spec.hostnames.0
|
||||
- select:
|
||||
kind: InfisicalSecret
|
||||
options:
|
||||
delimiter: "-"
|
||||
index: 0
|
||||
fieldPaths:
|
||||
- spec.managedSecretReference.secretName
|
||||
- select:
|
||||
kind: InfisicalSecret
|
||||
options:
|
||||
delimiter: "/"
|
||||
index: 2
|
||||
fieldPaths:
|
||||
- spec.authentication.universalAuth.secretsScope.secretsPath
|
||||
- select:
|
||||
kind: Service
|
||||
fieldPaths:
|
||||
- spec.ports.0.name
|
||||
- spec.ports.0.targetPort
|
||||
- source:
|
||||
kind: Deployment
|
||||
fieldPath: metadata.labels.[app.kubernetes.io/appNamespace]
|
||||
targets:
|
||||
- select:
|
||||
kind: InfisicalSecret
|
||||
fieldPaths:
|
||||
- spec.managedSecretReference.secretNamespace
|
||||
|
||||
patches:
|
||||
- path: patches/deployment.yaml
|
||||
target:
|
||||
kind: Deployment
|
||||
- path: patches/pvc.yaml
|
||||
target:
|
||||
kind: PersistentVolumeClaim
|
||||
|
||||
labels:
|
||||
- includeSelectors: true
|
||||
pairs:
|
||||
app.kubernetes.io/appName: dolibarr
|
||||
- pairs:
|
||||
app.kubernetes.io/appNamespace: apps
|
||||
|
||||
configMapGenerator:
|
||||
- name: config
|
||||
literals:
|
||||
- PHP_INI_DATE_TIMEZONE=America/New_York
|
||||
- DOLI_INSTALL_AUTO=0
|
||||
- DOLI_DB_TYPE=pgsql
|
||||
- DOLI_DB_HOST=postgres.core.svc.cluster.local
|
||||
- DOLI_DB_HOST_PORT=5432
|
||||
- DOLI_DB_USER=dolidbuser
|
||||
- DOLI_COMPANY_NAME="JLP Tech Consulting, LLC"
|
||||
- DOLI_COMPANY_COUNTRYCODE="US"
|
||||
- DOLI_URL_ROOT=https://dolibarr.leechpepin.com
|
47
namespaces/apps/dolibarr/patches/deployment.yaml
Normal file
47
namespaces/apps/dolibarr/patches/deployment.yaml
Normal file
|
@ -0,0 +1,47 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: app
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: dolibarr
|
||||
image: dolibarr/dolibarr:20
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: dolibarr-config
|
||||
env:
|
||||
- name: DOLI_DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: dolibarr-secrets
|
||||
key: DB_PASSWORD
|
||||
optional: false
|
||||
- name: DOLI_ADMIN_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: dolibarr-secrets
|
||||
key: ADMIN_PASSWORD
|
||||
optional: false
|
||||
- name: DOLI_INSTANCE_UNIQUE_ID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: dolibarr-secrets
|
||||
key: SECRET_KEY
|
||||
optional: false
|
||||
ports:
|
||||
- containerPort: 80
|
||||
protocol: TCP
|
||||
name: dolibarr
|
||||
volumeMounts:
|
||||
- mountPath: /var/www/documents
|
||||
name: dolibarr
|
||||
subPath: "documents"
|
||||
- mountPath: /var/www/html/custom
|
||||
name: dolibarr
|
||||
subPath: html_custom
|
||||
volumes:
|
||||
- name: dolibarr
|
||||
persistentVolumeClaim:
|
||||
claimName: dolibarr-pvc
|
8
namespaces/apps/dolibarr/patches/pvc.yaml
Normal file
8
namespaces/apps/dolibarr/patches/pvc.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: pvc
|
||||
spec:
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
Loading…
Add table
Reference in a new issue