Add Dockerfile, K8s manifests, and ArgoCD app for OpenShift deployment
This commit is contained in:
21
manifests/buildconfig.yaml
Normal file
21
manifests/buildconfig.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
apiVersion: build.openshift.io/v1
|
||||
kind: BuildConfig
|
||||
metadata:
|
||||
name: clawrizon
|
||||
namespace: clawrizon
|
||||
spec:
|
||||
source:
|
||||
type: Git
|
||||
git:
|
||||
uri: https://gitea.apilab.us/cscott/priority-horizon
|
||||
ref: main
|
||||
strategy:
|
||||
type: Docker
|
||||
dockerStrategy:
|
||||
dockerfilePath: Dockerfile
|
||||
output:
|
||||
to:
|
||||
kind: ImageStreamTag
|
||||
name: clawrizon:latest
|
||||
triggers:
|
||||
- type: ConfigChange
|
||||
47
manifests/deployment.yaml
Normal file
47
manifests/deployment.yaml
Normal file
@@ -0,0 +1,47 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: clawrizon
|
||||
namespace: clawrizon
|
||||
labels:
|
||||
app: clawrizon
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: clawrizon
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: clawrizon
|
||||
spec:
|
||||
containers:
|
||||
- name: clawrizon
|
||||
image: image-registry.openshift-image-registry.svc:5000/clawrizon/clawrizon:latest
|
||||
ports:
|
||||
- containerPort: 3333
|
||||
env:
|
||||
- name: DATA_DIR
|
||||
value: /app/data
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 256Mi
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /app/data
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
runAsNonRoot: true
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: clawrizon-data
|
||||
5
manifests/imagestream.yaml
Normal file
5
manifests/imagestream.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
apiVersion: image.openshift.io/v1
|
||||
kind: ImageStream
|
||||
metadata:
|
||||
name: clawrizon
|
||||
namespace: clawrizon
|
||||
4
manifests/namespace.yaml
Normal file
4
manifests/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: clawrizon
|
||||
12
manifests/pvc.yaml
Normal file
12
manifests/pvc.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: clawrizon-data
|
||||
namespace: clawrizon
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: local-nvme-retain
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
16
manifests/route.yaml
Normal file
16
manifests/route.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
apiVersion: route.openshift.io/v1
|
||||
kind: Route
|
||||
metadata:
|
||||
name: clawrizon
|
||||
namespace: clawrizon
|
||||
spec:
|
||||
host: clawrizon.apps.lab.apilab.us
|
||||
to:
|
||||
kind: Service
|
||||
name: clawrizon
|
||||
weight: 100
|
||||
port:
|
||||
targetPort: 3333
|
||||
tls:
|
||||
termination: edge
|
||||
insecureEdgeTerminationPolicy: Redirect
|
||||
12
manifests/service.yaml
Normal file
12
manifests/service.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: clawrizon
|
||||
namespace: clawrizon
|
||||
spec:
|
||||
selector:
|
||||
app: clawrizon
|
||||
ports:
|
||||
- port: 3333
|
||||
targetPort: 3333
|
||||
protocol: TCP
|
||||
Reference in New Issue
Block a user