@@ -135,16 +135,35 @@ EOF
135
135
}
136
136
137
137
function installRookCeph {
138
- diff-apply " ${PREVIEW_K3S_KUBE_CONTEXT} " " $ROOT /.werft/vm/manifests/rook-ceph/crds.yaml"
138
+ kubectl \
139
+ --kubeconfig " ${PREVIEW_K3S_KUBE_PATH} " \
140
+ --context " ${PREVIEW_K3S_KUBE_CONTEXT} " \
141
+ apply -f " $ROOT /.werft/vm/manifests/rook-ceph/crds.yaml" --server-side --force-conflicts
139
142
140
143
kubectl \
141
144
--kubeconfig " ${PREVIEW_K3S_KUBE_PATH} " \
142
145
--context " ${PREVIEW_K3S_KUBE_CONTEXT} " \
143
146
wait --for condition=established --timeout=120s crd/cephclusters.ceph.rook.io
144
147
145
- for file in common operator cluster-test storageclass-test snapshotclass; do
146
- diff-apply " ${PREVIEW_K3S_KUBE_CONTEXT} " " $ROOT /.werft/vm/manifests/rook-ceph/$file .yaml"
147
- done
148
+ kubectl \
149
+ --kubeconfig " ${PREVIEW_K3S_KUBE_PATH} " \
150
+ --context " ${PREVIEW_K3S_KUBE_CONTEXT} " \
151
+ apply -f " $ROOT /.werft/vm/manifests/rook-ceph/common.yaml" -f " $ROOT /.werft/vm/manifests/rook-ceph/operator.yaml"
152
+
153
+ kubectl \
154
+ --kubeconfig " ${PREVIEW_K3S_KUBE_PATH} " \
155
+ --context " ${PREVIEW_K3S_KUBE_CONTEXT} " \
156
+ apply -f " $ROOT /.werft/vm/manifests/rook-ceph/cluster-test.yaml"
157
+
158
+ kubectl \
159
+ --kubeconfig " ${PREVIEW_K3S_KUBE_PATH} " \
160
+ --context " ${PREVIEW_K3S_KUBE_CONTEXT} " \
161
+ apply -f " $ROOT /.werft/vm/manifests/rook-ceph/storageclass-test.yaml"
162
+
163
+ kubectl \
164
+ --kubeconfig " ${PREVIEW_K3S_KUBE_PATH} " \
165
+ --context " ${PREVIEW_K3S_KUBE_CONTEXT} " \
166
+ apply -f " $ROOT /.werft/vm/manifests/rook-ceph/snapshotclass.yaml"
148
167
}
149
168
150
169
# Install Fluent-Bit sending logs to GCP
357
376
yq d -i admin-login-secret.yaml metadata.creationTimestamp
358
377
yq d -i admin-login-secret.yaml metadata.uid
359
378
yq d -i admin-login-secret.yaml metadata.resourceVersion
360
- diff-apply " ${PREVIEW_K3S_KUBE_CONTEXT} " admin-login-secret.yaml
379
+ kubectl --kubeconfig " ${PREVIEW_K3S_KUBE_PATH} " --context " ${ PREVIEW_K3S_KUBE_CONTEXT}" apply -f admin-login-secret.yaml
361
380
rm -f admin-login-secret.yaml
362
381
363
382
yq w -i " ${INSTALLER_CONFIG_PATH} " adminLoginSecret.kind " secret"
@@ -372,7 +391,7 @@ yq w -i stripe-api-keys.secret.yaml metadata.namespace "default"
372
391
yq d -i stripe-api-keys.secret.yaml metadata.creationTimestamp
373
392
yq d -i stripe-api-keys.secret.yaml metadata.uid
374
393
yq d -i stripe-api-keys.secret.yaml metadata.resourceVersion
375
- diff-apply " ${PREVIEW_K3S_KUBE_CONTEXT} " stripe-api-keys.secret.yaml
394
+ kubectl --kubeconfig " ${PREVIEW_K3S_KUBE_PATH} " --context " ${ PREVIEW_K3S_KUBE_CONTEXT}" apply -f stripe-api-keys.secret.yaml
376
395
rm -f stripe-api-keys.secret.yaml
377
396
378
397
#
@@ -382,9 +401,8 @@ kubectl --kubeconfig "${DEV_KUBE_PATH}" --context "${DEV_KUBE_CONTEXT}" --namesp
382
401
| yq w - metadata.namespace ${PREVIEW_NAMESPACE} \
383
402
| yq d - metadata.uid \
384
403
| yq d - metadata.resourceVersion \
385
- | yq d - metadata.creationTimestamp > host-key.yaml
386
- diff-apply " ${PREVIEW_K3S_KUBE_CONTEXT} " host-key.yaml
387
- rm -f host-key.yaml
404
+ | yq d - metadata.creationTimestamp \
405
+ | kubectl --kubeconfig " ${PREVIEW_K3S_KUBE_PATH} " --context " ${PREVIEW_K3S_KUBE_CONTEXT} " apply -f -
388
406
389
407
yq w -i " ${INSTALLER_CONFIG_PATH} " sshGatewayHostKey.kind " secret"
390
408
yq w -i " ${INSTALLER_CONFIG_PATH} " sshGatewayHostKey.name " host-key"
@@ -498,7 +516,7 @@ yq w -i spicedb-secret.yaml metadata.namespace "default"
498
516
yq d -i spicedb-secret.yaml metadata.creationTimestamp
499
517
yq d -i spicedb-secret.yaml metadata.uid
500
518
yq d -i spicedb-secret.yaml metadata.resourceVersion
501
- diff-apply " ${PREVIEW_K3S_KUBE_CONTEXT} " spicedb-secret.yaml
519
+ kubectl --kubeconfig " ${PREVIEW_K3S_KUBE_PATH} " --context " ${ PREVIEW_K3S_KUBE_CONTEXT}" apply -f spicedb-secret.yaml
502
520
rm -f spicedb-secret.yaml
503
521
504
522
#
@@ -600,18 +618,7 @@ rm -f /tmp/public-api
600
618
log_info " Applying manifests (installing)"
601
619
602
620
kubectl --kubeconfig " ${PREVIEW_K3S_KUBE_PATH} " --context " ${PREVIEW_K3S_KUBE_CONTEXT} " delete -n " ${PREVIEW_NAMESPACE} " job migrations || true
603
- # export the function so we can use it in xargs
604
- export -f diff-apply
605
- mkdir temp-installer || true
606
- pushd temp-installer
607
- # this will split the big yaml produced by the installer, so we can diff individual parts of it and run them in parallel
608
- yq4 -s ' .kind + "_" + .metadata.name' " ../${INSTALLER_RENDER_PATH} "
609
- rm .yml || true # this one is a leftover from the split
610
- # shellcheck disable=SC2038
611
- find . | xargs -n 1 -I {} -P 5 bash -c " diff-apply ${PREVIEW_K3S_KUBE_CONTEXT} {}"
612
- log_info " Applied all"
613
- popd
614
- rm -rf temp-installer
621
+ kubectl --kubeconfig " ${PREVIEW_K3S_KUBE_PATH} " --context " ${PREVIEW_K3S_KUBE_CONTEXT} " apply -f " ${INSTALLER_RENDER_PATH} "
615
622
rm -f " ${INSTALLER_RENDER_PATH} "
616
623
617
624
# =========================
0 commit comments