Skip to content

Commit ad403e8

Browse files
Update README and make deployments consistent (#116)
* Updated manifests/examples and README Set ubuntu24 as os for travis * update readme as per review comments
1 parent bcce778 commit ad403e8

File tree

77 files changed

+515
-2100
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+515
-2100
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ go:
44
- "1.23.10"
55
- tip
66
group: bluezone
7+
os: linux
8+
dist: noble
79

810
matrix:
911
fast_finish: true

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#FROM alpine:3.7
22
ARG PROXY_IMAGE_URL=blank
3-
FROM ubuntu:16.04
3+
FROM ubuntu:24.04
44

55
# Default values
66
ARG git_commit_id=unknown

Makefile

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2019 IBM Corp.
2+
# Copyright 2025 IBM Corp.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -25,12 +25,6 @@ GIT_REMOTE_URL="$(shell git config --get remote.origin.url 2>/dev/null)"
2525
BUILD_DATE="$(shell date -u +"%Y-%m-%dT%H:%M:%SZ")"
2626
OSS_FILES := go.mod Dockerfile
2727

28-
# Search for Client Arch, adjust for docker and podman differences
29-
# https://github.com/docker/cli/blob/master/cli/command/system/version.go#L32
30-
# https://github.com/containers/podman/blob/main/cmd/podman/system/version.go#L100
31-
# ARCH=$(shell docker version -f {{.Client.Arch}})
32-
ARCH=$(shell docker version -f {{.Client.Arch}} || docker version -f {{.Client.OsArch}} | xargs basename)
33-
3428
# Jenkins vars. Set to `unknown` if the variable is not yet defined
3529
BUILD_NUMBER?=unknown
3630
GO111MODULE_FLAG?=on
@@ -50,7 +44,6 @@ driver: deps buildimage
5044
.PHONY: deps
5145
deps:
5246
echo "Installing dependencies ..."
53-
#glide install --strip-vendor
5447
go mod download
5548
go get github.com/pierrre/gotestcover
5649
go install github.com/pierrre/gotestcover
@@ -74,9 +67,9 @@ lint:
7467
# Repository does not contain vendor/modules.txt file so re-build with go mod vendor
7568
.PHONY: build
7669
build:
77-
CGO_ENABLED=0 GOOS=$(shell go env GOOS) GOARCH=$(shell go env GOARCH) \
70+
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
7871
go mod vendor
79-
CGO_ENABLED=0 GOOS=$(shell go env GOOS) GOARCH=$(shell go env GOARCH) \
72+
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
8073
go build -mod=vendor -a \
8174
-ldflags '-X main.vendorVersion='"${DRIVER_NAME}-${GIT_COMMIT_SHA}"' -extldflags "-static"' \
8275
-o ${GOPATH}/bin/${EXE_DRIVER_NAME} \
@@ -105,10 +98,7 @@ buildimage: build-systemutil
10598
--build-arg jenkins_build_number=${BUILD_NUMBER} \
10699
--build-arg REPO_SOURCE_URL=${REPO_SOURCE_URL} \
107100
--build-arg BUILD_URL=${BUILD_URL} \
108-
-t $(IMAGE):$(VERSION)-$(ARCH) -f Dockerfile .
109-
ifeq ($(ARCH), amd64)
110-
docker tag $(IMAGE):$(VERSION)-$(ARCH) $(IMAGE):$(VERSION)
111-
endif
101+
-t $(IMAGE):$(VERSION)-amd64 -f Dockerfile .
112102

113103
.PHONY: build-systemutil
114104
build-systemutil:
@@ -124,26 +114,3 @@ test-sanity: deps fmt
124114
clean:
125115
rm -rf ${EXE_DRIVER_NAME}
126116
rm -rf $(GOPATH)/bin/${EXE_DRIVER_NAME}
127-
128-
.PHONY: runanalyzedeps
129-
runanalyzedeps:
130-
@docker build --rm --build-arg ARTIFACTORY_API_KEY="${ARTIFACTORY_API_KEY}" -t armada/analyze-deps -f Dockerfile.dependencycheck .
131-
docker run -v `pwd`/dependency-check:/results armada/analyze-deps
132-
133-
.PHONY: analyzedeps
134-
analyzedeps:
135-
/tmp/dependency-check/bin/dependency-check.sh --enableExperimental --log /results/logfile --out /results --disableAssembly \
136-
--suppress /src/dependency-check/suppression-file.xml --format JSON --prettyPrint --failOnCVSS 0 --scan /src
137-
138-
.PHONY: showanalyzedeps
139-
showanalyzedeps:
140-
grep "VULNERABILITY FOUND" dependency-check/logfile;
141-
cat dependency-check/dependency-check-report.json |jq '.dependencies[] | select(.vulnerabilities | length>0)';
142-
143-
.PHONY: updatebaseline
144-
updatebaseline:
145-
detect-secrets scan --update .secrets.baseline --all-files --exclude-files go.sum --db2-scan
146-
147-
.PHONY: auditbaseline
148-
auditbaseline:
149-
detect-secrets audit .secrets.baseline

README.md

Lines changed: 126 additions & 542 deletions
Large diffs are not rendered by default.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
# delete VPC file volume CSI Driver to the IKS cluster
4+
5+
set -o nounset
6+
set -o errexit
7+
#set -x
8+
9+
# Get directory of this script
10+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
11+
12+
# Call setup-kustomize.sh relative to this script
13+
"${SCRIPT_DIR}/setup-kustomize.sh"
14+
15+
# Check for arguments
16+
if [ $# != 1 ]; then
17+
echo "This will delete 'dev' version of vpc csi driver!"
18+
else
19+
readonly IKS_VPC_FILE_DRIVER_VERSION=$1
20+
echo "This will delete '${IKS_VPC_FILE_DRIVER_VERSION}' manifests of vpc csi driver!"
21+
fi
22+
23+
readonly VERSION="${IKS_VPC_FILE_DRIVER_VERSION:-dev}"
24+
readonly PKG_DIR="${GOPATH}/src/github.com/IBM/ibm-vpc-file-csi-driver"
25+
26+
kustomize build ${PKG_DIR}/deploy/kubernetes/driver/kubernetes/overlays/${VERSION} | kubectl delete --ignore-not-found -f -
27+
kubectl delete -f "${PWD}"/storageclass
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
# Installing VPC file volume CSI Driver to the IKS cluster
4+
5+
set -o nounset
6+
set -o errexit
7+
8+
# Get directory of this script
9+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
10+
11+
# Call setup-kustomize.sh relative to this script
12+
"${SCRIPT_DIR}/scripts/setup-kustomize.sh"
13+
14+
# Check if the storage-secret-store exists in the kube-system namespace
15+
"${SCRIPT_DIR}/scripts/verify-storage-secret-store.sh"
16+
17+
# Check for arguments
18+
if [ $# != 1 ]; then
19+
echo "This will install 'development' version of vpc csi driver!"
20+
else
21+
readonly IKS_VPC_FILE_DRIVER_VERSION=$1
22+
echo "This will install '${IKS_VPC_FILE_DRIVER_VERSION}' manifests of vpc file csi driver!"
23+
fi
24+
25+
readonly VERSION="${IKS_VPC_FILE_DRIVER_VERSION:-dev}"
26+
27+
# Run kustomize from the script's overlay path
28+
kustomize build "${SCRIPT_DIR}/overlays/${VERSION}" | kubectl apply -f -
29+
30+
# Apply storageclass from same base dir
31+
kubectl apply -f "${SCRIPT_DIR}/storageclass"

deploy/kubernetes/driver/kubernetes/README.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

deploy/kubernetes/driver/kubernetes/delete-vpc-csi-driver.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

deploy/kubernetes/driver/kubernetes/deploy-vpc-file-driver.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

deploy/kubernetes/driver/kubernetes/manifests/config-map.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)