From 89d03e1e3019a78c757a01d6c58fc81cc7930bf6 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Thu, 9 Jun 2022 10:02:51 -0400 Subject: [PATCH] feat(cluster): replace ealenn/echo-server with jmalloc/echo-server Signed-off-by: Devin Buhl --- .../default/echo-server/helm-release.yaml | 89 ++++++++++++++----- cluster/charts/ealenn.yaml | 10 --- cluster/charts/kustomization.yaml | 1 - 3 files changed, 69 insertions(+), 31 deletions(-) delete mode 100644 cluster/charts/ealenn.yaml diff --git a/cluster/apps/default/echo-server/helm-release.yaml b/cluster/apps/default/echo-server/helm-release.yaml index 0ea274cf..99bfa2c0 100644 --- a/cluster/apps/default/echo-server/helm-release.yaml +++ b/cluster/apps/default/echo-server/helm-release.yaml @@ -2,31 +2,71 @@ apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: - name: echo-server + name: &app echo-server namespace: default spec: interval: 5m chart: spec: - chart: echo-server - version: 0.4.0 + chart: kah-common-chart + version: 1.1.2 sourceRef: kind: HelmRepository - name: ealenn-charts + name: k8s-at-home-charts namespace: flux-system interval: 5m install: createNamespace: true - remediation: - retries: 3 - upgrade: - remediation: - retries: 3 values: - replicaCount: 2 + global: + nameOverride: *app + controller: + replicas: 2 + strategy: RollingUpdate + image: + repository: docker.io/jmalloc/echo-server + tag: 0.3.1 + service: + main: + ports: + http: + port: &port 8080 + probes: + liveness: + enabled: true + custom: true + spec: + httpGet: + path: /health + port: *port + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 3 + readiness: + enabled: true + custom: true + spec: + httpGet: + path: /health + port: *port + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 3 + startup: + enabled: true + custom: true + spec: + httpGet: + path: /health + port: *port + failureThreshold: 30 + periodSeconds: 10 ingress: - enabled: true - ingressClassName: "traefik" + main: + enabled: true + ingressClassName: "traefik" annotations: cert-manager.io/cluster-issuer: "letsencrypt-staging" external-dns.alpha.kubernetes.io/target: "ipv4.${SECRET_DOMAIN}" @@ -35,14 +75,23 @@ spec: hajimari.io/icon: "video-input-antenna" traefik.ingress.kubernetes.io/router.entrypoints: "websecure" traefik.ingress.kubernetes.io/router.middlewares: "networking-cloudflare-only@kubernetescrd" - hosts: - - host: "echo-server.${SECRET_DOMAIN}" - paths: - - "/" - tls: - - secretName: echo-server-tls - hosts: - - "echo-server.${SECRET_DOMAIN}" + hosts: + - host: &host "{{ .Release.Name }}.${SECRET_DOMAIN}" + paths: + - path: / + pathType: Prefix + tls: + - hosts: + - *host + # # FIXME: Uncomment this block to ensure multiple + # # replicas of the pod are scheduled on different nodes + # topologySpreadConstraints: + # - maxSkew: 1 + # topologyKey: kubernetes.io/hostname + # whenUnsatisfiable: DoNotSchedule + # labelSelector: + # matchLabels: + # app.kubernetes.io/name: *app resources: requests: cpu: 50m diff --git a/cluster/charts/ealenn.yaml b/cluster/charts/ealenn.yaml deleted file mode 100644 index 4366063b..00000000 --- a/cluster/charts/ealenn.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -apiVersion: source.toolkit.fluxcd.io/v1beta2 -kind: HelmRepository -metadata: - name: ealenn-charts - namespace: flux-system -spec: - interval: 30m - url: https://ealenn.github.io/charts - timeout: 3m diff --git a/cluster/charts/kustomization.yaml b/cluster/charts/kustomization.yaml index 63bae34b..ec53e792 100644 --- a/cluster/charts/kustomization.yaml +++ b/cluster/charts/kustomization.yaml @@ -2,7 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - bitnami.yaml - - ealenn.yaml - emberstack.yaml - external-dns.yaml - hajimari.yaml