forked from longtao.wu/droboticflow
115 lines
2.8 KiB
YAML
115 lines
2.8 KiB
YAML
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: diagnostic-gateway
|
|
namespace: droboticflow-fanyu
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: droboticflow-diagnostic-nodes
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: [nodes]
|
|
verbs: [list]
|
|
- apiGroups: [metrics.k8s.io]
|
|
resources: [nodes]
|
|
verbs: [list]
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: droboticflow-diagnostic-nodes
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: droboticflow-diagnostic-nodes
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: diagnostic-gateway
|
|
namespace: droboticflow-fanyu
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: Role
|
|
metadata:
|
|
name: diagnostic-gateway
|
|
namespace: droboticflow-fanyu
|
|
rules:
|
|
- apiGroups: ["", metrics.k8s.io]
|
|
resources: [pods]
|
|
verbs: [list]
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: RoleBinding
|
|
metadata:
|
|
name: diagnostic-gateway
|
|
namespace: droboticflow-fanyu
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: Role
|
|
name: diagnostic-gateway
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: diagnostic-gateway
|
|
namespace: droboticflow-fanyu
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: diagnostic-gateway
|
|
namespace: droboticflow-fanyu
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels: {app: diagnostic-gateway}
|
|
template:
|
|
metadata:
|
|
labels: {app: diagnostic-gateway}
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: droboticflow-registry
|
|
serviceAccountName: diagnostic-gateway
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 65532
|
|
runAsGroup: 65532
|
|
fsGroup: 65532
|
|
seccompProfile: {type: RuntimeDefault}
|
|
containers:
|
|
- name: gateway
|
|
image: diagnostic-gateway:REPLACE_WITH_VERIFIED_DIGEST
|
|
ports: [{containerPort: 8080}]
|
|
env:
|
|
- name: DIAGNOSTIC_KEYS_FILE
|
|
value: /keys/keys
|
|
resources:
|
|
requests: {cpu: 100m, memory: 128Mi}
|
|
limits: {cpu: 500m, memory: 256Mi}
|
|
securityContext:
|
|
readOnlyRootFilesystem: true
|
|
allowPrivilegeEscalation: false
|
|
capabilities: {drop: [ALL]}
|
|
volumeMounts:
|
|
- name: keys
|
|
mountPath: /keys
|
|
readOnly: true
|
|
readinessProbe:
|
|
httpGet: {path: /healthz, port: 8080}
|
|
livenessProbe:
|
|
httpGet: {path: /healthz, port: 8080}
|
|
volumes:
|
|
- name: keys
|
|
secret:
|
|
secretName: diagnostic-gateway-keys
|
|
defaultMode: 288
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: diagnostic-gateway
|
|
namespace: droboticflow-fanyu
|
|
spec:
|
|
type: ClusterIP
|
|
selector: {app: diagnostic-gateway}
|
|
ports: [{name: http, port: 8080, targetPort: 8080}]
|