From 39922f85b17b6f25bb51f137a5dc3519a2b888a3 Mon Sep 17 00:00:00 2001
From: Sheogorath <sheogorath@shivering-isles.com>
Date: Sun, 15 Aug 2021 19:09:50 +0200
Subject: [PATCH] feat(rook): Switch to self-hosted ceph images

This aptch should move the ceph images used in the cluster to the
internal registry, preventing issues with quay.io to cause problems in
the cluster.
---
 infrastructure/rook/cluster-on-pvc.yaml |  2 +-
 infrastructure/rook/imagestream.yaml    | 18 ++++++++++++++++++
 infrastructure/rook/kustomization.yaml  |  1 +
 3 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 infrastructure/rook/imagestream.yaml

diff --git a/infrastructure/rook/cluster-on-pvc.yaml b/infrastructure/rook/cluster-on-pvc.yaml
index dccfc4407..5cc8d4316 100644
--- a/infrastructure/rook/cluster-on-pvc.yaml
+++ b/infrastructure/rook/cluster-on-pvc.yaml
@@ -33,7 +33,7 @@ spec:
           requests:
             storage: 10Gi
   cephVersion:
-    image: quay.io/ceph/ceph:v16.2.5
+    image: image-registry.openshift-image-registry.svc:5000/rook-ceph/ceph:v16.2.5
     allowUnsupported: false
   skipUpgradeChecks: false
   continueUpgradeAfterChecksEvenIfNotHealthy: false
diff --git a/infrastructure/rook/imagestream.yaml b/infrastructure/rook/imagestream.yaml
new file mode 100644
index 000000000..aa66b8123
--- /dev/null
+++ b/infrastructure/rook/imagestream.yaml
@@ -0,0 +1,18 @@
+kind: ImageStream
+apiVersion: image.openshift.io/v1
+metadata:
+  name: ceph
+  namespace: rook-ceph
+spec:
+  lookupPolicy:
+    local: false
+  tags:
+    - name: v16.2.5
+      annotations: null
+      from:
+        kind: DockerImage
+        name: 'quay.io/ceph/ceph:v16.2.5'
+      importPolicy:
+        scheduled: true
+      referencePolicy:
+        type: Source
diff --git a/infrastructure/rook/kustomization.yaml b/infrastructure/rook/kustomization.yaml
index 0f664c4fc..d15c76fd3 100644
--- a/infrastructure/rook/kustomization.yaml
+++ b/infrastructure/rook/kustomization.yaml
@@ -6,5 +6,6 @@ resources:
   - https://git.shivering-isles.com/github-mirror/rook/rook/-/raw/v1.7.1/cluster/examples/kubernetes/ceph/common.yaml
   - https://git.shivering-isles.com/github-mirror/rook/rook/-/raw/v1.7.1/cluster/examples/kubernetes/ceph/operator-openshift.yaml
   - https://git.shivering-isles.com/github-mirror/rook/rook/-/raw/v1.7.1/cluster/examples/kubernetes/ceph/csi/rbd/snapshotclass.yaml
+  - imagestream.yaml
   - cluster-on-pvc.yaml
   - storageclass.yaml
-- 
GitLab