This commit is contained in:
12
deploy/k8s/configmap.yaml
Normal file
12
deploy/k8s/configmap.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: kubeviz-config
|
||||
namespace: kubeviz
|
||||
data:
|
||||
ADDR: ":8080"
|
||||
SESSION_TTL: "30m"
|
||||
MAX_UPLOAD_SIZE: "5242880"
|
||||
COOKIE_SECURE: "true"
|
||||
LOG_LEVEL: "info"
|
||||
GIT_ALLOWED_HOSTS: "github.com,gitlab.com,bitbucket.org"
|
||||
60
deploy/k8s/deployment.yaml
Normal file
60
deploy/k8s/deployment.yaml
Normal file
@@ -0,0 +1,60 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: kubeviz
|
||||
namespace: kubeviz
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: kubeviz
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: kubeviz
|
||||
spec:
|
||||
automountServiceAccountToken: false
|
||||
securityContext:
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: kubeviz
|
||||
image: kubeviz:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
capabilities:
|
||||
drop: ["ALL"]
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: kubeviz-config
|
||||
volumeMounts:
|
||||
- name: tmp
|
||||
mountPath: /tmp
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
initialDelaySeconds: 3
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 20
|
||||
volumes:
|
||||
- name: tmp
|
||||
emptyDir: {}
|
||||
24
deploy/k8s/ingress.yaml
Normal file
24
deploy/k8s/ingress.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: kubeviz
|
||||
namespace: kubeviz
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: "10m"
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- kubeviz.local
|
||||
secretName: kubeviz-tls
|
||||
rules:
|
||||
- host: kubeviz.local
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: kubeviz
|
||||
port:
|
||||
number: 80
|
||||
4
deploy/k8s/namespace.yaml
Normal file
4
deploy/k8s/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: kubeviz
|
||||
13
deploy/k8s/service.yaml
Normal file
13
deploy/k8s/service.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kubeviz
|
||||
namespace: kubeviz
|
||||
spec:
|
||||
selector:
|
||||
app: kubeviz
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
Reference in New Issue
Block a user