Skip to content

Commit

Permalink
added k8s files
Browse files Browse the repository at this point in the history
  • Loading branch information
shabrul2451 committed Jun 15, 2022
1 parent b94f8dc commit fa9800b
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
*.ini
/out/
*.exe
.env
.env
/k8s/
11 changes: 11 additions & 0 deletions k8s/configMap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: klovercloud-ci-light-house-command-config
namespace: klovercloud
data:
RUN_MODE: "PRODUCTION"
SERVER_PORT: "8080"
MONGO_SERVER: "${mongo_server}"
MONGO_PORT: "${mongo_port}"
DATABASE: "MONGO"
48 changes: 48 additions & 0 deletions k8s/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: klovercloud-ci-light-house-command
namespace: klovercloud
spec:
replicas: 1
selector:
matchLabels:
app: klovercloud-ci-light-house-command
template:
metadata:
labels:
app: klovercloud-ci-light-house-command
spec:
terminationGracePeriodSeconds: 60
containers:
- name: app
imagePullPolicy: Always
image: quay.io/klovercloud/light-house-command:v0.0.2
resources:
limits:
cpu: 100m
memory: 256Mi
requests:
cpu: 100m
memory: 256Mi
envFrom:
- configMapRef:
name: klovercloud-ci-light-house-command-config
- secretRef:
name: klovercloud-mongo-secret
ports:
- containerPort: 8080
readinessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 10
periodSeconds: 10
failureThreshold: 3
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 10
periodSeconds: 10
failureThreshold: 3
14 changes: 14 additions & 0 deletions k8s/service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: klovercloud-ci-light-house-command
namespace: klovercloud
labels:
app: klovercloud-ci-light-house-command
spec:
ports:
- name: http-rest
port: 80
targetPort: 8080
selector:
app: klovercloud-ci-light-house-command

0 comments on commit fa9800b

Please sign in to comment.