Add depot, attendant, jetfire, optimus, ota services with kustomize overlays

This commit is contained in:
Chris Rai
2026-01-31 15:35:07 -05:00
parent a0ec642ca1
commit 9a5cb2f547
404 changed files with 38817 additions and 16 deletions

View File

@@ -7,6 +7,11 @@ resources:
- ../../base
- secrets.yaml
- services/gateway/
- services/depot/
- services/attendant/
- services/jetfire/
- services/optimus/
- services/ota/
labels:
- pairs:

View File

@@ -0,0 +1,51 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: attendant
namespace: cloud-services
labels:
app: attendant
annotations:
reloader.stakater.com/auto: "true"
spec:
replicas: 1
selector:
matchLabels:
app: attendant
template:
metadata:
labels:
app: attendant
spec:
containers:
- name: attendant
image: localhost:32000/attendant:v1
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8077
name: http
- containerPort: 11011
name: health
envFrom:
- configMapRef:
name: cloud-common-config
- secretRef:
name: cloud-db-credentials
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
memory: 512Mi
livenessProbe:
httpGet:
path: /liveness
port: 11011
initialDelaySeconds: 10
periodSeconds: 30
readinessProbe:
httpGet:
path: /readiness
port: 11011
initialDelaySeconds: 5
periodSeconds: 10

View File

@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: cloud-services
resources:
- deployment.yaml

View File

@@ -0,0 +1,51 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: depot
namespace: cloud-services
labels:
app: depot
annotations:
reloader.stakater.com/auto: "true"
spec:
replicas: 1
selector:
matchLabels:
app: depot
template:
metadata:
labels:
app: depot
spec:
containers:
- name: depot
image: localhost:32000/depot:v1
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8077
name: http
- containerPort: 11011
name: health
envFrom:
- configMapRef:
name: cloud-common-config
- secretRef:
name: cloud-db-credentials
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
memory: 512Mi
livenessProbe:
httpGet:
path: /liveness
port: 11011
initialDelaySeconds: 10
periodSeconds: 30
readinessProbe:
httpGet:
path: /readiness
port: 11011
initialDelaySeconds: 5
periodSeconds: 10

View File

@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: cloud-services
resources:
- deployment.yaml

View File

@@ -0,0 +1,62 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: jetfire
namespace: cloud-services
labels:
app: jetfire
annotations:
reloader.stakater.com/auto: "true"
spec:
replicas: 1
selector:
matchLabels:
app: jetfire
template:
metadata:
labels:
app: jetfire
spec:
containers:
- name: jetfire
image: localhost:32000/jetfire:v1
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8077
name: http
- containerPort: 11011
name: health
env:
- name: CLICKHOUSE_HOST
value: clickhouse.clickhouse.svc.cluster.local
- name: CLICKHOUSE_PORT
value: "9000"
- name: CLICKHOUSE_USER
value: default
- name: CLICKHOUSE_FEATURE_TABLE
value: feature_table
- name: CLICKHOUSE_VEHICLE_SIGNAL_TABLE
value: vehicle_signal
envFrom:
- configMapRef:
name: cloud-common-config
- secretRef:
name: cloud-db-credentials
resources:
requests:
cpu: 250m
memory: 512Mi
limits:
memory: 2Gi
livenessProbe:
httpGet:
path: /liveness
port: 11011
initialDelaySeconds: 10
periodSeconds: 30
readinessProbe:
httpGet:
path: /readiness
port: 11011
initialDelaySeconds: 5
periodSeconds: 10

View File

@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: cloud-services
resources:
- deployment.yaml

View File

@@ -0,0 +1,58 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: optimus
namespace: cloud-services
labels:
app: optimus
annotations:
reloader.stakater.com/auto: "true"
spec:
replicas: 1
selector:
matchLabels:
app: optimus
template:
metadata:
labels:
app: optimus
spec:
containers:
- name: optimus
image: localhost:32000/optimus:v1
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8077
name: http
- containerPort: 11011
name: health
env:
- name: CLICKHOUSE_HOST
value: clickhouse.clickhouse.svc.cluster.local
- name: CLICKHOUSE_PORT
value: "9000"
- name: CLICKHOUSE_USER
value: default
envFrom:
- configMapRef:
name: cloud-common-config
- secretRef:
name: cloud-db-credentials
resources:
requests:
cpu: 250m
memory: 512Mi
limits:
memory: 2Gi
livenessProbe:
httpGet:
path: /liveness
port: 11011
initialDelaySeconds: 10
periodSeconds: 30
readinessProbe:
httpGet:
path: /readiness
port: 11011
initialDelaySeconds: 5
periodSeconds: 10

View File

@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: cloud-services
resources:
- deployment.yaml

View File

@@ -0,0 +1,67 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ota
namespace: cloud-services
labels:
app: ota
annotations:
reloader.stakater.com/auto: "true"
spec:
replicas: 1
selector:
matchLabels:
app: ota
template:
metadata:
labels:
app: ota
spec:
containers:
- name: ota
image: localhost:32000/ota_update_go:v1
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8077
name: http
- containerPort: 11011
name: health
env:
- name: SERVICE_BASE_URL
value: /ota_update
envFrom:
- configMapRef:
name: cloud-common-config
- secretRef:
name: cloud-db-credentials
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
memory: 512Mi
livenessProbe:
httpGet:
path: /liveness
port: 11011
initialDelaySeconds: 10
periodSeconds: 30
readinessProbe:
httpGet:
path: /readiness
port: 11011
initialDelaySeconds: 5
periodSeconds: 10
---
apiVersion: v1
kind: Service
metadata:
name: ota
namespace: cloud-services
spec:
selector:
app: ota
ports:
- port: 8077
targetPort: 8077
name: http

View File

@@ -0,0 +1,25 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ota
namespace: cloud-services
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
traefik.ingress.kubernetes.io/router.entrypoints: websecure
spec:
ingressClassName: traefik
tls:
- hosts:
- gw.mini.cloud.fiskerinc.com
secretName: cloud-services-tls
rules:
- host: gw.mini.cloud.fiskerinc.com
http:
paths:
- path: /ota_update
pathType: Prefix
backend:
service:
name: ota
port:
number: 8077

View File

@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: cloud-services
resources:
- deployment.yaml
- ingress.yaml