From 82ede32c4e1fd234639aae0e4df1d7791fbf04c4 Mon Sep 17 00:00:00 2001 From: joshvanl Date: Tue, 14 Sep 2021 17:17:47 +0100 Subject: [PATCH] Ensure all names use cert-manager-csi-driver Signed-off-by: joshvanl --- .gitignore | 1 + Dockerfile | 4 ++-- cmd/app/app.go | 2 +- cmd/main.go | 2 +- test/e2e/suite/suite_test.go | 2 +- test/run.sh | 16 ++++++++-------- 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index ba077a40..070c63ca 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ bin +_artifacts diff --git a/Dockerfile b/Dockerfile index 8607fe68..e2a65f16 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,5 +18,5 @@ LABEL description="cert-manager CSI Driver" # Add util-linux to get a new version of losetup. RUN apk add util-linux -COPY ./bin/cert-manager-csi /cert-manager-csi -ENTRYPOINT ["/cert-manager-csi"] +COPY ./bin/cert-manager-csi-driver /cert-manager-csi-driver +ENTRYPOINT ["/cert-manager-csi-driver"] diff --git a/cmd/app/app.go b/cmd/app/app.go index 8c57a71e..bc9553c5 100644 --- a/cmd/app/app.go +++ b/cmd/app/app.go @@ -48,7 +48,7 @@ func NewCommand(ctx context.Context) *cobra.Command { opts := options.New() cmd := &cobra.Command{ - Use: "cert-manager-csi", + Use: "cert-manager-csi-driver", Short: helpOutput, Long: helpOutput, PreRunE: func(cmd *cobra.Command, args []string) error { diff --git a/cmd/main.go b/cmd/main.go index 974a3ab3..60ac7f83 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -30,7 +30,7 @@ func main() { cmd := app.NewCommand(ctx) if err := cmd.Execute(); err != nil { - klog.ErrorS(err, "error running cert-manager-csi") + klog.ErrorS(err, "error running cert-manager-csi-driver") os.Exit(1) } } diff --git a/test/e2e/suite/suite_test.go b/test/e2e/suite/suite_test.go index 062402d2..3c9cbef6 100644 --- a/test/e2e/suite/suite_test.go +++ b/test/e2e/suite/suite_test.go @@ -54,5 +54,5 @@ func TestE2E(t *testing.T) { ginkgoconfig.GinkgoConfig.ParallelNode)))) } - ginkgo.RunSpecsWithDefaultAndCustomReporters(t, "cert-manager-csi e2e suite", r) + ginkgo.RunSpecsWithDefaultAndCustomReporters(t, "cert-manager-csi-driver e2e suite", r) } diff --git a/test/run.sh b/test/run.sh index 95d45755..6142b5a2 100755 --- a/test/run.sh +++ b/test/run.sh @@ -21,7 +21,7 @@ set -o pipefail # Sets up the end-to-end test environment by: # - creating a kind cluster # - deploying cert-manager -# - deploying cert-manager-csi +# - deploying cert-manager-csi-driver # The end-to-end test suite will then be run against this environment. # The cluster will be deleted after tests have run. @@ -79,7 +79,7 @@ fi export PATH="$BIN_DIR:$PATH" -CLUSTER_NAME="cert-manager-csi-cluster" +CLUSTER_NAME="cert-manager-csi-driver-cluster" exit_command() { kind export logs "${ARTIFACTS}" --name="$CLUSTER_NAME" if [ -z "${SKIP_CLEANUP:-}" ]; then @@ -106,19 +106,19 @@ CERT_MANAGER_MANIFEST_URL="https://github.com/jetstack/cert-manager/releases/dow echo "Installing cert-manager in test cluster using manifest URL '$CERT_MANAGER_MANIFEST_URL'" kubectl create -f "$CERT_MANAGER_MANIFEST_URL" -echo "Building cert-manager-csi binary" -CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -o ./bin/cert-manager-csi ./cmd +echo "Building cert-manager-csi-driver binary" +CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -o ./bin/cert-manager-csi-driver ./cmd -CERT_MANAGER_CSI_DOCKER_IMAGE="quay.io/jetstack/cert-manager-csi" +CERT_MANAGER_CSI_DOCKER_IMAGE="quay.io/jetstack/cert-manager-csi-driver" CERT_MANAGER_CSI_DOCKER_TAG="canary" -echo "Building cert-manager-csi container" +echo "Building cert-manager-csi-driver container" docker build -t "$CERT_MANAGER_CSI_DOCKER_IMAGE:$CERT_MANAGER_CSI_DOCKER_TAG" . echo "Loading '$CERT_MANAGER_CSI_DOCKER_IMAGE:$CERT_MANAGER_CSI_DOCKER_TAG' image into kind cluster" kind load docker-image --name="$CLUSTER_NAME" "$CERT_MANAGER_CSI_DOCKER_IMAGE:$CERT_MANAGER_CSI_DOCKER_TAG" -echo "Deploying cert-manager-csi into test cluster" -./bin/helm upgrade --install -n cert-manager cert-manager-csi ./deploy/charts/csi-driver --set image.repository=$CERT_MANAGER_CSI_DOCKER_IMAGE --set image.tag=$CERT_MANAGER_CSI_DOCKER_TAG +echo "Deploying cert-manager-csi-driver into test cluster" +./bin/helm upgrade --install -n cert-manager cert-manager-csi-driver ./deploy/charts/csi-driver --set image.repository=$CERT_MANAGER_CSI_DOCKER_IMAGE --set image.tag=$CERT_MANAGER_CSI_DOCKER_TAG echo "Waiting 30s to allow Deployment & DaemonSet controllers to create pods" sleep 30