首次提交:初始化项目
This commit is contained in:
76
old/003-platform/001-traefik/traefik-deployment.yaml
Normal file
76
old/003-platform/001-traefik/traefik-deployment.yaml
Normal file
@@ -0,0 +1,76 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: traefik-ingress-controller
|
||||
namespace: kube-system
|
||||
---
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: traefik
|
||||
namespace: kube-system
|
||||
labels:
|
||||
app: traefik
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: traefik
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: traefik
|
||||
spec:
|
||||
serviceAccountName: traefik-ingress-controller
|
||||
containers:
|
||||
- name: traefik
|
||||
image: traefik:v2.10
|
||||
args:
|
||||
- --api.insecure=true
|
||||
- --accesslog
|
||||
- --entrypoints.web.Address=:80
|
||||
- --entrypoints.websecure.Address=:443
|
||||
- --providers.kubernetescrd
|
||||
- --providers.kubernetesingress
|
||||
- --providers.kubernetesingress.ingressclass=traefik
|
||||
- --entrypoints.websecure.http.tls=true
|
||||
- --certificatesresolvers.default.acme.tlschallenge
|
||||
- --certificatesresolvers.default.acme.email=admin@example.com
|
||||
- --certificatesresolvers.default.acme.storage=/data/acme.json
|
||||
ports:
|
||||
- name: web
|
||||
containerPort: 80
|
||||
- name: websecure
|
||||
containerPort: 443
|
||||
- name: admin
|
||||
containerPort: 8080
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: traefik
|
||||
namespace: kube-system
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
selector:
|
||||
app: traefik
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
name: web
|
||||
targetPort: 80
|
||||
- protocol: TCP
|
||||
port: 443
|
||||
name: websecure
|
||||
targetPort: 443
|
||||
- protocol: TCP
|
||||
port: 8080
|
||||
name: admin
|
||||
targetPort: 8080
|
||||
9
old/003-platform/001-traefik/traefik-ingressclass.yaml
Normal file
9
old/003-platform/001-traefik/traefik-ingressclass.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: IngressClass
|
||||
metadata:
|
||||
name: traefik
|
||||
annotations:
|
||||
ingressclass.kubernetes.io/is-default-class: "true"
|
||||
spec:
|
||||
controller: traefik.io/ingress-controller
|
||||
63
old/003-platform/001-traefik/traefik-rbac.yaml
Normal file
63
old/003-platform/001-traefik/traefik-rbac.yaml
Normal file
@@ -0,0 +1,63 @@
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: traefik-ingress-controller
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
- endpoints
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- extensions
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses
|
||||
- ingressclasses
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- extensions
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses/status
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- traefik.io
|
||||
- traefik.containo.us
|
||||
resources:
|
||||
- middlewares
|
||||
- middlewaretcps
|
||||
- ingressroutes
|
||||
- traefikservices
|
||||
- ingressroutetcps
|
||||
- ingressrouteudps
|
||||
- tlsoptions
|
||||
- tlsstores
|
||||
- serverstransports
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: traefik-ingress-controller
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: traefik-ingress-controller
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: traefik-ingress-controller
|
||||
namespace: kube-system
|
||||
19
old/003-platform/002-kuboard/kuboard-ingress.yaml
Normal file
19
old/003-platform/002-kuboard/kuboard-ingress.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: kuboard-v3
|
||||
namespace: kuboard
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik
|
||||
spec:
|
||||
rules:
|
||||
- host: kuboard.u6.net3w.com
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: kuboard-v3
|
||||
port:
|
||||
number: 80
|
||||
16
old/003-platform/002-kuboard/kuboard-service.yaml
Normal file
16
old/003-platform/002-kuboard/kuboard-service.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kuboard-v3
|
||||
namespace: kuboard
|
||||
labels:
|
||||
app: kuboard-v3
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 80
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: kuboard-v3
|
||||
303
old/003-platform/002-kuboard/kuboard-v3-original.yaml
Normal file
303
old/003-platform/002-kuboard/kuboard-v3-original.yaml
Normal file
@@ -0,0 +1,303 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: kuboard
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: kuboard-v3-config
|
||||
namespace: kuboard
|
||||
data:
|
||||
# 关于如下参数的解释,请参考文档 https://kuboard.cn/install/v3/install-built-in.html
|
||||
# [common]
|
||||
KUBOARD_SERVER_NODE_PORT: '30080'
|
||||
KUBOARD_AGENT_SERVER_UDP_PORT: '30081'
|
||||
KUBOARD_AGENT_SERVER_TCP_PORT: '30081'
|
||||
KUBOARD_SERVER_LOGRUS_LEVEL: info # error / debug / trace
|
||||
# KUBOARD_AGENT_KEY 是 Agent 与 Kuboard 通信时的密钥,请修改为一个任意的包含字母、数字的32位字符串,此密钥变更后,需要删除 Kuboard Agent 重新导入。
|
||||
KUBOARD_AGENT_KEY: 32b7d6572c6255211b4eec9009e4a816
|
||||
KUBOARD_AGENT_IMAG: eipwork/kuboard-agent
|
||||
KUBOARD_QUESTDB_IMAGE: questdb/questdb:6.0.5
|
||||
KUBOARD_DISABLE_AUDIT: 'false' # 如果要禁用 Kuboard 审计功能,将此参数的值设置为 'true',必须带引号。
|
||||
|
||||
# 关于如下参数的解释,请参考文档 https://kuboard.cn/install/v3/install-gitlab.html
|
||||
# [gitlab login]
|
||||
# KUBOARD_LOGIN_TYPE: "gitlab"
|
||||
# KUBOARD_ROOT_USER: "your-user-name-in-gitlab"
|
||||
# GITLAB_BASE_URL: "http://gitlab.mycompany.com"
|
||||
# GITLAB_APPLICATION_ID: "7c10882aa46810a0402d17c66103894ac5e43d6130b81c17f7f2d8ae182040b5"
|
||||
# GITLAB_CLIENT_SECRET: "77c149bd3a4b6870bffa1a1afaf37cba28a1817f4cf518699065f5a8fe958889"
|
||||
|
||||
# 关于如下参数的解释,请参考文档 https://kuboard.cn/install/v3/install-github.html
|
||||
# [github login]
|
||||
# KUBOARD_LOGIN_TYPE: "github"
|
||||
# KUBOARD_ROOT_USER: "your-user-name-in-github"
|
||||
# GITHUB_CLIENT_ID: "17577d45e4de7dad88e0"
|
||||
# GITHUB_CLIENT_SECRET: "ff738553a8c7e9ad39569c8d02c1d85ec19115a7"
|
||||
|
||||
# 关于如下参数的解释,请参考文档 https://kuboard.cn/install/v3/install-ldap.html
|
||||
# [ldap login]
|
||||
# KUBOARD_LOGIN_TYPE: "ldap"
|
||||
# KUBOARD_ROOT_USER: "your-user-name-in-ldap"
|
||||
# LDAP_HOST: "ldap-ip-address:389"
|
||||
# LDAP_BIND_DN: "cn=admin,dc=example,dc=org"
|
||||
# LDAP_BIND_PASSWORD: "admin"
|
||||
# LDAP_BASE_DN: "dc=example,dc=org"
|
||||
# LDAP_FILTER: "(objectClass=posixAccount)"
|
||||
# LDAP_ID_ATTRIBUTE: "uid"
|
||||
# LDAP_USER_NAME_ATTRIBUTE: "uid"
|
||||
# LDAP_EMAIL_ATTRIBUTE: "mail"
|
||||
# LDAP_DISPLAY_NAME_ATTRIBUTE: "cn"
|
||||
# LDAP_GROUP_SEARCH_BASE_DN: "dc=example,dc=org"
|
||||
# LDAP_GROUP_SEARCH_FILTER: "(objectClass=posixGroup)"
|
||||
# LDAP_USER_MACHER_USER_ATTRIBUTE: "gidNumber"
|
||||
# LDAP_USER_MACHER_GROUP_ATTRIBUTE: "gidNumber"
|
||||
# LDAP_GROUP_NAME_ATTRIBUTE: "cn"
|
||||
|
||||
---
|
||||
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'
|
||||
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'
|
||||
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
|
||||
59
old/003-platform/003-proxy/1go-proxy.yaml
Normal file
59
old/003-platform/003-proxy/1go-proxy.yaml
Normal file
@@ -0,0 +1,59 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: localhost-15001
|
||||
namespace: default
|
||||
spec:
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: 15001
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Endpoints
|
||||
metadata:
|
||||
name: localhost-15001
|
||||
namespace: default
|
||||
subsets:
|
||||
- addresses:
|
||||
- ip: 134.195.210.237
|
||||
ports:
|
||||
- port: 15001
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: 1go-proxy
|
||||
namespace: default
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
tls:
|
||||
- hosts:
|
||||
- 1go.u6.net3w.com
|
||||
- gl.u6.net3w.com
|
||||
secretName: 1go-proxy-tls
|
||||
rules:
|
||||
- host: 1go.u6.net3w.com
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: localhost-15001
|
||||
port:
|
||||
number: 80
|
||||
- host: gl.u6.net3w.com
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: localhost-15001
|
||||
port:
|
||||
number: 80
|
||||
Reference in New Issue
Block a user