Skip to content

Commit 77c210f

Browse files
Apply suggestions from code review
Co-authored-by: Techassi <git@techassi.dev>
1 parent 5481429 commit 77c210f

1 file changed

Lines changed: 37 additions & 7 deletions

File tree

modules/guides/pages/deploy-operators-and-csi-drivers-separately.adoc

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ helm install listener-operator \
188188
Remaining operators::
189189
+
190190
--
191-
NOTE: These operator use the same values file.
191+
NOTE: These operators use the same values file.
192192
193193
[source,bash]
194194
----
@@ -212,9 +212,19 @@ Pods running on the `stackable-operators` node pool:
212212

213213
[source,bash]
214214
----
215-
OPERATORS_NODEPOOL=$(kubectl get nodes -l nodepool=stackable-operators -o jsonpath="{.items[*].metadata.name}" | tr ' ' ',')
215+
OPERATORS_NODEPOOL=$(
216+
kubectl get nodes -l nodepool=stackable-operators -o jsonpath="{.items[*].metadata.name}" \
217+
| tr ' ' ','
218+
)
219+
216220
echo "Nodes in operators pool: $OPERATORS_NODEPOOL\n"
217-
kubectl get pods -o json | jq --raw-output --arg nodepool "$OPERATORS_NODEPOOL" '.items[] | .metadata.name as $podname | .spec.nodeName as $nodename | select($nodename | IN($nodepool | split(",")[])) | $podname'
221+
kubectl get pods -o json | jq --raw-output --arg nodepool "$OPERATORS_NODEPOOL" '
222+
.items[]
223+
| .metadata.name as $podname
224+
| .spec.nodeName as $nodename
225+
| select($nodename | IN($nodepool | split(",")[]))
226+
| $podname
227+
'
218228
----
219229

220230
You should see similar output showing the Stackable Operators are running only on nodes with the label `nodepool: stackable-operators`.
@@ -233,9 +243,19 @@ Pods running on the `stackable-workloads` node pool:
233243

234244
[source,bash]
235245
----
236-
WORKLOADS_NODEPOOL=$(kubectl get nodes -l nodepool=stackable-workloads -o jsonpath="{.items[*].metadata.name}" | tr ' ' ',')
246+
WORKLOADS_NODEPOOL=$(
247+
kubectl get nodes -l nodepool=stackable-workloads -o jsonpath="{.items[*].metadata.name}" \
248+
| tr ' ' ','
249+
)
250+
237251
echo "Nodes in workloads pool: $WORKLOADS_NODEPOOL\n"
238-
kubectl get pods -o json | jq --raw-output --arg nodepool "$WORKLOADS_NODEPOOL" '.items[] | .metadata.name as $podname | .spec.nodeName as $nodename | select($nodename | IN($nodepool | split(",")[])) | $podname'
252+
kubectl get pods -o json | jq --raw-output --arg nodepool "$WORKLOADS_NODEPOOL" '
253+
.items[]
254+
| .metadata.name as $podname
255+
| .spec.nodeName as $nodename
256+
| select($nodename | IN($nodepool | split(",")[]))
257+
| $podname
258+
'
239259
----
240260

241261
You should see similar output showing the Stackable CSI Node Drivers are running only on nodes with the label `nodepool: stackable-workloads`.
@@ -325,9 +345,19 @@ Then take a look at the pods running on nodes with the label `nodepool: stackabl
325345

326346
[source,bash]
327347
----
328-
WORKLOADS_NODEPOOL=$(kubectl get nodes -l nodepool=stackable-workloads -o jsonpath="{.items[*].metadata.name}" | tr ' ' ',')
348+
WORKLOADS_NODEPOOL=$(
349+
kubectl get nodes -l nodepool=stackable-workloads -o jsonpath="{.items[*].metadata.name}"
350+
| tr ' ' ','
351+
)
352+
329353
echo "Nodes in workloads pool: $WORKLOADS_NODEPOOL\n"
330-
kubectl get pods -o json | jq --raw-output --arg nodepool "$WORKLOADS_NODEPOOL" '.items[] | .metadata.name as $podname | .spec.nodeName as $nodename | select($nodename | IN($nodepool | split(",")[])) | $podname'
354+
kubectl get pods -o json | jq --raw-output --arg nodepool "$WORKLOADS_NODEPOOL" '
355+
.items[]
356+
| .metadata.name as $podname
357+
| .spec.nodeName as $nodename
358+
| select($nodename | IN($nodepool | split(",")[]))
359+
| $podname
360+
'
331361
----
332362

333363
You should see similar output as last time, but now with the NiFi pod.

0 commit comments

Comments
 (0)