From c4c977efaf0d2bf093a9ddd72accc80ae3914cf7 Mon Sep 17 00:00:00 2001 From: Victor Barba Martin Date: Thu, 18 Nov 2021 08:15:38 +0100 Subject: [PATCH] add production values --- k8s/applications/values-production.yaml | 1 + .../overlays/production/applications.yaml | 9 ++ k8s/argocd/overlays/production/hostname.yaml | 7 ++ .../overlays/production/kustomization.yaml | 20 ++++ k8s/coturn-dns/values-production.yaml | 1 + k8s/monitoring/values-production.yaml | 97 +++++++++++++++++++ k8s/webrtc-be/values-production.yaml | 4 + 7 files changed, 139 insertions(+) create mode 100644 k8s/applications/values-production.yaml create mode 100644 k8s/argocd/overlays/production/applications.yaml create mode 100644 k8s/argocd/overlays/production/hostname.yaml create mode 100644 k8s/argocd/overlays/production/kustomization.yaml create mode 100644 k8s/coturn-dns/values-production.yaml create mode 100644 k8s/monitoring/values-production.yaml create mode 100644 k8s/webrtc-be/values-production.yaml diff --git a/k8s/applications/values-production.yaml b/k8s/applications/values-production.yaml new file mode 100644 index 0000000..9cfb2b9 --- /dev/null +++ b/k8s/applications/values-production.yaml @@ -0,0 +1 @@ +environment: "staging" \ No newline at end of file diff --git a/k8s/argocd/overlays/production/applications.yaml b/k8s/argocd/overlays/production/applications.yaml new file mode 100644 index 0000000..c64f69e --- /dev/null +++ b/k8s/argocd/overlays/production/applications.yaml @@ -0,0 +1,9 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: applications +spec: + source: + helm: + valueFiles: + - values-production.yaml \ No newline at end of file diff --git a/k8s/argocd/overlays/production/hostname.yaml b/k8s/argocd/overlays/production/hostname.yaml new file mode 100644 index 0000000..10543d8 --- /dev/null +++ b/k8s/argocd/overlays/production/hostname.yaml @@ -0,0 +1,7 @@ +--- +- op: replace + path: /spec/rules/0/host + value: &host argocd.video.jamkazam.com +- op: replace + path: /spec/tls/0/hosts/0 + value: *host diff --git a/k8s/argocd/overlays/production/kustomization.yaml b/k8s/argocd/overlays/production/kustomization.yaml new file mode 100644 index 0000000..7472b9f --- /dev/null +++ b/k8s/argocd/overlays/production/kustomization.yaml @@ -0,0 +1,20 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: +- ../../base + +commonLabels: + app.kubernetes.io/instance: argocd + +patchesStrategicMerge: +- applications.yaml + +patchesJson6902: + - path: hostname.yaml + target: + group: networking.k8s.io + kind: Ingress + name: argocd-server-ingress + version: v1 \ No newline at end of file diff --git a/k8s/coturn-dns/values-production.yaml b/k8s/coturn-dns/values-production.yaml new file mode 100644 index 0000000..bb5fd0d --- /dev/null +++ b/k8s/coturn-dns/values-production.yaml @@ -0,0 +1 @@ +domain: "video.jamkazam.com" \ No newline at end of file diff --git a/k8s/monitoring/values-production.yaml b/k8s/monitoring/values-production.yaml new file mode 100644 index 0000000..923f2da --- /dev/null +++ b/k8s/monitoring/values-production.yaml @@ -0,0 +1,97 @@ +# Helm chart values for Prometheus Operator with HTTPS and basic auth +kube-prometheus-stack: + prometheus: + ingress: + enabled: true + annotations: + kubernetes.io/ingress.class: nginx + nginx.ingress.kubernetes.io/rewrite-target: /$2 + cert-manager.io/cluster-issuer: letsencrypt-nginx-production + # nginx.ingress.kubernetes.io/auth-type: basic + # nginx.ingress.kubernetes.io/auth-secret: basic-auth + # nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required' + hosts: + - monitoring.video.jamkazam.com + paths: + - /prometheus(/|$)(.*) + tls: + - secretName: monitoring + hosts: + - monitoring.video.jamkazam.com + prometheusSpec: + routePrefix: / + externalUrl: https://monitoring.video.jamkazam.com/prometheus + storageSpec: + volumeClaimTemplate: + spec: + storageClassName: linode-block-storage-retain + resources: + requests: + storage: 10Gi + + alertmanager: + ingress: + enabled: true + annotations: + kubernetes.io/ingress.class: nginx + nginx.ingress.kubernetes.io/rewrite-target: /$2 + cert-manager.io/cluster-issuer: letsencrypt-nginx-production + # nginx.ingress.kubernetes.io/auth-type: basic + # nginx.ingress.kubernetes.io/auth-secret: basic-auth + # nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required' + hosts: + - monitoring.video.jamkazam.com + paths: + - /alertmanager(/|$)(.*) + tls: + - secretName: monitoring + hosts: + - monitoring.video.jamkazam.com + alertmanagerSpec: + routePrefix: / + externalUrl: https://monitoring.video.jamkazam.com/alertmanager + storage: + volumeClaimTemplate: + spec: + storageClassName: linode-block-storage-retain + resources: + requests: + storage: 10Gi + + grafana: + persistence: + enabled: true + storageClassName: linode-block-storage-retain + size: 10Gi + ingress: + enabled: true + annotations: + kubernetes.io/ingress.class: nginx + nginx.ingress.kubernetes.io/rewrite-target: /$2 + cert-manager.io/cluster-issuer: letsencrypt-nginx-production + # nginx.ingress.kubernetes.io/auth-type: basic + # nginx.ingress.kubernetes.io/auth-secret: basic-auth + # nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required' + hosts: + - monitoring.video.jamkazam.com + path: /grafana(/|$)(.*) + tls: + - secretName: monitoring + hosts: + - monitoring.video.jamkazam.com + grafana.ini: + server: + domain: monitoring.video.jamkazam.com + root_url: "%(protocol)s://%(domain)s/grafana/" + enable_gzip: "true" + + # Disable control plane metrics + kubeEtcd: + enabled: false + + kubeControllerManager: + enabled: false + + kubeScheduler: + enabled: false + \ No newline at end of file diff --git a/k8s/webrtc-be/values-production.yaml b/k8s/webrtc-be/values-production.yaml new file mode 100644 index 0000000..9d1c4be --- /dev/null +++ b/k8s/webrtc-be/values-production.yaml @@ -0,0 +1,4 @@ +# Ingress +domain: "webrtc-be.video.jamkazam.com" +# Webrtc env variables +backendUrl: "https://jamkazam.com" \ No newline at end of file