fix
This commit is contained in:
17
apps/code-server/check.rhai
Normal file
17
apps/code-server/check.rhai
Normal file
@@ -0,0 +1,17 @@
|
||||
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 check_authentik_forward() {
|
||||
assert(have_install(`${global::DOMAIN}-auth`, "authentik-forward"), `No authentik-forward installation in ${global::DOMAIN}-auth`);
|
||||
}
|
||||
fn pre_check() {
|
||||
check_domain();
|
||||
check_authentik();
|
||||
check_authentik_forward();
|
||||
}
|
||||
@@ -95,6 +95,7 @@ options:
|
||||
volume:
|
||||
accessMode: ReadWriteOnce
|
||||
class: ''
|
||||
maxSize: 100Gi
|
||||
size: 20Gi
|
||||
type: Filesystem
|
||||
description: Configure this app storage
|
||||
@@ -102,6 +103,7 @@ options:
|
||||
- volume:
|
||||
accessMode: ReadWriteOnce
|
||||
class: ''
|
||||
maxSize: 100Gi
|
||||
size: 20Gi
|
||||
type: Filesystem
|
||||
properties:
|
||||
@@ -109,6 +111,7 @@ options:
|
||||
default:
|
||||
accessMode: ReadWriteOnce
|
||||
class: ''
|
||||
maxSize: 100Gi
|
||||
size: 20Gi
|
||||
type: Filesystem
|
||||
properties:
|
||||
@@ -122,6 +125,9 @@ options:
|
||||
class:
|
||||
default: ''
|
||||
type: string
|
||||
maxSize:
|
||||
default: 100Gi
|
||||
type: string
|
||||
size:
|
||||
default: 20Gi
|
||||
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
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
@@ -406,6 +406,7 @@ options:
|
||||
volume:
|
||||
accessMode: ReadWriteOnce
|
||||
class: ''
|
||||
maxSize: 100Gi
|
||||
size: 10Gi
|
||||
type: Filesystem
|
||||
description: Configure this app storage
|
||||
@@ -417,6 +418,7 @@ options:
|
||||
volume:
|
||||
accessMode: ReadWriteOnce
|
||||
class: ''
|
||||
maxSize: 100Gi
|
||||
size: 10Gi
|
||||
type: Filesystem
|
||||
properties:
|
||||
@@ -440,6 +442,7 @@ options:
|
||||
default:
|
||||
accessMode: ReadWriteOnce
|
||||
class: ''
|
||||
maxSize: 100Gi
|
||||
size: 10Gi
|
||||
type: Filesystem
|
||||
properties:
|
||||
@@ -453,6 +456,9 @@ options:
|
||||
class:
|
||||
default: ''
|
||||
type: string
|
||||
maxSize:
|
||||
default: 100Gi
|
||||
type: string
|
||||
size:
|
||||
default: 10Gi
|
||||
type: string
|
||||
|
||||
@@ -12,6 +12,7 @@ locals {
|
||||
}:{})
|
||||
}
|
||||
resource "kubectl_manifest" "pvc" {
|
||||
ignore_fields = ["spec.resources.requests.storage"]
|
||||
yaml_body = <<-EOF
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
@@ -20,6 +21,7 @@ resource "kubectl_manifest" "pvc" {
|
||||
namespace: "${var.namespace}"
|
||||
annotations:
|
||||
k8up.io/backup: "true"
|
||||
resize.kubesphere.io/storage_limit: "${var.storage.volume.maxSize}"
|
||||
labels: ${jsonencode(local.common_labels)}
|
||||
spec: ${jsonencode(local.pvc_spec)}
|
||||
EOF
|
||||
|
||||
@@ -164,6 +164,7 @@ data "kustomization_overlay" "data" {
|
||||
name: gitea-shared-storage
|
||||
annotations:
|
||||
k8up.io/backup: "true"
|
||||
resize.kubesphere.io/storage_limit: "${var.storage.volume.maxSize}"
|
||||
spec: ${jsonencode(local.pvc_spec)}
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -423,6 +423,7 @@ options:
|
||||
volume:
|
||||
accessMode: ReadWriteOnce
|
||||
class: ''
|
||||
maxSize: 100Gi
|
||||
size: 20Gi
|
||||
type: Filesystem
|
||||
description: Configure this app storage
|
||||
@@ -434,6 +435,7 @@ options:
|
||||
volume:
|
||||
accessMode: ReadWriteOnce
|
||||
class: ''
|
||||
maxSize: 100Gi
|
||||
size: 20Gi
|
||||
type: Filesystem
|
||||
properties:
|
||||
@@ -457,6 +459,7 @@ options:
|
||||
default:
|
||||
accessMode: ReadWriteOnce
|
||||
class: ''
|
||||
maxSize: 100Gi
|
||||
size: 20Gi
|
||||
type: Filesystem
|
||||
properties:
|
||||
@@ -470,6 +473,9 @@ options:
|
||||
class:
|
||||
default: ''
|
||||
type: string
|
||||
maxSize:
|
||||
default: 100Gi
|
||||
type: string
|
||||
size:
|
||||
default: 20Gi
|
||||
type: string
|
||||
|
||||
Reference in New Issue
Block a user