269 lines
6.8 KiB
YAML
269 lines
6.8 KiB
YAML
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Namespace
|
||
|
metadata:
|
||
|
name: kuboard
|
||
|
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: ConfigMap
|
||
|
metadata:
|
||
|
name: kuboard-v3-config
|
||
|
namespace: kuboard
|
||
|
data:
|
||
|
KUBOARD_SERVER_NODE_PORT: '30080'
|
||
|
KUBOARD_AGENT_SERVER_UDP_PORT: '30081'
|
||
|
KUBOARD_AGENT_SERVER_TCP_PORT: '30081'
|
||
|
KUBOARD_SERVER_LOGRUS_LEVEL: info
|
||
|
KUBOARD_AGENT_KEY: 32b7d6572c6255211b4eec9009e4a816
|
||
|
KUBOARD_AGENT_IMAG: 10.9.12.201/kuboard/kuboard-agent:v3
|
||
|
KUBOARD_QUESTDB_IMAGE: questdb/questdb:6.0.5
|
||
|
KUBOARD_DISABLE_AUDIT: 'false'
|
||
|
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: ServiceAccount
|
||
|
metadata:
|
||
|
name: kuboard-boostrap
|
||
|
namespace: kuboard
|
||
|
|
||
|
---
|
||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||
|
kind: ClusterRoleBinding
|
||
|
metadata:
|
||
|
name: kuboard-boostrap-crb
|
||
|
roleRef:
|
||
|
apiGroup: rbac.authorization.k8s.io
|
||
|
kind: ClusterRole
|
||
|
name: cluster-admin
|
||
|
subjects:
|
||
|
- kind: ServiceAccount
|
||
|
name: kuboard-boostrap
|
||
|
namespace: kuboard
|
||
|
|
||
|
---
|
||
|
apiVersion: apps/v1
|
||
|
kind: DaemonSet
|
||
|
metadata:
|
||
|
labels:
|
||
|
k8s.kuboard.cn/name: kuboard-etcd
|
||
|
name: kuboard-etcd
|
||
|
namespace: kuboard
|
||
|
spec:
|
||
|
revisionHistoryLimit: 10
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
k8s.kuboard.cn/name: kuboard-etcd
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
k8s.kuboard.cn/name: kuboard-etcd
|
||
|
spec:
|
||
|
affinity:
|
||
|
nodeAffinity:
|
||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||
|
nodeSelectorTerms:
|
||
|
- matchExpressions:
|
||
|
- key: node-role.kubernetes.io/master
|
||
|
operator: Exists
|
||
|
- matchExpressions:
|
||
|
- key: node-role.kubernetes.io/control-plane
|
||
|
operator: Exists
|
||
|
- matchExpressions:
|
||
|
- key: k8s.kuboard.cn/role
|
||
|
operator: In
|
||
|
values:
|
||
|
- etcd
|
||
|
containers:
|
||
|
- env:
|
||
|
- name: HOSTNAME
|
||
|
valueFrom:
|
||
|
fieldRef:
|
||
|
apiVersion: v1
|
||
|
fieldPath: spec.nodeName
|
||
|
- name: HOSTIP
|
||
|
valueFrom:
|
||
|
fieldRef:
|
||
|
apiVersion: v1
|
||
|
fieldPath: status.hostIP
|
||
|
#image: 'eipwork/etcd-host:3.4.16-2'
|
||
|
image: '10.9.12.201/kuboard/etcd-host:3.4.16-2'
|
||
|
imagePullPolicy: Always
|
||
|
name: etcd
|
||
|
ports:
|
||
|
- containerPort: 2381
|
||
|
hostPort: 2381
|
||
|
name: server
|
||
|
protocol: TCP
|
||
|
- containerPort: 2382
|
||
|
hostPort: 2382
|
||
|
name: peer
|
||
|
protocol: TCP
|
||
|
livenessProbe:
|
||
|
failureThreshold: 3
|
||
|
httpGet:
|
||
|
path: /health
|
||
|
port: 2381
|
||
|
scheme: HTTP
|
||
|
initialDelaySeconds: 30
|
||
|
periodSeconds: 10
|
||
|
successThreshold: 1
|
||
|
timeoutSeconds: 1
|
||
|
volumeMounts:
|
||
|
- mountPath: /data
|
||
|
name: data
|
||
|
dnsPolicy: ClusterFirst
|
||
|
hostNetwork: true
|
||
|
restartPolicy: Always
|
||
|
serviceAccount: kuboard-boostrap
|
||
|
serviceAccountName: kuboard-boostrap
|
||
|
tolerations:
|
||
|
- key: node-role.kubernetes.io/master
|
||
|
operator: Exists
|
||
|
- key: node-role.kubernetes.io/control-plane
|
||
|
operator: Exists
|
||
|
volumes:
|
||
|
- hostPath:
|
||
|
path: /usr/share/kuboard/etcd
|
||
|
name: data
|
||
|
updateStrategy:
|
||
|
rollingUpdate:
|
||
|
maxUnavailable: 1
|
||
|
type: RollingUpdate
|
||
|
|
||
|
|
||
|
---
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
annotations: {}
|
||
|
labels:
|
||
|
k8s.kuboard.cn/name: kuboard-v3
|
||
|
name: kuboard-v3
|
||
|
namespace: kuboard
|
||
|
spec:
|
||
|
replicas: 1
|
||
|
revisionHistoryLimit: 10
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
k8s.kuboard.cn/name: kuboard-v3
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
k8s.kuboard.cn/name: kuboard-v3
|
||
|
spec:
|
||
|
affinity:
|
||
|
nodeAffinity:
|
||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||
|
- preference:
|
||
|
matchExpressions:
|
||
|
- key: node-role.kubernetes.io/master
|
||
|
operator: Exists
|
||
|
weight: 100
|
||
|
- preference:
|
||
|
matchExpressions:
|
||
|
- key: node-role.kubernetes.io/control-plane
|
||
|
operator: Exists
|
||
|
weight: 100
|
||
|
containers:
|
||
|
- env:
|
||
|
- name: HOSTIP
|
||
|
valueFrom:
|
||
|
fieldRef:
|
||
|
apiVersion: v1
|
||
|
fieldPath: status.hostIP
|
||
|
- name: HOSTNAME
|
||
|
valueFrom:
|
||
|
fieldRef:
|
||
|
apiVersion: v1
|
||
|
fieldPath: spec.nodeName
|
||
|
envFrom:
|
||
|
- configMapRef:
|
||
|
name: kuboard-v3-config
|
||
|
#image: 'eipwork/kuboard:v3'
|
||
|
image: '10.9.12.201/kuboard/kuboard:v3'
|
||
|
imagePullPolicy: Always
|
||
|
livenessProbe:
|
||
|
failureThreshold: 3
|
||
|
httpGet:
|
||
|
path: /kuboard-resources/version.json
|
||
|
port: 80
|
||
|
scheme: HTTP
|
||
|
initialDelaySeconds: 30
|
||
|
periodSeconds: 10
|
||
|
successThreshold: 1
|
||
|
timeoutSeconds: 1
|
||
|
name: kuboard
|
||
|
ports:
|
||
|
- containerPort: 80
|
||
|
name: web
|
||
|
protocol: TCP
|
||
|
- containerPort: 443
|
||
|
name: https
|
||
|
protocol: TCP
|
||
|
- containerPort: 10081
|
||
|
name: peer
|
||
|
protocol: TCP
|
||
|
- containerPort: 10081
|
||
|
name: peer-u
|
||
|
protocol: UDP
|
||
|
readinessProbe:
|
||
|
failureThreshold: 3
|
||
|
httpGet:
|
||
|
path: /kuboard-resources/version.json
|
||
|
port: 80
|
||
|
scheme: HTTP
|
||
|
initialDelaySeconds: 30
|
||
|
periodSeconds: 10
|
||
|
successThreshold: 1
|
||
|
timeoutSeconds: 1
|
||
|
resources: {}
|
||
|
# startupProbe:
|
||
|
# failureThreshold: 20
|
||
|
# httpGet:
|
||
|
# path: /kuboard-resources/version.json
|
||
|
# port: 80
|
||
|
# scheme: HTTP
|
||
|
# initialDelaySeconds: 5
|
||
|
# periodSeconds: 10
|
||
|
# successThreshold: 1
|
||
|
# timeoutSeconds: 1
|
||
|
dnsPolicy: ClusterFirst
|
||
|
restartPolicy: Always
|
||
|
serviceAccount: kuboard-boostrap
|
||
|
serviceAccountName: kuboard-boostrap
|
||
|
tolerations:
|
||
|
- key: node-role.kubernetes.io/master
|
||
|
operator: Exists
|
||
|
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
annotations: {}
|
||
|
labels:
|
||
|
k8s.kuboard.cn/name: kuboard-v3
|
||
|
name: kuboard-v3
|
||
|
namespace: kuboard
|
||
|
spec:
|
||
|
ports:
|
||
|
- name: web
|
||
|
nodePort: 30080
|
||
|
port: 80
|
||
|
protocol: TCP
|
||
|
targetPort: 80
|
||
|
- name: tcp
|
||
|
nodePort: 30081
|
||
|
port: 10081
|
||
|
protocol: TCP
|
||
|
targetPort: 10081
|
||
|
- name: udp
|
||
|
nodePort: 30081
|
||
|
port: 10081
|
||
|
protocol: UDP
|
||
|
targetPort: 10081
|
||
|
selector:
|
||
|
k8s.kuboard.cn/name: kuboard-v3
|
||
|
sessionAffinity: None
|
||
|
type: NodePort
|