Browse Source

fix template issues

xcad 2 weeks ago
parent
commit
bd331f7caa

+ 4 - 2
library/compose/authentik/template.yaml

@@ -70,14 +70,15 @@ spec:
         description: Database password
         type: str
         sensitive: true
+        autogenerated: true
         required: true
       database_user:
         type: str
-        default: ''
+        default: authentik
         description: The database user
       database_name:
         type: str
-        default: ''
+        default: authentik
         description: The database name
       database_external:
         type: bool
@@ -117,6 +118,7 @@ spec:
         extra: Used for cookie signing and unique user IDs
         type: str
         sensitive: true
+        autogenerated: true
         required: true
       authentik_admin_password:
         description: Initial admin user password

+ 41 - 1
library/compose/gitea/template.yaml

@@ -62,7 +62,47 @@ spec:
         needs:
         - traefik_enabled=false
         default: https://git.example.com
-  database: null
+  database:
+    vars:
+      database_type:
+        type: enum
+        options:
+        - sqlite
+        - postgres
+        - mysql
+        default: sqlite
+        description: Database backend type
+      database_name:
+        type: str
+        default: gitea
+        description: Database name
+        needs:
+        - database_type=postgres,mysql
+      database_user:
+        type: str
+        default: gitea
+        description: Database user
+        needs:
+        - database_type=postgres,mysql
+      database_host:
+        type: str
+        default: postgres
+        description: Database host
+        needs:
+        - database_type=postgres,mysql;database_external=true
+      database_password:
+        type: str
+        sensitive: true
+        autogenerated: true
+        description: Database password
+        needs:
+        - database_type=postgres,mysql
+      database_external:
+        type: bool
+        default: false
+        description: Use external database
+        needs:
+        - database_type=postgres,mysql
   ports:
     vars:
       ports_http:

+ 4 - 0
library/compose/semaphoreui/template.yaml

@@ -142,10 +142,14 @@ spec:
         default: semaphore
       database_host:
         type: str
+        default: postgres
         required: true
+        needs:
+        - database_external=true
       database_password:
         type: str
         sensitive: true
+        autogenerated: true
         required: true
       database_external:
         type: bool