From 8b539c8b2d4dffc8661b6933fbbc26a061c29e73 Mon Sep 17 00:00:00 2001 From: Bruce Schultz Date: Fri, 5 Apr 2024 13:10:47 +0200 Subject: [PATCH] refactor(helm): change k8s manifests to use hub-adapter --- k8s/helm/gateway/Chart.yaml | 4 ++-- .../gateway/templates/gateway-deployment.yaml | 10 +++++++--- k8s/helm/gateway/templates/gateway-ingress.yaml | 6 +++--- k8s/helm/gateway/templates/gateway-service.yaml | 6 +++--- k8s/manifests/gateway-deployment.yaml | 16 ++++++++-------- k8s/manifests/gateway-service.yaml | 10 +++++----- 6 files changed, 28 insertions(+), 24 deletions(-) diff --git a/k8s/helm/gateway/Chart.yaml b/k8s/helm/gateway/Chart.yaml index c53040b..f49020d 100644 --- a/k8s/helm/gateway/Chart.yaml +++ b/k8s/helm/gateway/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 -name: flame-gateway -description: A Helm chart for the FLAME API Gateway +name: flame-hub-adapter +description: A Helm chart for the FLAME Hub Adapter API Gateway # A chart can be either an 'application' or a 'library' chart. # diff --git a/k8s/helm/gateway/templates/gateway-deployment.yaml b/k8s/helm/gateway/templates/gateway-deployment.yaml index 65f4df6..ec5751b 100644 --- a/k8s/helm/gateway/templates/gateway-deployment.yaml +++ b/k8s/helm/gateway/templates/gateway-deployment.yaml @@ -1,18 +1,18 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ .Release.Name }}-gateway-deployment + name: {{ .Release.Name }}-hub-adapter-deployment spec: selector: matchLabels: - component: gateway-service + component: hub-adapter-service version: {{ .Chart.AppVersion }} deployment-id: {{ .Release.Name }} replicas: 1 template: metadata: labels: - component: gateway-service + component: hub-adapter-service version: {{ .Chart.AppVersion }} deployment-id: {{ .Release.Name }} spec: @@ -20,6 +20,10 @@ spec: - name: api-gateway image: ghcr.io/privateaim/node-hub-api-adapter:latest imagePullPolicy: IfNotPresent # Maybe "Always" during debug + readinessProbe: + httpGet: + path: /healthz + port: 5000 ports: - containerPort: 5000 name: http-result-srv diff --git a/k8s/helm/gateway/templates/gateway-ingress.yaml b/k8s/helm/gateway/templates/gateway-ingress.yaml index b53e956..0b545ce 100644 --- a/k8s/helm/gateway/templates/gateway-ingress.yaml +++ b/k8s/helm/gateway/templates/gateway-ingress.yaml @@ -1,9 +1,9 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: {{ .Release.Name }}-gateway-ingress + name: {{ .Release.Name }}-hub-adapter-ingress labels: - component: gateway-service + component: hub-adapter-service version: {{ .Chart.AppVersion }} deployment-id: {{ .Release.Name }} spec: @@ -15,6 +15,6 @@ spec: pathType: Prefix backend: service: - name: {{ .Release.Name }}-gateway-service + name: {{ .Release.Name }}-hub-adapter-service port: number: 5000 diff --git a/k8s/helm/gateway/templates/gateway-service.yaml b/k8s/helm/gateway/templates/gateway-service.yaml index bbc1199..b54cb04 100644 --- a/k8s/helm/gateway/templates/gateway-service.yaml +++ b/k8s/helm/gateway/templates/gateway-service.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Service metadata: - name: {{ .Release.Name }}-gateway-service + name: {{ .Release.Name }}-hub-adapter-service labels: - component: gateway-service + component: hub-adapter-service version: {{ .Chart.AppVersion }} deployment-id: {{ .Release.Name }} spec: @@ -11,6 +11,6 @@ spec: - name: api port: 5000 selector: - component: gateway-service + component: hub-adapter-service version: {{ .Chart.AppVersion }} deployment-id: {{ .Release.Name }} diff --git a/k8s/manifests/gateway-deployment.yaml b/k8s/manifests/gateway-deployment.yaml index 0703341..c0801ad 100644 --- a/k8s/manifests/gateway-deployment.yaml +++ b/k8s/manifests/gateway-deployment.yaml @@ -1,29 +1,29 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: hub-adaptor-gateway-deployment + name: hub-adapter-gateway-deployment spec: selector: matchLabels: - component: gateway-service + component: hub-adapter-service version: 0.1.0 - deployment-id: hub-adaptor + deployment-id: hub-adapter replicas: 1 template: metadata: labels: - component: gateway-service + component: hub-adapter-service version: 0.1.0 - deployment-id: hub-adaptor + deployment-id: hub-adapter spec: containers: - name: api-gateway image: ghcr.io/privateaim/node-hub-api-adapter:latest imagePullPolicy: IfNotPresent # Maybe "Always" during debug readinessProbe: - httpGet: - path: /healthz - port: 5000 + httpGet: + path: /healthz + port: 5000 ports: - containerPort: 5000 env: diff --git a/k8s/manifests/gateway-service.yaml b/k8s/manifests/gateway-service.yaml index f33ed7e..392cf26 100644 --- a/k8s/manifests/gateway-service.yaml +++ b/k8s/manifests/gateway-service.yaml @@ -1,16 +1,16 @@ apiVersion: v1 kind: Service metadata: - name: hub-adaptor-gateway-service + name: hub-adapter-gateway-service labels: - component: gateway-service + component: hub-adapter-service version: 0.1.0 - deployment-id: hub-adaptor + deployment-id: hub-adapter spec: ports: - name: api port: 5000 selector: - component: gateway-service + component: hub-adapter-service version: 0.1.0 - deployment-id: hub-adaptor + deployment-id: hub-adapter