From 79a22afb98517bc07274a9fb721f5acd5c8c9706 Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Mon, 19 Jun 2023 07:01:14 +0200 Subject: [PATCH] changes to the ingresses --- certbot/clusterissuer.yaml | 39 -------------- grafana/ingress.yaml | 18 ------- grafana/values.yaml | 6 ++- prometheus/ingress.yaml | 4 +- tests/test-ingress.yaml | 107 +------------------------------------ 5 files changed, 8 insertions(+), 166 deletions(-) delete mode 100644 certbot/clusterissuer.yaml delete mode 100644 grafana/ingress.yaml diff --git a/certbot/clusterissuer.yaml b/certbot/clusterissuer.yaml deleted file mode 100644 index 2300b8b..0000000 --- a/certbot/clusterissuer.yaml +++ /dev/null @@ -1,39 +0,0 @@ ---- -apiVersion: cert-manager.io/v1 -kind: ClusterIssuer -metadata: - name: letsencrypt-prod - namespace: cert-manager -spec: - acme: - # The ACME server URL - server: https://acme-v02.api.letsencrypt.org/directory - # Email address used for ACME registration - email: certs@yolokube.de - # Name of a secret used to store the ACME account private key - privateKeySecretRef: - name: letsencrypt-prod - # Enable the HTTP-01 challenge provider - solvers: - - http01: - ingress: - class: nginx ---- -apiVersion: cert-manager.io/v1 -kind: ClusterIssuer -metadata: - name: letsencrypt-staging -spec: - acme: - # The ACME server URL - server: https://acme-staging-v02.api.letsencrypt.org/directory - # Email address used for ACME registration - email: certs@yolokube.de - # Name of a secret used to store the ACME account private key - privateKeySecretRef: - name: letsencrypt-staging - # Enable the HTTP-01 challenge provider - solvers: - - http01: - ingress: - class: nginx \ No newline at end of file diff --git a/grafana/ingress.yaml b/grafana/ingress.yaml deleted file mode 100644 index d15db77..0000000 --- a/grafana/ingress.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: grafana-ingress - namespace: grafana -spec: - rules: - - host: "grafana.apps.yolokube.de" - http: - paths: - - pathType: Prefix - path: "/" - backend: - service: - name: grafana - port: - number: 80 \ No newline at end of file diff --git a/grafana/values.yaml b/grafana/values.yaml index 389e587..8f9d624 100644 --- a/grafana/values.yaml +++ b/grafana/values.yaml @@ -1,3 +1,7 @@ sidecar: dashboards: - enabled: true \ No newline at end of file + enabled: true +ingress: + enabled: true + hosts: + - grafana.services.yolokube.de diff --git a/prometheus/ingress.yaml b/prometheus/ingress.yaml index bbec633..5f560d2 100644 --- a/prometheus/ingress.yaml +++ b/prometheus/ingress.yaml @@ -8,7 +8,7 @@ metadata: nginx.org/basic-auth-secret: prometheus-basic-auth-secret spec: rules: - - host: "prometheus.apps.yolokube.de" + - host: "prometheus.services.yolokube.de" http: paths: - pathType: Prefix @@ -28,7 +28,7 @@ metadata: nginx.org/basic-auth-secret: prometheus-basic-auth-secret spec: rules: - - host: "alertmanager.apps.yolokube.de" + - host: "alertmanager.services.yolokube.de" http: paths: - pathType: Prefix diff --git a/tests/test-ingress.yaml b/tests/test-ingress.yaml index edbe3e5..0a3e556 100644 --- a/tests/test-ingress.yaml +++ b/tests/test-ingress.yaml @@ -1,54 +1,3 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: helloworld-deployment - labels: - app: helloworld -spec: - replicas: 3 - selector: - matchLabels: - app: helloworld - template: - metadata: - labels: - app: helloworld - spec: - containers: - - name: helloworld - image: testcontainers/helloworld - ports: - - containerPort: 8080 ---- -apiVersion: v1 -kind: Service -metadata: - name: helloworld-service -spec: - selector: - app: helloworld - ports: - - protocol: TCP - port: 80 - targetPort: 8080 ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: helloworld-ingress -spec: - rules: - - host: "lb1.yolokube.de" - http: - paths: - - pathType: Prefix - path: "/" - backend: - service: - name: helloworld-service - port: - number: 80 ############### Test --- apiVersion: v1 @@ -99,7 +48,7 @@ metadata: namespace: aaron-test spec: rules: - - host: "test1.apps.yolokube.de" + - host: "test.apps.yolokube.de" http: paths: - pathType: Prefix @@ -109,57 +58,3 @@ spec: name: test1-service port: number: 80 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: test2-deployment - namespace: aaron-test - labels: - app: test2 -spec: - replicas: 3 - selector: - matchLabels: - app: test2 - template: - metadata: - labels: - app: test2 - spec: - containers: - - name: test2 - image: testcontainers/helloworld - ports: - - containerPort: 8080 ---- -apiVersion: v1 -kind: Service -metadata: - name: test2-service - namespace: aaron-test -spec: - selector: - app: test2 - ports: - - protocol: TCP - port: 80 - targetPort: 8080 ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: test2-ingress - namespace: aaron-test -spec: - rules: - - host: "test2.apps.yolokube.de" - http: - paths: - - pathType: Prefix - path: "/" - backend: - service: - name: test2-service - port: - number: 80 \ No newline at end of file