From d40ddb48c597343e5ae894cea4b40188161f9531 Mon Sep 17 00:00:00 2001 From: pi-ux-ce Date: Tue, 17 Dec 2024 11:57:34 +0000 Subject: [PATCH] documentation --- README.md | 128 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 127 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d06b904..dbd7946 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,100 @@ Not required , the object name will be used if not specified -## example +## examples + +### enabled + +Disable the whole object , including PVC , secrets , deployments and services +If you just want to remove the pod , you should consider set the replica option to 0 + +``` + enabled = false +``` + +### replicas + +Set the number of replicas , can be used tyo keep the ressources and only remove the pods + +``` +replicas = 0 +``` + + +### namespace + +Specify a different namespace , by default it will take the name of the object otherwise + +``` + namespace = "testnginx" +``` + +### image + +Specify the image to use , mandatory + +``` + image = "nginx:latest" +``` + +### Database + +Specifying the object (even empty) will automatically create all the objects related to the database (service,deployment,...) + +``` + database = {} +``` +#### Custom images version + +You can select a custom image, by default it will use postgresql , if you do change the image , check if teh port is the same , otgherwise it will use postgresql defaut port + +``` + database = { + "image" = "lscr.io/linuxserver/mariadb" + + } +``` + +#### Custom database port + +You can select a custom database port , by default it will use postgresql , remember to update the secret for that +The database service will be automatically updated to reflect this port as well + +``` + database = { + "image" = "lscr.io/linuxserver/mariadb" + "port" = 3306 + + } +``` + +#### Custom mountpath + +You can select a custom mount path, by default it will use postgresql data folder (/var/lib/postgresql/data) + +``` + database = { + "mountPath" = "/config" + } +``` +### redis + +Specifying the object (even empty) will automatically create all the objects related to Redis (service,deployment,...) + +``` + redis = {} +``` +#### Custom images version + +You can select a custom image, by default it will use redis version 7 (docker.io/library/redis:7) + +``` +redis = { + image = "docker.io/library/redis:7" + } +``` + + ### Extra manifest @@ -73,6 +166,39 @@ You can add some extra manifest using this command ``` extra_manifest = ["/opt/kubernetes/Bookstack_kube/Bookstack.configmap.yaml","/opt/kubernetes/Bookstack_kube/Bookstack.secret.yaml"] ``` + +### environment + +#### Simple environment variables + +You can specifiy a variable through the environment object +``` + environment = { + PORT = { + value = "80" + } + } +``` +#### environment_variables from a secret + +``` + environment = { + MYSQL_ROOT_PASSWORD = { + value_from = { + secret_key_ref = { + name = "bookstack-credentials" + key = "DB_PASS" + } + } + } + } +``` + +### Secret reference + +You can have your secret fully mounted instead of specifiying all the variables + secret_ref = ["secret1"] + ### Volumes #### Volume as PVC