mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-20 16:07:11 +08:00
199 lines
6.9 KiB
YAML
199 lines
6.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: ql3-run-management
|
|
namespace: qinglong3-system
|
|
labels:
|
|
app.kubernetes.io/name: ql3-run-management
|
|
app.kubernetes.io/component: run-management
|
|
app.kubernetes.io/part-of: qinglong3
|
|
spec:
|
|
replicas: 2
|
|
minReadySeconds: 10
|
|
revisionHistoryLimit: 3
|
|
progressDeadlineSeconds: 600
|
|
strategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
maxUnavailable: 0
|
|
maxSurge: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: ql3-run-management
|
|
app.kubernetes.io/component: run-management
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
qinglong.io/run-management-client-ca-sha256: sha256:0000000000000000000000000000000000000000000000000000000000000000
|
|
qinglong.io/run-management-client-crl-sha256: sha256:0000000000000000000000000000000000000000000000000000000000000000
|
|
labels:
|
|
app.kubernetes.io/name: ql3-run-management
|
|
app.kubernetes.io/component: run-management
|
|
app.kubernetes.io/part-of: qinglong3
|
|
spec:
|
|
serviceAccountName: ql3-run-management
|
|
automountServiceAccountToken: false
|
|
terminationGracePeriodSeconds: 30
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 10001
|
|
runAsGroup: 10001
|
|
fsGroup: 10001
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
affinity:
|
|
podAntiAffinity:
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
- topologyKey: kubernetes.io/hostname
|
|
labelSelector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: ql3-run-management
|
|
app.kubernetes.io/component: run-management
|
|
containers:
|
|
- name: management
|
|
image: qinglong3-cluster-admin:3.0.0-alpha.2
|
|
imagePullPolicy: IfNotPresent
|
|
command:
|
|
- node
|
|
- /opt/qinglong/node_modules/@qinglong/cluster-admin/dist/run-management/runManagementCli.js
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: true
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
env:
|
|
- name: QL3_PROFILE
|
|
value: cluster-admin
|
|
- name: QL3_RUN_MANAGEMENT_ENABLED
|
|
value: 'true'
|
|
- name: QL3_RUN_MANAGEMENT_HOST
|
|
value: 0.0.0.0
|
|
- name: QL3_RUN_MANAGEMENT_PORT
|
|
value: '8448'
|
|
- name: QL3_RUN_MANAGEMENT_TLS_CERT_FILE
|
|
value: /var/run/secrets/qinglong3/run-management-tls/tls.crt
|
|
- name: QL3_RUN_MANAGEMENT_TLS_KEY_FILE
|
|
value: /var/run/secrets/qinglong3/run-management-tls/tls.key
|
|
- name: QL3_RUN_MANAGEMENT_CLIENT_CA_FILE
|
|
value: /var/run/secrets/qinglong3/run-management-tls/ca.crt
|
|
- name: QL3_RUN_MANAGEMENT_CLIENT_CRL_FILE
|
|
value: /var/run/secrets/qinglong3/run-management-tls/client.crl
|
|
- name: QL3_RUN_MANAGEMENT_IDENTITY_KEYSET_FILE
|
|
value: /var/run/qinglong3/run-management-identity/keyset.json
|
|
- name: QL3_RUN_MANAGEMENT_MAX_BODY_BYTES
|
|
value: '32768'
|
|
- name: QL3_RUN_MANAGEMENT_MAX_CONNECTIONS
|
|
value: '32'
|
|
- name: QL3_RUN_MANAGEMENT_MAX_CONCURRENT_REQUESTS
|
|
value: '16'
|
|
- name: QL3_RUN_MANAGEMENT_REQUEST_TIMEOUT_MS
|
|
value: '10000'
|
|
- name: QL3_RUN_MANAGEMENT_DRAIN_TIMEOUT_MS
|
|
value: '5000'
|
|
- name: QL3_RUN_MANAGEMENT_RATE_WINDOW_MS
|
|
value: '60000'
|
|
- name: QL3_RUN_MANAGEMENT_PEER_REQUEST_LIMIT
|
|
value: '30'
|
|
- name: QL3_RUN_MANAGEMENT_GLOBAL_REQUEST_LIMIT
|
|
value: '300'
|
|
- name: QL3_RUN_MANAGEMENT_MAX_RATE_LIMIT_PEERS
|
|
value: '1024'
|
|
- name: QL3_POSTGRES_RUN_MANAGER_TLS_MODE
|
|
value: verify-full
|
|
- name: QL3_POSTGRES_RUN_MANAGER_TLS_CA_FILE
|
|
value: /var/run/secrets/qinglong3/postgres-run-manager/ca.crt
|
|
- name: QL3_POSTGRES_RUN_MANAGER_APPLICATION_NAME
|
|
value: qinglong3-run-manager
|
|
- name: QL3_POSTGRES_RUN_MANAGER_POOL_MAX
|
|
value: '2'
|
|
- name: QL3_POSTGRES_RUN_MANAGER_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: ql3-cluster-run-management-database
|
|
key: postgres-run-manager-url
|
|
- name: QL3_POSTGRES_RUN_MANAGER_TLS_SERVERNAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: ql3-cluster-run-management-database
|
|
key: postgres-tls-servername
|
|
ports:
|
|
- name: https
|
|
containerPort: 8448
|
|
protocol: TCP
|
|
startupProbe:
|
|
httpGet:
|
|
path: /livez
|
|
port: https
|
|
scheme: HTTPS
|
|
periodSeconds: 2
|
|
timeoutSeconds: 1
|
|
failureThreshold: 30
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /readyz
|
|
port: https
|
|
scheme: HTTPS
|
|
periodSeconds: 5
|
|
timeoutSeconds: 2
|
|
failureThreshold: 2
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /livez
|
|
port: https
|
|
scheme: HTTPS
|
|
periodSeconds: 10
|
|
timeoutSeconds: 2
|
|
failureThreshold: 3
|
|
resources:
|
|
requests:
|
|
cpu: 50m
|
|
memory: 96Mi
|
|
limits:
|
|
cpu: '1'
|
|
memory: 384Mi
|
|
volumeMounts:
|
|
- name: tmp
|
|
mountPath: /tmp
|
|
- name: management-tls
|
|
mountPath: /var/run/secrets/qinglong3/run-management-tls
|
|
readOnly: true
|
|
- name: management-identity
|
|
mountPath: /var/run/qinglong3/run-management-identity
|
|
readOnly: true
|
|
- name: postgres-run-manager-ca
|
|
mountPath: /var/run/secrets/qinglong3/postgres-run-manager
|
|
readOnly: true
|
|
volumes:
|
|
- name: tmp
|
|
emptyDir:
|
|
medium: Memory
|
|
sizeLimit: 16Mi
|
|
- name: management-tls
|
|
secret:
|
|
secretName: ql3-run-management-tls
|
|
defaultMode: 288
|
|
items:
|
|
- key: tls.crt
|
|
path: tls.crt
|
|
- key: tls.key
|
|
path: tls.key
|
|
- key: ca.crt
|
|
path: ca.crt
|
|
- key: client.crl
|
|
path: client.crl
|
|
- name: management-identity
|
|
secret:
|
|
secretName: ql3-run-management-identity
|
|
defaultMode: 292
|
|
items:
|
|
- key: keyset.json
|
|
path: keyset.json
|
|
- name: postgres-run-manager-ca
|
|
secret:
|
|
secretName: ql3-cluster-run-management-database
|
|
defaultMode: 292
|
|
items:
|
|
- key: postgres-ca.crt
|
|
path: ca.crt
|