use configmap

This commit is contained in:
Victor Barba Martin 2021-11-11 19:43:49 +01:00
parent e56abdfba3
commit bf50027bdd
3 changed files with 43 additions and 23 deletions

View File

@ -12,15 +12,15 @@ spec:
repoURL: 'https://haproxy-ingress.github.io/charts'
targetRevision: 0.13.4
chart: haproxy-ingress
helm:
parameters:
- name: controller.hostNetwork
value: 'true'
valueFiles: []
values: |-
controller:
hostNetwork: true
prometheus-port: "9105"
# helm:
# parameters:
# - name: controller.hostNetwork
# value: 'true'
# valueFiles: []
# values: |-
# controller:
# hostNetwork: true
# prometheus-port: "9105"
project: default
syncPolicy:
syncOptions:

View File

@ -14,6 +14,12 @@ spec:
labels:
app: coturn
spec:
nodeSelector:
lke.linode.com/pool-id:
valueFrom:
configMapKeyRef:
name: linode-pool
key: pool
hostNetwork: true
imagePullSecrets:
- name: gcr-json-key
@ -22,4 +28,4 @@ spec:
image: gcr.io/tough-craft-276813/coturn:prod-0.1.83
ports:
- containerPort: 3478
name: http
name: coturn

View File

@ -57,24 +57,38 @@ resource "kubernetes_secret" "bitbucket_ssh_argocd_key" {
}
data "kustomization_build" "argocd" {
depends_on = [kubernetes_namespace.argocd]
path = "../k8s/argocd/overlays/staging"
resource "kubernetes_namespace" "coturn" {
depends_on = [local_file.kubeconfig]
metadata {
name = "coturn"
}
resource "kustomization_resource" "argocd" {
for_each = data.kustomization_build.argocd.ids
manifest = data.kustomization_build.argocd.manifests[each.value]
}
resource "kubernetes_config_map" "coturn_pool" {
metadata {
name = "linode-pool"
namespace = "coturn"
}
data "kustomization_build" "applications" {
depends_on = [kubernetes_namespace.argocd]
path = "../k8s/applications"
data = {
pool = linode_lke_cluster.stg-video-cluster.pool[2].id
}
}
resource "kubernetes_namespace" "webrtc" {
depends_on = [local_file.kubeconfig]
metadata {
name = "webrtc"
}
}
resource "kubernetes_config_map" "webrtc_pool" {
metadata {
name = "linode-pool"
namespace = "webrtc"
}
data = {
pool = linode_lke_cluster.stg-video-cluster.pool[1].id
}
resource "kustomization_resource" "applications" {
for_each = data.kustomization_build.applications.ids
manifest = data.kustomization_build.applications.manifests[each.value]
}