mirror of
https://github.com/wahyd4/home-docker.git
synced 2026-08-09 04:15:52 +10:00
add boks
This commit is contained in:
+84
@@ -673,3 +673,87 @@ spec:
|
||||
- backend:
|
||||
serviceName: sync
|
||||
servicePort: 80
|
||||
|
||||
---
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: books
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: books
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: books
|
||||
spec:
|
||||
volumes:
|
||||
- name: books
|
||||
hostPath:
|
||||
path: /mnt/books
|
||||
type: Directory
|
||||
containers:
|
||||
- name: books
|
||||
image: bixidock/h5ai
|
||||
securityContext:
|
||||
runAsUser: 1000
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: books-port
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- name: books
|
||||
mountPath: /var/www
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 300m
|
||||
memory: 400Mi
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: books
|
||||
labels:
|
||||
app: books
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: books-port
|
||||
protocol: TCP
|
||||
name: web
|
||||
selector:
|
||||
app: books
|
||||
|
||||
---
|
||||
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: books-ingress
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: "nginx"
|
||||
kubernetes.io/tls-acme: "true"
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
nginx.ingress.kubernetes.io/auth-url: "https://id.home.toozhao.com/oauth2/auth"
|
||||
nginx.ingress.kubernetes.io/auth-signin: "https://id.home.toozhao.com/oauth2/start?rd=https%3A%2F%2F$host$request_uri"
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- books.home.toozhao.com
|
||||
secretName: books-tls
|
||||
rules:
|
||||
- host: books.home.toozhao.com
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
serviceName: books
|
||||
servicePort: 80
|
||||
|
||||
Reference in New Issue
Block a user