fix
This commit is contained in:
13
apps/dbgate/check.rhai
Normal file
13
apps/dbgate/check.rhai
Normal file
@@ -0,0 +1,13 @@
|
||||
const DOMAIN = config.domain;
|
||||
fn check_domain() {
|
||||
assert(have_namespace(`${global::DOMAIN}`), `There is no ${global::DOMAIN} namespace`);
|
||||
}
|
||||
fn check_authentik() {
|
||||
assert(have_namespace(`${global::DOMAIN}-auth`), `There is no ${global::DOMAIN}-auth namespace`);
|
||||
assert(have_install(`${global::DOMAIN}-auth`, "authentik"), `No authentik installation in ${global::DOMAIN}-auth`);
|
||||
assert(have_secret(`${global::DOMAIN}-auth`, "authentik"), `No authentik secret in ${global::DOMAIN}-auth`);
|
||||
}
|
||||
fn pre_check() {
|
||||
check_domain();
|
||||
check_authentik();
|
||||
}
|
||||
@@ -176,6 +176,7 @@ options:
|
||||
volume:
|
||||
accessMode: ReadWriteOnce
|
||||
class: ''
|
||||
maxSize: 10Gi
|
||||
size: 1Gi
|
||||
type: Filesystem
|
||||
description: Configure this app storage
|
||||
@@ -183,6 +184,7 @@ options:
|
||||
- volume:
|
||||
accessMode: ReadWriteOnce
|
||||
class: ''
|
||||
maxSize: 10Gi
|
||||
size: 1Gi
|
||||
type: Filesystem
|
||||
properties:
|
||||
@@ -190,6 +192,7 @@ options:
|
||||
default:
|
||||
accessMode: ReadWriteOnce
|
||||
class: ''
|
||||
maxSize: 10Gi
|
||||
size: 1Gi
|
||||
type: Filesystem
|
||||
properties:
|
||||
@@ -203,6 +206,9 @@ options:
|
||||
class:
|
||||
default: ''
|
||||
type: string
|
||||
maxSize:
|
||||
default: 10Gi
|
||||
type: string
|
||||
size:
|
||||
default: 1Gi
|
||||
type: string
|
||||
|
||||
@@ -12,6 +12,7 @@ locals {
|
||||
}:{})
|
||||
}
|
||||
resource "kubectl_manifest" "pvc" {
|
||||
ignore_fields = ["spec.resources.requests.storage"]
|
||||
yaml_body = <<-EOF
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
@@ -19,6 +20,8 @@ resource "kubectl_manifest" "pvc" {
|
||||
name: "${var.component}-${var.instance}"
|
||||
namespace: "${var.namespace}"
|
||||
labels: ${jsonencode(local.common_labels)}
|
||||
annotations:
|
||||
resize.kubesphere.io/storage_limit: "${var.storage.volume.maxSize}"
|
||||
spec: ${jsonencode(local.pvc_spec)}
|
||||
EOF
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user