This commit is contained in:
soukainna
2023-07-10 09:03:34 +02:00
parent a855a4fe6a
commit 1188cbd255
38 changed files with 914 additions and 0 deletions

16
fleets/config.yaml Normal file
View File

@@ -0,0 +1,16 @@
dev_env: true
storage:
db:
type: mongodb
mongodb:
uri:
db_name:
collections:
vehicles: fleet_vehicles
bookings: fleet_bookings
services:
grpc:
enable: true
port: 8080

41
fleets/deployment.yaml Normal file
View File

@@ -0,0 +1,41 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-coopgo-fleets
spec:
replicas: 1
template:
spec:
containers:
- name: fleets
image: docker.io/library/fleets-v3:local
env:
- name: STORAGE_DB_MONGODB_URI
valueFrom:
secretKeyRef:
name: db-secret
key: storage_db_mongodb_uri
- name: STORAGE_DB_MONGODB_DB_NAME
valueFrom:
secretKeyRef:
name: db-secret
key: storage_db_mongodb_db_name
ports:
- name: http
containerPort: 8080
protocol: TCP
volumeMounts:
- name: fleets-config-volume
mountPath: /config.yaml
subPath: config.yaml
imagePullSecrets:
- name: regcred
volumes:
- name: fleets-config-volume
configMap:
name: test-fleets-config
items:
- key: config.yaml
path: config.yaml

15
fleets/kustomization.yaml Normal file
View File

@@ -0,0 +1,15 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
commonLabels:
app.kubernetes.io/name: test-coopgo-fleets
app.kubernetes.io/instance: test-coopgo-fleets
configMapGenerator:
- name: test-fleets-config
files:
- config.yaml
resources:
- deployment.yaml
- service.yaml

8
fleets/service.yaml Normal file
View File

@@ -0,0 +1,8 @@
apiVersion: v1
kind: Service
metadata:
name: test-coopgo-fleets-svc
spec:
ports:
- port: 8080
protocol: TCP