From 7f84a4cdb3859a4ccd6c19be2f6272eab9daf5c2 Mon Sep 17 00:00:00 2001 From: Tracewebstudio Dev Date: Sun, 12 Apr 2026 22:04:00 +0200 Subject: [PATCH] feat(k8s): add jobs and leads services - Add jobs service (port 9103) deployment and service - Add leads service (port 9118) deployment and service - Update configmap with JOBS_SERVICE_URL and LEADS_SERVICE_URL - Update kustomization.yaml to include new resources --- .../nxtgauge-backend-rust/base/configmap.yaml | 2 + .../base/jobs-deployment.yaml | 55 +++++++++++++++++++ .../base/jobs-service.yaml | 16 ++++++ .../base/kustomization.yaml | 4 ++ .../base/leads-deployment.yaml | 55 +++++++++++++++++++ .../base/leads-service.yaml | 16 ++++++ 6 files changed, 148 insertions(+) create mode 100644 apps/nxtgauge-backend-rust/base/jobs-deployment.yaml create mode 100644 apps/nxtgauge-backend-rust/base/jobs-service.yaml create mode 100644 apps/nxtgauge-backend-rust/base/leads-deployment.yaml create mode 100644 apps/nxtgauge-backend-rust/base/leads-service.yaml diff --git a/apps/nxtgauge-backend-rust/base/configmap.yaml b/apps/nxtgauge-backend-rust/base/configmap.yaml index e84f0d8..4d34234 100644 --- a/apps/nxtgauge-backend-rust/base/configmap.yaml +++ b/apps/nxtgauge-backend-rust/base/configmap.yaml @@ -9,6 +9,8 @@ data: ADMIN_URL: "https://admin.nxtgauge.com" USERS_SERVICE_URL: "http://nxtgauge-rust-users:9101" COMPANIES_SERVICE_URL: "http://nxtgauge-rust-companies:9102" + JOBS_SERVICE_URL: "http://nxtgauge-rust-jobs:9103" + LEADS_SERVICE_URL: "http://nxtgauge-rust-leads:9118" JOB_SEEKERS_SERVICE_URL: "http://nxtgauge-rust-job-seekers:9104" CUSTOMERS_SERVICE_URL: "http://nxtgauge-rust-customers:9105" EMPLOYEES_SERVICE_URL: "http://nxtgauge-rust-employees:9106" diff --git a/apps/nxtgauge-backend-rust/base/jobs-deployment.yaml b/apps/nxtgauge-backend-rust/base/jobs-deployment.yaml new file mode 100644 index 0000000..3e0ed69 --- /dev/null +++ b/apps/nxtgauge-backend-rust/base/jobs-deployment.yaml @@ -0,0 +1,55 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nxtgauge-rust-jobs + namespace: nxtgauge + labels: + app: nxtgauge-rust-jobs +spec: + replicas: 1 + selector: + matchLabels: + app: nxtgauge-rust-jobs + template: + metadata: + labels: + app: nxtgauge-rust-jobs + spec: + containers: + - name: jobs + image: registry.nxtgauge.com:5000/nxtgauge-rust-jobs + imagePullPolicy: Always + ports: + - containerPort: 9103 + name: http + envFrom: + - configMapRef: + name: nxtgauge-backend-rust-config + - secretRef: + name: nxtgauge-backend-rust-secrets + env: + - name: PORT + value: "9103" + readinessProbe: + httpGet: + path: /health + port: 9103 + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 3 + failureThreshold: 3 + livenessProbe: + httpGet: + path: /health + port: 9103 + initialDelaySeconds: 20 + periodSeconds: 20 + timeoutSeconds: 3 + failureThreshold: 5 + resources: + requests: + cpu: 50m + memory: 64Mi + limits: + cpu: 500m + memory: 256Mi diff --git a/apps/nxtgauge-backend-rust/base/jobs-service.yaml b/apps/nxtgauge-backend-rust/base/jobs-service.yaml new file mode 100644 index 0000000..c187070 --- /dev/null +++ b/apps/nxtgauge-backend-rust/base/jobs-service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: nxtgauge-rust-jobs + namespace: nxtgauge + labels: + app: nxtgauge-rust-jobs +spec: + type: ClusterIP + selector: + app: nxtgauge-rust-jobs + ports: + - name: http + port: 9103 + targetPort: 9103 + protocol: TCP diff --git a/apps/nxtgauge-backend-rust/base/kustomization.yaml b/apps/nxtgauge-backend-rust/base/kustomization.yaml index 86853b0..64050a2 100644 --- a/apps/nxtgauge-backend-rust/base/kustomization.yaml +++ b/apps/nxtgauge-backend-rust/base/kustomization.yaml @@ -11,6 +11,10 @@ resources: - users-service.yaml - companies-deployment.yaml - companies-service.yaml + - jobs-deployment.yaml + - jobs-service.yaml + - leads-deployment.yaml + - leads-service.yaml - job-seekers-deployment.yaml - job-seekers-service.yaml - customers-deployment.yaml diff --git a/apps/nxtgauge-backend-rust/base/leads-deployment.yaml b/apps/nxtgauge-backend-rust/base/leads-deployment.yaml new file mode 100644 index 0000000..24e0882 --- /dev/null +++ b/apps/nxtgauge-backend-rust/base/leads-deployment.yaml @@ -0,0 +1,55 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nxtgauge-rust-leads + namespace: nxtgauge + labels: + app: nxtgauge-rust-leads +spec: + replicas: 1 + selector: + matchLabels: + app: nxtgauge-rust-leads + template: + metadata: + labels: + app: nxtgauge-rust-leads + spec: + containers: + - name: leads + image: registry.nxtgauge.com:5000/nxtgauge-rust-leads + imagePullPolicy: Always + ports: + - containerPort: 9118 + name: http + envFrom: + - configMapRef: + name: nxtgauge-backend-rust-config + - secretRef: + name: nxtgauge-backend-rust-secrets + env: + - name: PORT + value: "9118" + readinessProbe: + httpGet: + path: /health + port: 9118 + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 3 + failureThreshold: 3 + livenessProbe: + httpGet: + path: /health + port: 9118 + initialDelaySeconds: 20 + periodSeconds: 20 + timeoutSeconds: 3 + failureThreshold: 5 + resources: + requests: + cpu: 50m + memory: 64Mi + limits: + cpu: 500m + memory: 256Mi diff --git a/apps/nxtgauge-backend-rust/base/leads-service.yaml b/apps/nxtgauge-backend-rust/base/leads-service.yaml new file mode 100644 index 0000000..d17b202 --- /dev/null +++ b/apps/nxtgauge-backend-rust/base/leads-service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: nxtgauge-rust-leads + namespace: nxtgauge + labels: + app: nxtgauge-rust-leads +spec: + type: ClusterIP + selector: + app: nxtgauge-rust-leads + ports: + - name: http + port: 9118 + targetPort: 9118 + protocol: TCP