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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user