From f6c15bfb5a8ca33e32b9bfed173fb655a3cd64b1 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Tue, 19 Mar 2019 16:22:17 -0400 Subject: [PATCH] ceph csi: include required templates in image Include the mandatory template files in the rook ceph image so that the user-driven configuration for CSI and flex do not need to differ in this aspect. Signed-off-by: John Mulligan --- .../examples/kubernetes/ceph/operator-with-csi.yaml | 10 ---------- images/ceph/Dockerfile | 1 + images/ceph/Makefile | 1 + 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/cluster/examples/kubernetes/ceph/operator-with-csi.yaml b/cluster/examples/kubernetes/ceph/operator-with-csi.yaml index fa8fd5125..0b3ab5808 100644 --- a/cluster/examples/kubernetes/ceph/operator-with-csi.yaml +++ b/cluster/examples/kubernetes/ceph/operator-with-csi.yaml @@ -34,10 +34,6 @@ spec: name: rook-config - mountPath: /etc/ceph name: default-config-dir - - mountPath: /etc/ceph-csi/rbd - name: csi-rbd-config - - mountPath: /etc/ceph-csi/cephfs - name: csi-cephfs-config env: - name: ROOK_CURRENT_NAMESPACE_ONLY value: "true" @@ -78,9 +74,3 @@ spec: emptyDir: {} - name: default-config-dir emptyDir: {} - - name: csi-rbd-config - configMap: - name: csi-rbd-config - - name: csi-cephfs-config - configMap: - name: csi-cephfs-config diff --git a/images/ceph/Dockerfile b/images/ceph/Dockerfile index c91abcb6f..40fa723c1 100644 --- a/images/ceph/Dockerfile +++ b/images/ceph/Dockerfile @@ -23,6 +23,7 @@ RUN curl --fail -sSL -o /tini https://github.com/krallin/tini/releases/download/ chmod +x /tini COPY rook rookflex toolbox.sh /usr/local/bin/ +COPY ceph-csi /etc/ceph-csi ENTRYPOINT ["/tini", "--", "/usr/local/bin/rook"] CMD [""] diff --git a/images/ceph/Makefile b/images/ceph/Makefile index 91bea4a05..a6c26c99c 100755 --- a/images/ceph/Makefile +++ b/images/ceph/Makefile @@ -33,6 +33,7 @@ do.build: @cp toolbox.sh $(TEMP) @cp $(OUTPUT_DIR)/bin/linux_$(GOARCH)/rook $(TEMP) @cp $(OUTPUT_DIR)/bin/linux_$(GOARCH)/rookflex $(TEMP) + @cp -r ../../cluster/examples/kubernetes/ceph/csi/template $(TEMP)/ceph-csi @cd $(TEMP) && $(SED_CMD) 's|BASEIMAGE|$(BASEIMAGE)|g' Dockerfile @$(DOCKERCMD) build $(BUILD_ARGS) \ --build-arg ARCH=$(GOARCH) \