Compare commits
15
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
594d0af218 | ||
|
|
b778662fa5 | ||
|
|
ad69271f01 | ||
|
|
652710a98a | ||
|
|
dca67792f6 | ||
|
|
ae83c9a258 | ||
|
|
a5e0e9a5c0 | ||
|
|
6e07a68e90 | ||
|
|
6ee3494165 | ||
|
|
84e9172eac | ||
|
|
cbf2a33440 | ||
|
|
3ff155e3e6 | ||
|
|
a53852b0c6 | ||
|
|
d40c4569e4 | ||
|
|
b8480cc1fb |
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
DB_DATABASE_NAME: ZGphbmdv
|
||||
DB_HOST: ZGphbmdvLWRiLXN2Yw==
|
||||
DB_PASSWORD: U3VmZnJhZ2UtTW9uZXliYWdzLUlsbHVzaW9uNw==
|
||||
DB_USERNAME: ZGphbmdvX3VzZXJuYW1l
|
||||
kind: Secret
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: django-db-credentials
|
||||
namespace: django
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
VPN_DNS_IP: MTAuMi4wLjE=
|
||||
VPN_ENDPOINT_IP: MjEyLjguMjUzLjEzNw==
|
||||
VPN_ENDPOINT_PORT: NTE4MjA=
|
||||
WIREGUARD_PRIVATE_KEY: Y0grY0hLd3FMeXV3UlVlZy8wRjFYWVlDQVM4bkQwWGsxNmVOQlVLc2tYbz0=
|
||||
WIREGUARD_PUBLIC_KEY: VVJwZVp4dHlVWEFVVUEwTVdjRmRDU2E3RitNdmNoSjRlTlNKVWV0S0VHaz0=
|
||||
kind: Secret
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: gluetun-secret-netherland
|
||||
namespace: gluetun
|
||||
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
DB_DATABASE_NAME: aW1taWNo
|
||||
DB_HOST: aW1taWNodC1kYi1zdmM=
|
||||
DB_PASSWORD: U3Bvb24tQm9yb3VnaC1CYXNpczg=
|
||||
DB_USERNAME: aW1taWNoX3VzZXJuYW1l
|
||||
kind: Secret
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: immich-db-credentials
|
||||
namespace: immicht
|
||||
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
DB_DATABASE: Ym9va3N0YWNrYXBw
|
||||
# DB_HOST: ZGIuYm9va3N0YWNrLnN2Yw==
|
||||
DB_HOST: Ym9va3N0YWNrLWRiLXN2Yw==
|
||||
DB_PASS: VW5oYXBweS1Db21tZW5jZS1FdmVyeW9uZTQ=
|
||||
DB_USER: Ym9va3N0YWNrX3VzZXJuYW1l
|
||||
APP_KEY: "N3dvdmU3ZDQwbjlyNm90YW43ZGEyODQ5am10ajlqNHU="
|
||||
kind: Secret
|
||||
metadata:
|
||||
# creationTimestamp: "2024-06-13T07:37:49Z"
|
||||
name: bookstack-credentials
|
||||
namespace: bookstack
|
||||
# resourceVersion: "20756717"
|
||||
# uid: 66d4cc7d-741a-49cc-979d-a8b95ffb983a
|
||||
type: Opaque
|
||||
@@ -0,0 +1,17 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: database
|
||||
namespace: servarr
|
||||
annotations:
|
||||
spec:
|
||||
ipFamilyPolicy: PreferDualStack
|
||||
ports:
|
||||
- name: tcp
|
||||
port: 5432
|
||||
targetPort: 5432
|
||||
protocol: TCP
|
||||
|
||||
type: LoadBalancer
|
||||
selector:
|
||||
app: prowlarr-db
|
||||
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
DB_DATABASE: cHJvd2xhcnItbWFpbg==
|
||||
DB_HOST: cHJvd2xhcnItZGItc3Zj
|
||||
DB_PASS: R29saWF0aC1EZWVwZW4tRGl2aWRpbmc3
|
||||
DB_USER: cHJvd2xhcnJfdXNlcm5hbWU=
|
||||
kind: Secret
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: prowlarr-credentials
|
||||
namespace: bookstack
|
||||
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
DB_DATABASE: cHJvd2xhcnItbWFpbg==
|
||||
DB_HOST: cHJvd2xhcnItZGItc3Zj
|
||||
DB_PASS: R29saWF0aC1EZWVwZW4tRGl2aWRpbmc3
|
||||
DB_USER: c2VydmFycl91c2VybmFtZQ==
|
||||
kind: Secret
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: servarr-db-credentials
|
||||
namespace: servarr
|
||||
@@ -0,0 +1,78 @@
|
||||
#!/bin/bash
|
||||
|
||||
#install required packages
|
||||
apk add curl wget
|
||||
|
||||
#named argument generation
|
||||
skip_searching_gallery="${skip_searching_gallery:-false}"
|
||||
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
if [[ $1 == "--"* ]]; then
|
||||
v="${1/--/}"
|
||||
declare "$v"="$2"
|
||||
shift
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
#check if we will use a HTTP proxy or not
|
||||
|
||||
if [[ -z $http_proxy ]]; then
|
||||
echo "not using proxy"
|
||||
curl_command="curl"
|
||||
else
|
||||
echo "using proxy"
|
||||
curl_command="curl -x $http_proxy"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
#dowload from https://www.pornpics.com/pornstars/eiby-shine/
|
||||
DESTINATION_FOLDER="/data"
|
||||
PROXY_HTTP="http://gluetun-svc.gluetun.svc:8888"
|
||||
|
||||
#BASE_URL="https://www.pornpics.com/pornstars/eiby-shine/"
|
||||
#pornstars="eiby-shine"
|
||||
|
||||
#BASE_URL="https://www.pornpics.com/pornstars/chloe-camilla/"
|
||||
#pornstars="chloe-camilla"
|
||||
|
||||
#BASE_URL="https://www.pornpics.com/pornstars/becky-summer"
|
||||
#pornstars="becky-summer"
|
||||
|
||||
|
||||
#clear files beforehand
|
||||
|
||||
echo "Pornstar: "$pornstars
|
||||
echo "URL: "$BASE_URL
|
||||
|
||||
|
||||
mkdir -p $DESTINATION_FOLDER/$pornstars
|
||||
|
||||
if [[ $skip_searching_gallery == true ]]; then
|
||||
echo "not looping through galleries"
|
||||
echo "using existing file instead"
|
||||
#because we need to keep the file $DESTINATION_FOLDER/$pornstars-urls_of_galleries.txt with the existing URL , in this condition,
|
||||
#no deletion of this file
|
||||
else
|
||||
echo "looping through galleries"
|
||||
#because we will re-generate this file, can be emptied
|
||||
echo "" > $DESTINATION_FOLDER/$pornstars-urls_of_galleries.txt
|
||||
$curl_command -s $BASE_URL | grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*" | grep "https://www.pornpics.com/galleries/" |sort -u >> $DESTINATION_FOLDER/$pornstars-urls_of_galleries.txt
|
||||
fi
|
||||
|
||||
echo "" > $DESTINATION_FOLDER/$pornstars-image_to_download.txt
|
||||
|
||||
|
||||
for f in $(cat $DESTINATION_FOLDER/$pornstars-urls_of_galleries.txt ); do
|
||||
$curl_command $f | grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*" | grep "https://cdni.pornpics.com/" >> $DESTINATION_FOLDER/$pornstars-image_to_download.txt
|
||||
echo $f
|
||||
done
|
||||
|
||||
|
||||
for g in $(cat $DESTINATION_FOLDER/$pornstars-image_to_download.txt ); do
|
||||
$curl_command -O --output-dir $DESTINATION_FOLDER/$pornstars $g
|
||||
# wget -e use_proxy=yes -e http_proxy=$PROXY_HTTP $g -P $DESTINATION_FOLDER/$pornstars
|
||||
echo $g
|
||||
done
|
||||
@@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
VPN_DNS_IP: MTAuMi4wLjE=
|
||||
VPN_ENDPOINT_IP: MjEyLjguMjUzLjEzNw==
|
||||
VPN_ENDPOINT_PORT: NTE4MjA=
|
||||
WIREGUARD_PRIVATE_KEY: Y0grY0hLd3FMeXV3UlVlZy8wRjFYWVlDQVM4bkQwWGsxNmVOQlVLc2tYbz0=
|
||||
WIREGUARD_PUBLIC_KEY: VVJwZVp4dHlVWEFVVUEwTVdjRmRDU2E3RitNdmNoSjRlTlNKVWV0S0VHaz0=
|
||||
kind: Secret
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: gluetun-secret-netherland
|
||||
namespace: stash
|
||||
@@ -0,0 +1,31 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
download.sh: "#!/bin/bash\n\n#install required packages\napk add curl wget\n\n#named
|
||||
argument generation\nskip_searching_gallery=\"${skip_searching_gallery:-false}\"\n\n\nwhile
|
||||
[ $# -gt 0 ]; do\n if [[ $1 == \"--\"* ]]; then\n v=\"${1/--/}\"\n declare
|
||||
\"$v\"=\"$2\"\n shift\n fi\n shift\ndone\n\n#check if we will use
|
||||
a HTTP proxy or not\n\nif [[ -z $http_proxy ]]; then\n echo \"not using
|
||||
proxy\"\n curl_command=\"curl\"\nelse\n echo \"using proxy\"\n curl_command=\"curl
|
||||
-x $http_proxy\"\n\nfi\n\n\n#dowload from https://www.pornpics.com/pornstars/eiby-shine/\nDESTINATION_FOLDER=\"/data\"\nPROXY_HTTP=\"http://gluetun-svc.gluetun.svc:8888\"\n\n#BASE_URL=\"https://www.pornpics.com/pornstars/eiby-shine/\"\n#pornstars=\"eiby-shine\"\n\n#BASE_URL=\"https://www.pornpics.com/pornstars/chloe-camilla/\"\n#pornstars=\"chloe-camilla\"\n\n#BASE_URL=\"https://www.pornpics.com/pornstars/becky-summer\"\n#pornstars=\"becky-summer\"\n\n\n#clear
|
||||
files beforehand\n\necho \"Pornstar: \"$pornstars\necho \"URL: \"$BASE_URL\n\n\nmkdir
|
||||
-p $DESTINATION_FOLDER/$pornstars\n\nif [[ $skip_searching_gallery == true ]];
|
||||
then\n echo \"not looping through galleries\"\n\t\techo \"using existing
|
||||
file instead\"\n\t\t#because we need to keep the file $DESTINATION_FOLDER/$pornstars-urls_of_galleries.txt
|
||||
with the existing URL , in this condition, \n\t\t#no deletion of this file\nelse\n
|
||||
\ echo \"looping through galleries\"\n\t\t#because we will re-generate this
|
||||
file, can be emptied\n\t\techo \"\" > $DESTINATION_FOLDER/$pornstars-urls_of_galleries.txt\n
|
||||
\ $curl_command -s $BASE_URL | grep -Eo \"(http|https)://[a-zA-Z0-9./?=_%:-]*\"
|
||||
| grep \"https://www.pornpics.com/galleries/\" |sort -u >> $DESTINATION_FOLDER/$pornstars-urls_of_galleries.txt\nfi\n\necho
|
||||
\"\" > $DESTINATION_FOLDER/$pornstars-image_to_download.txt\n\n\nfor f in $(cat
|
||||
$DESTINATION_FOLDER/$pornstars-urls_of_galleries.txt ); do\n\t$curl_command $f
|
||||
| grep -Eo \"(http|https)://[a-zA-Z0-9./?=_%:-]*\" | grep \"https://cdni.pornpics.com/\"
|
||||
>> $DESTINATION_FOLDER/$pornstars-image_to_download.txt\n\techo $f\ndone\n\n\nfor
|
||||
g in $(cat $DESTINATION_FOLDER/$pornstars-image_to_download.txt ); do \n\t$curl_command
|
||||
-O --output-dir $DESTINATION_FOLDER/$pornstars $g\n# wget -e use_proxy=yes
|
||||
-e http_proxy=$PROXY_HTTP $g -P $DESTINATION_FOLDER/$pornstars\n echo $g
|
||||
\ndone\n"
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: pornpic-dowloader
|
||||
namespace: stash
|
||||
@@ -0,0 +1,41 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: stash-pornpics-dowloader
|
||||
namespace: stash
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: stash-pornpics-dowloader
|
||||
image: bash
|
||||
imagePullPolicy: Always
|
||||
volumeMounts:
|
||||
- mountPath: /config
|
||||
name: scripts
|
||||
- mountPath: /data
|
||||
mountPropagation: None
|
||||
name: data-pvc
|
||||
command:
|
||||
- bash
|
||||
- -c
|
||||
- sleep 3600
|
||||
# - bash
|
||||
- /config/download.sh
|
||||
- --http_proxy
|
||||
- "http://gluetun-svc.gluetun.svc:8888"
|
||||
- --BASE_URL
|
||||
- "https://www.pornpics.com/?q=bretona"
|
||||
- --pornstars
|
||||
- "bretona"
|
||||
restartPolicy: Never
|
||||
volumes:
|
||||
- configMap:
|
||||
defaultMode: 0744
|
||||
name: pornpic-dowloader
|
||||
name: scripts
|
||||
- name: data-pvc
|
||||
persistentVolumeClaim:
|
||||
claimName: data-pvc
|
||||
backoffLimit: 4
|
||||
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
|
||||
skip_searching_gallery="${skip_searching_gallery:-false}"
|
||||
|
||||
#echo "$skip_searching_gallery"
|
||||
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
if [[ $1 == "--"* ]]; then
|
||||
v="${1/--/}"
|
||||
#declare "$v"="$2"
|
||||
"$v"="$2"
|
||||
|
||||
shift
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
#echo "$skip_searching_gallery"
|
||||
#if [[ -z $skip_searching_gallery ]]; then
|
||||
if [[ $skip_searching_gallery == true ]]; then
|
||||
echo "not looping through galleries"
|
||||
else
|
||||
echo "looping through galleries"
|
||||
fi
|
||||
|
||||
if [[ -z $http_proxy ]]; then
|
||||
echo "not using proxy"
|
||||
curl_command="curl"
|
||||
else
|
||||
echo "using proxy"
|
||||
curl_command="curl -x $http_proxy"
|
||||
|
||||
fi
|
||||
echo $curl_command
|
||||
$curl_command https://cdni.pornpics.com/460/7/424/83105958/83105958_010_388f.jpg -O
|
||||
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
DB_DATABASE: d2lraQ==
|
||||
DB_HOST: d2lraWpzLWRiLXN2Yw==
|
||||
DB_PASS: VmVzdDctUHJvZHVjdC1VbnN0ZWFkeQ==
|
||||
DB_USER: d2lraWpzX3VzZXJuYW1l
|
||||
kind: Secret
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: wikijs-db-credentials
|
||||
namespace: wikijs
|
||||
@@ -12,13 +12,17 @@ variable "kubernetes" {
|
||||
name = optional(string)
|
||||
image = string
|
||||
pvc = optional(map(object({
|
||||
name = string
|
||||
pvc = optional(bool, false)
|
||||
config_map = optional(bool, false)
|
||||
host_path = optional(string)
|
||||
pvc_size = optional(string)
|
||||
storage_class_name = optional(string, "nfs-storage-intelligent")
|
||||
mount_path = string
|
||||
name = string
|
||||
pvc = optional(bool, false)
|
||||
config_map = optional(bool, false)
|
||||
secret = optional(bool, false)
|
||||
host_path = optional(string)
|
||||
pvc_size = optional(string)
|
||||
storage_class_name = optional(string, "nfs-storage-intelligent")
|
||||
annotations_fileType = optional(string)
|
||||
existing_pvc = optional(bool, false)
|
||||
mount_path = string
|
||||
sub_path = optional(string)
|
||||
})))
|
||||
environment = optional(map(object({
|
||||
name = optional(string)
|
||||
@@ -30,14 +34,14 @@ variable "kubernetes" {
|
||||
})
|
||||
}))
|
||||
})))
|
||||
replicas = optional(number, 1)
|
||||
namespace = optional(string)
|
||||
connected_namespace = optional(string, "")
|
||||
# namespace = optional(string,coalesce(connected_namespace,""))
|
||||
#block_namespace_creation = optional(bool, false)
|
||||
replicas = optional(number, 1)
|
||||
namespace = optional(string)
|
||||
connected_namespace = optional(string, "")
|
||||
command = optional(list(string))
|
||||
service_port = optional(list(number))
|
||||
service_type = optional(string, "ClusterIP")
|
||||
service_name = optional(string)
|
||||
domain_name = optional(string)
|
||||
liveness_tcp_socket = optional(number)
|
||||
liveness_http_get = optional(string)
|
||||
liveness_http_get_path = optional(string)
|
||||
@@ -62,18 +66,36 @@ variable "kubernetes" {
|
||||
}
|
||||
|
||||
locals {
|
||||
pvc_details = flatten([
|
||||
pvc_list = flatten([
|
||||
for key, value in var.kubernetes : [
|
||||
for index, pvc in value.pvc : {
|
||||
index = index
|
||||
pvc = pvc.pvc
|
||||
name = pvc.name
|
||||
pvc_size = pvc.pvc_size
|
||||
mount_path = pvc.mount_path
|
||||
storage_class_name = pvc.storage_class_name
|
||||
namespace = coalesce(value.namespace, value.connected_namespace, key)
|
||||
key = "${coalesce(value.namespace, value.connected_namespace, key)}/${pvc.name}"
|
||||
index = index
|
||||
pvc = pvc.pvc
|
||||
name = pvc.name
|
||||
pvc_size = pvc.pvc_size
|
||||
mount_path = pvc.mount_path
|
||||
storage_class_name = pvc.storage_class_name
|
||||
annotations_fileType = pvc.annotations_fileType
|
||||
existing_pvc = pvc.existing_pvc
|
||||
sub_path = pvc.sub_path
|
||||
namespace = coalesce(value.namespace, value.connected_namespace, key)
|
||||
}] if value.enabled == true && value.pvc != null
|
||||
])
|
||||
|
||||
# group duplicates instead of throwing an error
|
||||
pvc_map_grouped = {
|
||||
for p in local.pvc_list :
|
||||
p.key => p...
|
||||
}
|
||||
|
||||
# keep only one PVC per key (take the first)
|
||||
pvc_map = {
|
||||
for k, list in local.pvc_map_grouped :
|
||||
k => list[0]
|
||||
}
|
||||
|
||||
pvc_details = values(local.pvc_map)
|
||||
}
|
||||
|
||||
locals {
|
||||
@@ -118,7 +140,7 @@ locals {
|
||||
])
|
||||
}
|
||||
|
||||
resource "kubernetes_manifest" "service" {
|
||||
resource "kubernetes_manifest" "manifest" {
|
||||
for_each = { for item in local.kubernetes_manifests : item.key => item }
|
||||
|
||||
manifest = yamldecode(file(each.value.manifest))
|
||||
@@ -128,14 +150,19 @@ resource "kubernetes_manifest" "service" {
|
||||
|
||||
|
||||
resource "kubernetes_persistent_volume_claim" "automatic-pvc" {
|
||||
for_each = { for key, value in local.pvc_details : "${value.index}" => merge(value, { mew_key = value.index }) if value.pvc }
|
||||
for_each = { for key, value in local.pvc_details : "${value.index}" => merge(value, { mew_key = value.index }) if value.pvc && value.existing_pvc != true }
|
||||
metadata {
|
||||
namespace = coalesce(each.value.namespace, each.key)
|
||||
name = "${each.value.name}-pvc"
|
||||
labels = {
|
||||
deployment_method = "Terraform"
|
||||
}
|
||||
annotations = {
|
||||
fileType = try(each.value.annotations_fileType, "file")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
spec {
|
||||
access_modes = ["ReadWriteMany"]
|
||||
storage_class_name = each.value.storage_class_name
|
||||
@@ -210,6 +237,7 @@ resource "kubernetes_service" "automatic_service" {
|
||||
content {
|
||||
port = port.value
|
||||
target_port = port.value
|
||||
name = replace("${each.key}${port.value}", "/(.{0,15})(.*)/", "$1")
|
||||
|
||||
}
|
||||
}
|
||||
@@ -310,7 +338,8 @@ resource "kubernetes_deployment_v1" "automatic" {
|
||||
for_each = each.value.service_port != null ? each.value.service_port : []
|
||||
content {
|
||||
container_port = port.value
|
||||
name = "${each.key}-${port.value}"
|
||||
# name = "${each.key}-${port.value}"
|
||||
name = replace("${each.key}${port.value}", "/(.{0,15})(.*)/", "$1")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,6 +349,7 @@ resource "kubernetes_deployment_v1" "automatic" {
|
||||
content {
|
||||
mount_path = volume_mount.value.mount_path
|
||||
name = "${volume_mount.value.name}-pvc"
|
||||
sub_path = volume_mount.value.sub_path != null ? volume_mount.value.sub_path : ""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -347,6 +377,20 @@ resource "kubernetes_deployment_v1" "automatic" {
|
||||
}
|
||||
}
|
||||
|
||||
# dynamic "command" {
|
||||
# for_each = each.value.command != null ? [1] : []
|
||||
# content {
|
||||
# [each.value.command]
|
||||
# }
|
||||
|
||||
# }
|
||||
# command = each.value.command != null ? {
|
||||
# [each.value.command]
|
||||
# } : {}
|
||||
|
||||
|
||||
command = each.value.command != null ? each.value.command : []
|
||||
|
||||
|
||||
dynamic "env" {
|
||||
for_each = each.value.environment != null ? each.value.environment : {}
|
||||
@@ -461,6 +505,12 @@ resource "kubernetes_deployment_v1" "automatic" {
|
||||
}
|
||||
}
|
||||
|
||||
dynamic "secret" {
|
||||
for_each = volume.value.secret ? [1] : []
|
||||
content {
|
||||
secret_name = volume.value.name
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -520,9 +570,8 @@ resource "kubernetes_deployment_v1" "database-automatic" {
|
||||
name = "${each.key}-db-pvc"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
command = try([each.value.database.command],[])
|
||||
#command = [try(each.value.database.command,"")]
|
||||
|
||||
dynamic "env" {
|
||||
for_each = each.value.environment != null ? each.value.environment : {}
|
||||
@@ -720,3 +769,22 @@ resource "kubernetes_deployment_v1" "redis-automatic" {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "kubernetes_config_map" "automatic-configmap" {
|
||||
metadata {
|
||||
name = "extra-sites-terraform"
|
||||
namespace = "reverse-proxy"
|
||||
annotations = {
|
||||
"reloader.stakater.com/match" : "true",
|
||||
}
|
||||
}
|
||||
|
||||
data = {
|
||||
for key, value in var.kubernetes :
|
||||
"${value.domain_name}.conf" => templatefile("nginx_config.tftpl", {
|
||||
name_site = value.domain_name
|
||||
name_service = "${key}-svc.${coalesce(value.namespace, value.connected_namespace, key)}.svc:${value.service_port.0}"
|
||||
}) if value.domain_name != null && value.enabled == true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+6265
-3
File diff suppressed because it is too large
Load Diff
+6263
-10
File diff suppressed because it is too large
Load Diff
+1191
-177
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user