Skip to content

Commit

Permalink
feat: add deploy
Browse files Browse the repository at this point in the history
Signed-off-by: thxCode <thxcode0824@gmail.com>
  • Loading branch information
thxCode committed Dec 27, 2023
1 parent 02a6905 commit 93160bb
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 0 deletions.
19 changes: 19 additions & 0 deletions deploy/manifests/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: '3.6'

services:
hermitcrab:
image: "sealio/hermitcrab:main"
restart: always
container_name: hermitcrab
command:
- "hermitcrab"
- "--log-debug"
- "--log-verbosity=4"
volumes:
- hermitcrab-data:/var/run/hermitcrab
ports:
- "80:80"
- "443:443"

volumes:
hermitcrab-data: { }
107 changes: 107 additions & 0 deletions deploy/manifests/kubernetes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
namespace: default
name: hermitcrab
labels:
"app.kubernetes.io/part-of": "hermitcrab"
"app.kubernetes.io/component": "hermitcrab-server"
spec:
# When a PVC does not specify a storageClassName,
# the default StorageClass is used.
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 500Mi
---
apiVersion: v1
kind: Service
metadata:
namespace: default
name: hermitcrab
spec:
selector:
"app.kubernetes.io/part-of": "hermitcrab"
"app.kubernetes.io/component": "hermitcrab-server"
ports:
- name: http
port: 80
targetPort: http
- name: https
port: 443
targetPort: https
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: walrus-system
name: terraform-provider-mirror
labels:
"app.kubernetes.io/part-of": "hermitcrab"
"app.kubernetes.io/component": "hermitcrab-server"
"app.kubernetes.io/name": "hermitcrab"
spec:
replicas: 1
selector:
matchLabels:
"app.kubernetes.io/part-of": "hermitcrab"
"app.kubernetes.io/component": "hermitcrab-server"
"app.kubernetes.io/name": "hermitcrab"
template:
metadata:
labels:
"app.kubernetes.io/part-of": "hermitcrab"
"app.kubernetes.io/component": "hermitcrab-server"
"app.kubernetes.io/name": "hermitcrab"
spec:
automountServiceAccountToken: false
restartPolicy: Always
containers:
- name: hermitcrab
image: sealio/hermitcrab:main
imagePullPolicy: Always
resources:
limits:
cpu: '2'
memory: '4Gi'
requests:
cpu: '500m'
memory: '512Mi'
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
startupProbe:
failureThreshold: 10
periodSeconds: 5
httpGet:
port: 80
path: /readyz
readinessProbe:
failureThreshold: 3
timeoutSeconds: 5
periodSeconds: 5
httpGet:
port: 80
path: /readyz
livenessProbe:
failureThreshold: 10
timeoutSeconds: 5
periodSeconds: 10
httpGet:
# Redirect the liveness probe request.
httpHeaders:
- name: "User-Agent"
value: ""
port: 80
path: /livez
volumeMounts:
- name: data
mountPath: /var/run/hermitcrab
volumes:
- name: data
persistentVolumeClaim:
claimName: hermitcrab

0 comments on commit 93160bb

Please sign in to comment.