changing to mount the folders
This commit is contained in:
+26
-18
@@ -2,6 +2,7 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: angels
|
||||
namespace: angels
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
@@ -12,28 +13,35 @@ spec:
|
||||
labels:
|
||||
app: angels
|
||||
spec:
|
||||
volumes:
|
||||
- name: html-content
|
||||
configMap:
|
||||
name: angels-index
|
||||
containers:
|
||||
# 1. The Downloader
|
||||
- name: git-sync
|
||||
image: registry.k8s.io/git-sync/git-sync:v4.1.0
|
||||
args:
|
||||
- --repo=http://192.168.2.65:3000/Darkages/Be-Not-Afraid.git
|
||||
- --branch=main
|
||||
- --rev=HEAD
|
||||
- --path=angels
|
||||
- --depth=1
|
||||
- --period=10s
|
||||
- --root=/mnt/git
|
||||
- --ssl-verify=false
|
||||
# Uncomment these if your Gitea repo is private:
|
||||
# - --username=admin
|
||||
# - --password=admin123
|
||||
volumeMounts:
|
||||
- name: html-content
|
||||
mountPath: /mnt/git
|
||||
|
||||
# 2. The Web Server
|
||||
- name: nginx
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- containerPort: 82
|
||||
volumeMounts:
|
||||
- name: html-content
|
||||
mountPath: /usr/share/nginx/html/index.html
|
||||
subPath: index.html
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: angels
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
selector:
|
||||
app: angels
|
||||
ports:
|
||||
- port: 82
|
||||
targetPort: 82
|
||||
mountPath: /usr/share/nginx/html
|
||||
subPath: angels # Maps /mnt/git/angels to /usr/share/nginx/html
|
||||
volumes:
|
||||
- name: html-content
|
||||
emptyDir: {}
|
||||
Reference in New Issue
Block a user