Skip to content

Commit

Permalink
GA v1.5.0 merge develop to master branch (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
oriyarde authored Mar 9, 2021
1 parent afb00a7 commit e02610e
Show file tree
Hide file tree
Showing 45 changed files with 5,829 additions and 1,876 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
build:
CGO_ENABLED=1 GOOS=linux go build -o build/_output/bin/ibm-block-csi-operator -gcflags all=-trimpath=${GOPATH} -asmflags all=-trimpath=${GOPATH} -mod=vendor cmd/manager/main.go

.PHONY: courier
courier:
.PHONY: olm-verification
olm-verification:
operator-courier --verbose verify deploy/olm-catalog/ibm-block-csi-operator-community
operator-courier --verbose verify deploy/olm-catalog/ibm-block-csi-operator
build/ci/olm_ocp_verification.sh

.PHONY: test
test: update
Expand Down
237 changes: 196 additions & 41 deletions NOTICES

Large diffs are not rendered by default.

84 changes: 11 additions & 73 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ The Container Storage Interface (CSI) Driver for IBM block storage systems enabl
This is the official operator to deploy and manage IBM block storage CSI driver.

Supported container platforms (and architectures):
- OpenShift v4.4 (x86, IBM Z, and IBM PowerPC)
- OpenShift v4.5 (x86, IBM Z, and IBM PowerPC)
- Kubernetes v1.18 (x86)
- OpenShift v4.6 (x86, IBM Z, and IBM Power Systems)
- OpenShift v4.7 (x86, IBM Z, and IBM Power Systems)
- Kubernetes v1.19 (x86)
- Kubernetes v1.20 (x86)

Supported IBM storage systems:
- IBM Spectrum Virtualize Family including IBM SAN Volume Controller (SVC) and IBM FlashSystem® family members built with IBM Spectrum® Virtualize (FlashSystem 5010, 5030, 5100, 7200, 9100, 9200, 9200R)
- IBM Spectrum Virtualize Family including IBM SAN Volume Controller (SVC) and IBM FlashSystem® family members built with IBM Spectrum® Virtualize (FlashSystem 5010, 5030, 5100, 5200, 7200, 9100, 9200, 9200R)
- IBM FlashSystem A9000 and A9000R
- IBM DS8000 Family

Supported operating systems (and architectures):
- RHEL 7.x (x86)
- RHCOS (x86, IBM Z, and IBM PowerPC)
- RHCOS (x86, IBM Z, and IBM Power Systems)

Full documentation can be found on the [IBM Knowledge Center](https://www.ibm.com/support/knowledgecenter/SSRQ8T).

Expand Down Expand Up @@ -46,75 +46,13 @@ For more information, find your storage system documentation on [IBM Knowledge C

##### 2.1 Additional configuration steps for OpenShift® Container Platform users (RHEL and RHCOS). Other users can continue to step 3.

The following yaml file example is for both Fibre Channel and iSCSI configurations. To support iSCSI, uncomment the last two lines in the file:


**Important:** The `99-ibm-attach.yaml` configuration file overrides any files that already exist on your system. Only use this file if the files mentioned in the yaml below are not already created. If one or more have been created, edit this yaml file, as necessary.

Save the `99-ibm-attach.yaml` file.

Download and save the following yaml file:
```bash
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: worker
name: 99-ibm-attach
spec:
config:
ignition:
version: 2.2.0
storage:
files:
- path: /etc/multipath.conf
mode: 384
filesystem: root
contents:
source: data:,defaults%20%7B%0A%20%20%20%20path_checker%20tur%0A%20%20%20%20path_selector
%20%22round-robin%200%22%0A%20%20%20%20rr_weight%20uniform%0A%20%20%20%20prio%20const%0A
%20%20%20%20rr_min_io_rq%201%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20polling_interval
%2030%0A%20%20%20%20path_grouping_policy%20multibus%0A%20%20%20%20find_multipaths%20yes%0A
%20%20%20%20no_path_retry%20fail%0A%20%20%20%20user_friendly_names%20yes%0A%20%20%20%20failback
%20immediate%0A%20%20%20%20checker_timeout%2010%0A%20%20%20%20fast_io_fail_tmo%20off%0A%7D%0A%0Adevices
%20%7B%0A%20%20%20%20device%20%7B%0A%20%20%20%20%20%20%20%20path_checker%20tur%0A
%20%20%20%20%20%20%20%20product%20%22FlashSystem%22%0A%20%20%20%20%20%20%20%20vendor%20%22IBM%22%0A
%20%20%20%20%20%20%20%20rr_weight%20uniform%0A%20%20%20%20%20%20%20%20rr_min_io_rq
%204%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20path_grouping_policy
%20multibus%0A%20%20%20%20%20%20%20%20path_selector%20%22round-robin%200%22%0A
%20%20%20%20%20%20%20%20no_path_retry%20fail%0A%20%20%20%20%20%20%20%20failback%20immediate%0A
%20%20%20%20%7D%0A%20%20%20%20device%20%7B%0A%20%20%20%20%20%20%20%20path_checker%20tur%0A
%20%20%20%20%20%20%20%20product%20%22FlashSystem-9840%22%0A%20%20%20%20%20%20%20%20vendor%20%22IBM%22%0A
%20%20%20%20%20%20%20%20fast_io_fail_tmo%20off%0A%20%20%20%20%20%20%20%20rr_weight%20uniform%0A
%20%20%20%20%20%20%20%20rr_min_io_rq%201000%20%20%20%20%20%20%20%20%20%20%20%20%0A
%20%20%20%20%20%20%20%20path_grouping_policy%20multibus%0A%20%20%20%20%20%20%20%20path_selector
%20%22round-robin%200%22%0A%20%20%20%20%20%20%20%20no_path_retry%20fail%0A
%20%20%20%20%20%20%20%20failback%20immediate%0A%20%20%20%20%7D%0A%20%20%20%20device%20%7B%0A
%20%20%20%20%20%20%20%20vendor%20%22IBM%22%0A%20%20%20%20%20%20%20%20product%20%222145%22%0A
%20%20%20%20%20%20%20%20path_checker%20tur%0A%20%20%20%20%20%20%20%20features%20%221%20queue_if_no_path
%22%0A%20%20%20%20%20%20%20%20path_grouping_policy%20group_by_prio%0A
%20%20%20%20%20%20%20%20path_selector%20%22service-time%200%22%20%23%20Used%20by%20Red%20Hat%207.x%0A
%20%20%20%20%20%20%20%20prio%20alua%0A%20%20%20%20%20%20%20%20rr_min_io_rq%201%0A
%20%20%20%20%20%20%20%20rr_weight%20uniform%20%0A%20%20%20%20%20%20%20%20no_path_retry%20%225%22%0A
%20%20%20%20%20%20%20%20dev_loss_tmo%20120%0A%20%20%20%20%20%20%20%20failback%20immediate%0A%20%20%20%7D
%0A%7D%0A
verification: {}
- path: /etc/udev/rules.d/99-ibm-2145.rules
mode: 420
filesystem: root
contents:
source: data:,%23%20Set%20SCSI%20command%20timeout%20to%20120s%20%28default%20%3D%3D
%2030%20or%2060%29%20for%20IBM%202145%20devices%0ASUBSYSTEM%3D%3D%22block%22%2C%20ACTION%3D%3D%22add
%22%2C%20ENV%7BID_VENDOR%7D%3D%3D%22IBM%22%2CENV%7BID_MODEL%7D%3D%3D%222145%22%2C%20RUN%2B%3D%22/bin/sh
%20-c%20%27echo%20120%20%3E/sys/block/%25k/device/timeout%27%22%0A
verification: {}
systemd:
units:
- name: multipathd.service
enabled: true
# Uncomment the following lines if this MachineConfig will be used with iSCSI connectivity
#- name: iscsid.service
# enabled: true
curl https://raw.githubusercontent.com/IBM/ibm-block-csi-operator/master/deploy/99-ibm-attach.yaml > 99-ibm-attach.yaml
```
This file can be used for both Fibre Channel and iSCSI configurations. To support iSCSI, uncomment the last two lines in the file.

**Important:** The `99-ibm-attach.yaml` configuration file overrides any files that already exist on your system. Only use this file if the files mentioned in the yaml below are not already created. If one or more have been created, edit this yaml file, as necessary.

Apply the yaml file.
```bash
Expand Down Expand Up @@ -404,7 +342,7 @@ storageclass.storage.k8s.io/gold created

## Upgrading

In order to upgrade the CSI operator and driver from a previous version, uninstall the existing operator and driver, and then install the newer version.
In order to upgrade the CSI operator and driver from a previous version, perform [step 1](#1-download-the-manifest-from-github) and [step 4](#4-install-the-operator-while-using-a-user-defined-namespace) from [Installation](#Installation).

## Uninstalling

Expand Down
9 changes: 6 additions & 3 deletions build/Dockerfile.operator
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ RUN CGO_ENABLED=1 GOOS=linux go build \
github.com/IBM/ibm-block-csi-operator/cmd/manager


FROM registry.access.redhat.com/ubi7/ubi-minimal:7.9-224
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3-230
MAINTAINER IBM Storage

ARG VERSION=1.4.0
ARG VERSION=1.5.0
ARG BUILD_NUMBER=0

###Required Labels
Expand All @@ -43,12 +43,15 @@ LABEL name="Operator for IBM block storage CSI driver" \

ENV OPERATOR=/usr/local/bin/ibm-block-csi-operator \
USER_UID=1001 \
USER_NAME=ibm-block-csi-operator
USER_NAME=ibm-block-csi-operator \
CR_YAML=/usr/local/etc/csi.ibm.com_v1_ibmblockcsi_cr.yaml

COPY build/health_check.sh .
RUN chmod 777 ./health_check.sh
COPY ./LICENSE /licenses/
COPY ./NOTICES /licenses/
COPY ./deploy/crds/csi.ibm.com_v1_ibmblockcsi_cr.yaml ${CR_YAML}
RUN chmod 0444 ${CR_YAML}

# install operator binary
COPY --from=0 /go/src/github.com/IBM/ibm-block-csi-operator/build/_output/bin/ibm-block-csi-operator ${OPERATOR}
Expand Down
32 changes: 32 additions & 0 deletions build/ci/Dockerfile.olm-verification
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright IBM Corporation 2020.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM python:3

WORKDIR /usr/src/app

RUN pip3 install operator-courier
RUN RELEASE_VERSION=v1.4.0 \
&& ARCH=$(if [ "$(uname -m)" = "x86_64" ]; then echo "amd64"; else echo "$(uname -m)" ; fi) \
&& SDK_ASSET=operator-sdk_linux_${ARCH} \
&& curl -LO https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION}/${SDK_ASSET} \
&& chmod +x ${SDK_ASSET} \
&& mkdir -p /usr/local/bin/ \
&& cp ${SDK_ASSET} /usr/local/bin/operator-sdk \
&& rm ${SDK_ASSET}

COPY Makefile Makefile
COPY build/ build/
COPY deploy/olm-catalog deploy/olm-catalog
CMD ["make", "olm-verification"]
6 changes: 4 additions & 2 deletions build/ci/Dockerfile.unittest
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@

FROM golang:1.13.1

WORKDIR /go/src/github.com/IBM/ibm-block-csi-operator
ENV GO111MODULE=on \
GOROOT=/usr/local/go
GOROOT=/usr/local/go \
WORKDIR=/go/src/github.com/IBM/ibm-block-csi-operator
ENV CR_YAML=$WORKDIR/deploy/crds/csi.ibm.com_v1_ibmblockcsi_cr.yaml
WORKDIR $WORKDIR

RUN go get github.com/onsi/ginkgo/ginkgo
RUN RELEASE_VERSION=v0.16.0 \
Expand Down
25 changes: 15 additions & 10 deletions build/ci/Dockerfile.courier → build/ci/olm_ocp_verification.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
# Copyright IBM Corporation 2020.
#!/bin/bash -xe

#
# Copyright 2020 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0

# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM python:3

WORKDIR /usr/src/app

RUN pip3 install operator-courier
ARCH=$(uname -m)

COPY . .
CMD ["make", "courier"]
if [ "${ARCH}" != "ppc64le" ]; then
for olm_ocp_bundle_dir in deploy/olm-catalog/ibm-block-csi-operator/*/ ; do
echo "Validating ${olm_ocp_bundle_dir}"
operator-sdk bundle --verbose validate "${olm_ocp_bundle_dir}"
done
else
echo "Skipping OLM OCP validation on ${ARCH} arch"
fi
12 changes: 10 additions & 2 deletions build/ci/run_olm_verification.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,13 @@
# limitations under the License.
#

docker build -f build/ci/Dockerfile.courier -t operator-courier .
docker run --rm -t operator-courier
docker build -f build/ci/Dockerfile.olm-verification -t operator-olm-verification .

ARCH=$(uname -m)

if [ "${ARCH}" != "ppc64le" ]; then
DOCKER_PATH=$(which docker)
docker run --rm -t -v /var/run/docker.sock:/var/run/docker.sock -v "${DOCKER_PATH}":/usr/bin/docker operator-olm-verification
else
docker run --rm -t operator-olm-verification
fi
7 changes: 7 additions & 0 deletions cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
_ "k8s.io/client-go/plugin/pkg/client/auth"

"github.com/IBM/ibm-block-csi-operator/pkg/apis"
operatorConfig "github.com/IBM/ibm-block-csi-operator/pkg/config"
"github.com/IBM/ibm-block-csi-operator/pkg/controller"

"github.com/operator-framework/operator-sdk/pkg/k8sutil"
Expand Down Expand Up @@ -82,6 +83,12 @@ func main() {

printVersion()

err := operatorConfig.LoadDefaultsOfIBMBlockCSI()
if err != nil {
log.Error(err, "Failed to load default custom resource config")
os.Exit(1)
}

namespace, err := k8sutil.GetWatchNamespace()
if err != nil {
log.Error(err, "Failed to get watch namespace")
Expand Down
31 changes: 31 additions & 0 deletions deploy/99-ibm-attach.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: worker
name: 99-ibm-attach
spec:
config:
ignition:
version: 2.2.0
storage:
files:
- path: /etc/multipath.conf
mode: 384
filesystem: root
contents:
source: data:,defaults%20%7B%0A%20%20%20%20path_checker%20tur%0A%20%20%20%20path_selector%20%22round-robin%200%22%0A%20%20%20%20rr_weight%20uniform%0A%20%20%20%20prio%20const%0A%20%20%20%20rr_min_io_rq%201%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20polling_interval%2030%0A%20%20%20%20path_grouping_policy%20multibus%0A%20%20%20%20find_multipaths%20yes%0A%20%20%20%20no_path_retry%20fail%0A%20%20%20%20user_friendly_names%20yes%0A%20%20%20%20failback%20immediate%0A%20%20%20%20checker_timeout%2010%0A%20%20%20%20fast_io_fail_tmo%20off%0A%7D%0A%0Adevices%20%7B%0A%20%20%20%20device%20%7B%0A%20%20%20%20%20%20%20%20path_checker%20tur%0A%20%20%20%20%20%20%20%20product%20%22FlashSystem%22%0A%20%20%20%20%20%20%20%20vendor%20%22IBM%22%0A%20%20%20%20%20%20%20%20rr_weight%20uniform%0A%20%20%20%20%20%20%20%20rr_min_io_rq%204%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20path_grouping_policy%20multibus%0A%20%20%20%20%20%20%20%20path_selector%20%22round-robin%200%22%0A%20%20%20%20%20%20%20%20no_path_retry%20fail%0A%20%20%20%20%20%20%20%20failback%20immediate%0A%20%20%20%20%7D%0A%20%20%20%20device%20%7B%0A%20%20%20%20%20%20%20%20path_checker%20tur%0A%20%20%20%20%20%20%20%20product%20%22FlashSystem-9840%22%0A%20%20%20%20%20%20%20%20vendor%20%22IBM%22%0A%20%20%20%20%20%20%20%20fast_io_fail_tmo%20off%0A%20%20%20%20%20%20%20%20rr_weight%20uniform%0A%20%20%20%20%20%20%20%20rr_min_io_rq%201000%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20path_grouping_policy%20multibus%0A%20%20%20%20%20%20%20%20path_selector%20%22round-robin%200%22%0A%20%20%20%20%20%20%20%20no_path_retry%20fail%0A%20%20%20%20%20%20%20%20failback%20immediate%0A%20%20%20%20%7D%0A%20%20%20%20device%20%7B%0A%20%20%20%20%20%20%20%20vendor%20%22IBM%22%0A%20%20%20%20%20%20%20%20product%20%222145%22%0A%20%20%20%20%20%20%20%20path_checker%20tur%0A%20%20%20%20%20%20%20%20features%20%221%20queue_if_no_path%22%0A%20%20%20%20%20%20%20%20path_grouping_policy%20group_by_prio%0A%20%20%20%20%20%20%20%20path_selector%20%22service-time%200%22%20%23%20Used%20by%20Red%20Hat%207.x%0A%20%20%20%20%20%20%20%20prio%20alua%0A%20%20%20%20%20%20%20%20rr_min_io_rq%201%0A%20%20%20%20%20%20%20%20rr_weight%20uniform%20%0A%20%20%20%20%20%20%20%20no_path_retry%20%225%22%0A%20%20%20%20%20%20%20%20dev_loss_tmo%20120%0A%20%20%20%20%20%20%20%20failback%20immediate%0A%20%20%20%7D%0A%7D%0A
verification: {}
- path: /etc/udev/rules.d/99-ibm-2145.rules
mode: 420
filesystem: root
contents:
source: data:,%23%20Set%20SCSI%20command%20timeout%20to%20120s%20%28default%20%3D%3D%2030%20or%2060%29%20for%20IBM%202145%20devices%0ASUBSYSTEM%3D%3D%22block%22%2C%20ACTION%3D%3D%22add%22%2C%20ENV%7BID_VENDOR%7D%3D%3D%22IBM%22%2CENV%7BID_MODEL%7D%3D%3D%222145%22%2C%20RUN%2B%3D%22/bin/sh%20-c%20%27echo%20120%20%3E/sys/block/%25k/device/timeout%27%22%0A
verification: {}
systemd:
units:
- name: multipathd.service
enabled: true
# Uncomment the following lines if this MachineConfig will be used with iSCSI connectivity
#- name: iscsid.service
# enabled: true
2 changes: 1 addition & 1 deletion deploy/crds/csi.ibm.com_ibmblockcsis_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
app.kubernetes.io/instance: ibmblockcsis
app.kubernetes.io/managed-by: ibm-block-csi-operator
product: ibm-block-csi-driver
release: v1.4.0
release: v1.5.0
csi: ibm
spec:
group: csi.ibm.com
Expand Down
14 changes: 7 additions & 7 deletions deploy/crds/csi.ibm.com_v1_ibmblockcsi_cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ metadata:
app.kubernetes.io/name: ibm-block-csi
app.kubernetes.io/instance: ibm-block-csi
app.kubernetes.io/managed-by: ibm-block-csi-operator
release: v1.4.0
release: v1.5.0
spec:
# controller is a statefulSet with ibm-block-csi-controller container
# and csi-provisioner, csi-attacher, csi-snapshotter and livenessprobe sidecars.
controller:
repository: ibmcom/ibm-block-csi-driver-controller
tag: "1.4.0"
tag: "1.5.0"
imagePullPolicy: IfNotPresent
affinity:
nodeAffinity:
Expand All @@ -31,7 +31,7 @@ spec:
# and csi-node-driver-registrar and livenessprobe sidecars.
node:
repository: ibmcom/ibm-block-csi-driver-node
tag: "1.4.0"
tag: "1.5.0"
imagePullPolicy: IfNotPresent
affinity:
nodeAffinity:
Expand All @@ -57,19 +57,19 @@ spec:
imagePullPolicy: IfNotPresent
- name: csi-provisioner
repository: k8s.gcr.io/sig-storage/csi-provisioner
tag: "v2.0.2"
tag: "v2.0.4"
imagePullPolicy: IfNotPresent
- name: csi-attacher
repository: k8s.gcr.io/sig-storage/csi-attacher
tag: "v3.0.0"
tag: "v3.0.2"
imagePullPolicy: IfNotPresent
- name: csi-snapshotter
repository: k8s.gcr.io/sig-storage/csi-snapshotter
tag: "v3.0.0"
tag: "v3.0.2"
imagePullPolicy: IfNotPresent
- name: csi-resizer
repository: k8s.gcr.io/sig-storage/csi-resizer
tag: "v1.0.0"
tag: "v1.0.1"
imagePullPolicy: IfNotPresent
- name: livenessprobe
repository: k8s.gcr.io/sig-storage/livenessprobe
Expand Down
Loading

0 comments on commit e02610e

Please sign in to comment.