|
| 1 | +--- |
| 2 | +# Standalone deployment of the blockstor controller alongside the |
| 3 | +# existing Java LINSTOR. Used by stand smoke tests as the live target |
| 4 | +# for our own REST surface; lets us prove our CRDs reconcile and our |
| 5 | +# REST server answers without ripping out the Java oracle. |
| 6 | +apiVersion: v1 |
| 7 | +kind: Namespace |
| 8 | +metadata: |
| 9 | + name: blockstor-system |
| 10 | +--- |
| 11 | +apiVersion: v1 |
| 12 | +kind: ServiceAccount |
| 13 | +metadata: |
| 14 | + name: blockstor-controller |
| 15 | + namespace: blockstor-system |
| 16 | +--- |
| 17 | +# Cluster-wide read on core API + full RW on our blockstor.io CRDs. |
| 18 | +# We don't watch any non-blockstor objects, so the verb set stays narrow. |
| 19 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 20 | +kind: ClusterRole |
| 21 | +metadata: |
| 22 | + name: blockstor-controller |
| 23 | +rules: |
| 24 | + - apiGroups: [""] |
| 25 | + resources: [events] |
| 26 | + verbs: [create, patch] |
| 27 | + - apiGroups: [coordination.k8s.io] |
| 28 | + resources: [leases] |
| 29 | + verbs: [get, list, watch, create, update, patch, delete] |
| 30 | + - apiGroups: [blockstor.io.blockstor.io] |
| 31 | + resources: ["*"] |
| 32 | + verbs: [get, list, watch, create, update, patch, delete] |
| 33 | + - apiGroups: [blockstor.io.blockstor.io] |
| 34 | + resources: ["*/status", "*/finalizers"] |
| 35 | + verbs: [get, update, patch] |
| 36 | +--- |
| 37 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 38 | +kind: ClusterRoleBinding |
| 39 | +metadata: |
| 40 | + name: blockstor-controller |
| 41 | +roleRef: |
| 42 | + apiGroup: rbac.authorization.k8s.io |
| 43 | + kind: ClusterRole |
| 44 | + name: blockstor-controller |
| 45 | +subjects: |
| 46 | + - kind: ServiceAccount |
| 47 | + name: blockstor-controller |
| 48 | + namespace: blockstor-system |
| 49 | +--- |
| 50 | +apiVersion: apps/v1 |
| 51 | +kind: Deployment |
| 52 | +metadata: |
| 53 | + name: blockstor-controller |
| 54 | + namespace: blockstor-system |
| 55 | + labels: {app: blockstor-controller} |
| 56 | +spec: |
| 57 | + replicas: 1 |
| 58 | + selector: {matchLabels: {app: blockstor-controller}} |
| 59 | + template: |
| 60 | + metadata: {labels: {app: blockstor-controller}} |
| 61 | + spec: |
| 62 | + serviceAccountName: blockstor-controller |
| 63 | + containers: |
| 64 | + - name: manager |
| 65 | + image: 10.164.0.1:5000/blockstor:dev |
| 66 | + imagePullPolicy: Always |
| 67 | + args: |
| 68 | + - --rest-bind-address=:3370 |
| 69 | + - --satellite-grpc-bind-address=:7000 |
| 70 | + - --health-probe-bind-address=:8081 |
| 71 | + - --metrics-bind-address=0 |
| 72 | + - --leader-elect=false |
| 73 | + - --store=k8s |
| 74 | + - --cluster-id=blockstor-stand |
| 75 | + ports: |
| 76 | + - {name: rest, containerPort: 3370} |
| 77 | + - {name: grpc, containerPort: 7000} |
| 78 | + - {name: health, containerPort: 8081} |
| 79 | + readinessProbe: |
| 80 | + tcpSocket: {port: 3370} |
| 81 | + initialDelaySeconds: 5 |
| 82 | + livenessProbe: |
| 83 | + httpGet: {path: /healthz, port: 8081} |
| 84 | + initialDelaySeconds: 15 |
| 85 | + securityContext: |
| 86 | + runAsNonRoot: true |
| 87 | + runAsUser: 65532 |
| 88 | + allowPrivilegeEscalation: false |
| 89 | + capabilities: {drop: [ALL]} |
| 90 | + seccompProfile: {type: RuntimeDefault} |
| 91 | + resources: |
| 92 | + requests: {cpu: 50m, memory: 64Mi} |
| 93 | + limits: {cpu: 500m, memory: 256Mi} |
| 94 | +--- |
| 95 | +apiVersion: v1 |
| 96 | +kind: Service |
| 97 | +metadata: |
| 98 | + name: blockstor-controller |
| 99 | + namespace: blockstor-system |
| 100 | +spec: |
| 101 | + selector: {app: blockstor-controller} |
| 102 | + ports: |
| 103 | + - {name: rest, port: 3370, targetPort: 3370} |
| 104 | + - {name: grpc, port: 7000, targetPort: 7000} |
0 commit comments