Skip to content

Commit 00fb2a9

Browse files
committed
Install rook/ceph when bootstrapping the preview env
Signed-off-by: JenTing Hsiao <[email protected]>
1 parent 3c04b68 commit 00fb2a9

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.werft/jobs/build/deploy-to-preview-environment.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ export async function deployToPreviewEnvironment(werft: Werft, jobConfig: JobCon
133133
exec(`kubectl --kubeconfig ${PREVIEW_K3S_KUBECONFIG_PATH} apply -f clouddns-dns01-solver-svc-acct.yaml -f letsencrypt-issuer.yaml`, { slice: vmSlices.INSTALL_LETS_ENCRYPT_ISSUER, dontCheckRc: true })
134134
werft.done(vmSlices.INSTALL_LETS_ENCRYPT_ISSUER)
135135

136+
VM.installRookCeph({ kubeconfig: PREVIEW_K3S_KUBECONFIG_PATH })
136137
VM.installFluentBit({ namespace: 'default', kubeconfig: PREVIEW_K3S_KUBECONFIG_PATH, slice: vmSlices.EXTERNAL_LOGGING })
137138
werft.done(vmSlices.EXTERNAL_LOGGING)
138139

.werft/vm/vm.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,16 @@ export function stopKubectlPortForwards() {
214214
exec(`sudo killall kubectl || true`)
215215
}
216216

217+
/**
218+
* Install Rook/Ceph storage that supports CSI snapshot
219+
*/
220+
export function installRookCeph(options: { kubeconfig: string }) {
221+
exec(`kubectl --kubeconfig ${options.kubeconfig} apply -f .werft/vm/manifests/rook-ceph/crds.yaml -f .werft/vm/manifests/rook-ceph/common.yaml -f .werft/vm/manifests/rook-ceph/operator.yaml`)
222+
exec(`kubectl --kubeconfig ${options.kubeconfig} apply -f .werft/vm/manifests/rook-ceph/cluster-test.yaml`)
223+
exec(`kubectl --kubeconfig ${options.kubeconfig} apply -f .werft/vm/manifests/rook-ceph/storageclass-test.yaml`)
224+
exec(`kubectl --kubeconfig ${options.kubeconfig} apply -f .werft/vm/manifests/rook-ceph/snapshotclass.yaml`)
225+
}
226+
217227
/**
218228
* Install Fluent-Bit sending logs to GCP
219229
*/

0 commit comments

Comments
 (0)