Skip to content

Commit ec797a3

Browse files
Merge pull request #41 from jsafrane/disable-default-install
Disable automatic installation of the operator in OpenShift
2 parents 9242033 + d0fa6ad commit ec797a3

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ RUN useradd csi-operator
88
COPY --from=builder /go/src/github.com/openshift/csi-operator/bin/csi-operator /usr/bin/
99
COPY deploy/openshift/image-references deploy/prerequisites/*.yaml /manifests/
1010
COPY deploy/operator.yaml /manifests/99_operator.yaml
11-
LABEL io.openshift.release.operator true
11+
# LABEL io.openshift.release.operator true
1212
USER csi-operator
1313
ENTRYPOINT ["/usr/bin/csi-operator"]

Dockerfile.rhel7

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ RUN useradd csi-operator
88
COPY --from=builder /go/src/github.com/openshift/csi-operator/bin/csi-operator /usr/bin/
99
COPY deploy/openshift/image-references deploy/prerequisites/*.yaml /manifests/
1010
COPY deploy/operator.yaml /manifests/99_operator.yaml
11-
LABEL io.openshift.release.operator true
11+
# LABEL io.openshift.release.operator true
1212
USER csi-operator
1313
ENTRYPOINT ["/usr/bin/csi-operator"]

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ verify:
3737
.PHONY: test-e2e
3838
# usage: KUBECONFIG=/var/run/kubernetes/admin.kubeconfig make test-e2e
3939
test-e2e: generate
40+
hack/deploy-local.sh
4041
go test -v ./test/e2e/... -kubeconfig=$(KUBECONFIG) -root $(PWD) -globalMan deploy/prerequisites/01_crd.yaml
4142

4243
.PHONY: container

hack/deploy-local.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
# Deploy the operator on a local cluster (reachable by kubectl).
4+
5+
PROJECT_ROOT=$(dirname "${BASH_SOURCE}")/..
6+
7+
if which kubectl &>/dev/null; then
8+
CLI=kubectl
9+
elif which oc &>/dev/null; then
10+
CLI=oc
11+
else
12+
echo "Cannot find kubectl nor oc"
13+
exit 1
14+
fi
15+
16+
$CLI apply -f "${PROJECT_ROOT}/deploy/prerequisites/"
17+
$CLI apply -f "${PROJECT_ROOT}/deploy/operator.yaml"

0 commit comments

Comments
 (0)