use configmap
This commit is contained in:
parent
e56abdfba3
commit
bf50027bdd
|
|
@ -12,15 +12,15 @@ spec:
|
||||||
repoURL: 'https://haproxy-ingress.github.io/charts'
|
repoURL: 'https://haproxy-ingress.github.io/charts'
|
||||||
targetRevision: 0.13.4
|
targetRevision: 0.13.4
|
||||||
chart: haproxy-ingress
|
chart: haproxy-ingress
|
||||||
helm:
|
# helm:
|
||||||
parameters:
|
# parameters:
|
||||||
- name: controller.hostNetwork
|
# - name: controller.hostNetwork
|
||||||
value: 'true'
|
# value: 'true'
|
||||||
valueFiles: []
|
# valueFiles: []
|
||||||
values: |-
|
# values: |-
|
||||||
controller:
|
# controller:
|
||||||
hostNetwork: true
|
# hostNetwork: true
|
||||||
prometheus-port: "9105"
|
# prometheus-port: "9105"
|
||||||
project: default
|
project: default
|
||||||
syncPolicy:
|
syncPolicy:
|
||||||
syncOptions:
|
syncOptions:
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,12 @@ spec:
|
||||||
labels:
|
labels:
|
||||||
app: coturn
|
app: coturn
|
||||||
spec:
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
lke.linode.com/pool-id:
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: linode-pool
|
||||||
|
key: pool
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: gcr-json-key
|
- name: gcr-json-key
|
||||||
|
|
@ -22,4 +28,4 @@ spec:
|
||||||
image: gcr.io/tough-craft-276813/coturn:prod-0.1.83
|
image: gcr.io/tough-craft-276813/coturn:prod-0.1.83
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 3478
|
- containerPort: 3478
|
||||||
name: http
|
name: coturn
|
||||||
|
|
|
||||||
|
|
@ -57,24 +57,38 @@ resource "kubernetes_secret" "bitbucket_ssh_argocd_key" {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
data "kustomization_build" "argocd" {
|
resource "kubernetes_namespace" "coturn" {
|
||||||
depends_on = [kubernetes_namespace.argocd]
|
depends_on = [local_file.kubeconfig]
|
||||||
path = "../k8s/argocd/overlays/staging"
|
|
||||||
|
metadata {
|
||||||
|
name = "coturn"
|
||||||
}
|
}
|
||||||
resource "kustomization_resource" "argocd" {
|
}
|
||||||
|
resource "kubernetes_config_map" "coturn_pool" {
|
||||||
for_each = data.kustomization_build.argocd.ids
|
metadata {
|
||||||
|
name = "linode-pool"
|
||||||
manifest = data.kustomization_build.argocd.manifests[each.value]
|
namespace = "coturn"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data = {
|
||||||
data "kustomization_build" "applications" {
|
pool = linode_lke_cluster.stg-video-cluster.pool[2].id
|
||||||
depends_on = [kubernetes_namespace.argocd]
|
}
|
||||||
path = "../k8s/applications"
|
}
|
||||||
|
|
||||||
|
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]
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue