Skip to content

Commit

Permalink
added dockerfile and added k8s config files
Browse files Browse the repository at this point in the history
  • Loading branch information
cywf committed Aug 22, 2023
1 parent fd57a6f commit e91c928
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 0 deletions.
File renamed without changes.
17 changes: 17 additions & 0 deletions infra/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Use a base image with the required runtime for FortiPath
FROM ubuntu:20.04

# Set working directory
WORKDIR /app

# Copy the FortiPath application to the container
COPY . /app

# Install any necessary dependencies
# TODO: Add installation commands for FortiPath dependencies

# Expose the port FortiPath runs on
EXPOSE 8080

# Command to run the application
CMD ["./fortipath"]
7 changes: 7 additions & 0 deletions infra/k8s/fortipath-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: fortipath-config
data:
# TODO: Add configuration key-value pairs for FortiPath
config-key: config-value
19 changes: 19 additions & 0 deletions infra/k8s/fortipath-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: fortipath-deployment
spec:
replicas: 2
selector:
matchLabels:
app: fortipath
template:
metadata:
labels:
app: fortipath
spec:
containers:
- name: fortipath-container
image: fortipath:latest
ports:
- containerPort: 8080
25 changes: 25 additions & 0 deletions infra/k8s/fortipath-pv-pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: fortipath-pv
spec:
storageClassName: manual
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/data"

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: fortipath-pvc
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
12 changes: 12 additions & 0 deletions infra/k8s/fortipath-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: fortipath-service
spec:
selector:
app: fortipath
ports:
- protocol: TCP
port: 80
targetPort: 8080
type: LoadBalancer

0 comments on commit e91c928

Please sign in to comment.