mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-20 08:05:22 +08:00
121 lines
4.2 KiB
YAML
121 lines
4.2 KiB
YAML
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: ql3-plugin-package-recovery
|
|
namespace: qinglong3-system
|
|
labels:
|
|
app.kubernetes.io/name: ql3-plugin-package-recovery
|
|
app.kubernetes.io/component: plugin-package-recovery
|
|
app.kubernetes.io/part-of: qinglong3
|
|
spec:
|
|
backoffLimit: 0
|
|
activeDeadlineSeconds: 600
|
|
ttlSecondsAfterFinished: 600
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: ql3-plugin-package-recovery
|
|
app.kubernetes.io/component: plugin-package-recovery
|
|
app.kubernetes.io/part-of: qinglong3
|
|
spec:
|
|
serviceAccountName: ql3-plugin-package-recovery
|
|
automountServiceAccountToken: true
|
|
restartPolicy: Never
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 10001
|
|
runAsGroup: 10001
|
|
fsGroup: 10001
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
containers:
|
|
- name: recovery
|
|
image: qinglong3-cluster-admin:3.0.0-alpha.2
|
|
imagePullPolicy: IfNotPresent
|
|
command:
|
|
- node
|
|
- /opt/qinglong/node_modules/@qinglong/cluster-admin/dist/plugin-package/recovery/pluginPackageRecoveryCli.js
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: true
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
env:
|
|
- name: QL3_CLUSTER_IDENTITY
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: ql3-plugin-package-recovery-config
|
|
key: cluster-identity
|
|
- name: QL3_KUBERNETES_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
apiVersion: v1
|
|
fieldPath: metadata.namespace
|
|
- name: QL3_PLUGIN_PACKAGE_OCI_REGISTRIES
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: ql3-plugin-package-recovery-config
|
|
key: oci-registries
|
|
- name: QL3_PLUGIN_PACKAGE_PUBLISHER_TRUST_FILE
|
|
value: /var/run/qinglong3/plugin-package-trust/publishers.json
|
|
- name: QL3_PLUGIN_PACKAGE_TRUST_AUTHORITY_ID
|
|
value: cluster
|
|
- name: QL3_PLUGIN_PACKAGE_OCI_TIMEOUT_MS
|
|
value: '15000'
|
|
- name: QL3_PLUGIN_PACKAGE_RECOVERY_PAGE_SIZE
|
|
value: '16'
|
|
- name: QL3_PLUGIN_PACKAGE_RECOVERY_MAX_PAGES
|
|
value: '16'
|
|
- name: QL3_POSTGRES_TLS_MODE
|
|
value: verify-full
|
|
- name: QL3_POSTGRES_TLS_CA_FILE
|
|
value: /var/run/secrets/qinglong3/postgres-package-executor/ca.crt
|
|
- name: QL3_POSTGRES_APPLICATION_NAME
|
|
value: qinglong3-plugin-package-recovery
|
|
- name: QL3_POSTGRES_PACKAGE_EXECUTOR_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: ql3-cluster-plugin-package-recovery
|
|
key: postgres-package-executor-url
|
|
- name: QL3_POSTGRES_TLS_SERVERNAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: ql3-cluster-plugin-package-recovery
|
|
key: postgres-tls-servername
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: '1'
|
|
memory: 512Mi
|
|
volumeMounts:
|
|
- name: tmp
|
|
mountPath: /tmp
|
|
- name: plugin-package-trust
|
|
mountPath: /var/run/qinglong3/plugin-package-trust
|
|
readOnly: true
|
|
- name: postgres-package-executor-ca
|
|
mountPath: /var/run/secrets/qinglong3/postgres-package-executor
|
|
readOnly: true
|
|
volumes:
|
|
- name: tmp
|
|
emptyDir:
|
|
medium: Memory
|
|
sizeLimit: 16Mi
|
|
- name: plugin-package-trust
|
|
configMap:
|
|
name: ql3-plugin-publisher-trust
|
|
defaultMode: 292
|
|
items:
|
|
- key: publishers.json
|
|
path: publishers.json
|
|
- name: postgres-package-executor-ca
|
|
secret:
|
|
secretName: ql3-cluster-plugin-package-recovery
|
|
defaultMode: 292
|
|
items:
|
|
- key: postgres-ca.crt
|
|
path: ca.crt
|