Skip to content

Commit

Permalink
rebase to [email protected] (#6)
Browse files Browse the repository at this point in the history
Signed-off-by: Moritz Sanft <[email protected]>
  • Loading branch information
msanft authored Nov 28, 2023
1 parent b598a68 commit 4eeb02f
Show file tree
Hide file tree
Showing 121 changed files with 45,293 additions and 2,433 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/dependency-review.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4

- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
51 changes: 51 additions & 0 deletions .github/workflows/generate-code-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Generate Code Coverage
on: [pull_request]

jobs:
cover-base:
name: Generate Base Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout base
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.ref }}

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'

- name: Generate report
run: |
go test -coverprofile base-coverage.tmp ./cmd/... ./pkg/...
cat base-coverage.tmp | grep -v "mock_" > base-coverage.out
- name: Upload report
uses: actions/upload-artifact@v3
with:
name: base-coverage
path: base-coverage.out

cover-pr:
name: Generate PR Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'

- name: Generate report
run: |
go test -coverprofile pr-coverage.tmp ./cmd/... ./pkg/...
cat pr-coverage.tmp | grep -v "mock_" > pr-coverage.out
- name: Upload report
uses: actions/upload-artifact@v3
with:
name: pr-coverage
path: pr-coverage.out
20 changes: 20 additions & 0 deletions .github/workflows/govulncheck.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 'govulncheck'
on: [pull_request]

jobs:
govulncheck:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'

- name: 'Run govulncheck'
uses: golang/govulncheck-action@v1
with:
go-version-file: 'go.mod'
check-latest: true
71 changes: 71 additions & 0 deletions .github/workflows/output-code-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Output Code Coverage
on:
workflow_run:
workflows: [Generate Code Coverage]
types: [completed]

jobs:
output-code-coverage:
name: Output Code Coverage
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#using-data-from-the-triggering-workflow
- name: 'Download reports'
uses: actions/github-script@v6
with:
script: |
let fs = require('fs');
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id,
});
for (const artifact of allArtifacts.data.artifacts) {
let download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: artifact.id,
archive_format: 'zip',
});
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/${artifact.id}.zip`, Buffer.from(download.data));
}
- name: 'Determine source PR'
uses: potiuk/get-workflow-origin@08219db9dbbbec802d571eaf0e14ece0bc005f72
id: source-run-info
with:
token: ${{ secrets.GITHUB_TOKEN }}
sourceRunId: ${{ github.event.workflow_run.id }}

- name: Set up go
uses: actions/setup-go@v4
with:
go-version: '^1.20.2'

- name: Install coverage tool
run: go install k8s.io/test-infra/robots/coverage@latest

- name: Generate comment
id: generate-comment
run: |
unzip \*.zip
echo 'comment<<EOF' >> $GITHUB_OUTPUT
echo '<!-- pr-coverage -->' >> $GITHUB_OUTPUT
echo '## Code Coverage Diff' >> $GITHUB_OUTPUT
COVERAGE_DIFF=$(coverage diff base-coverage.out pr-coverage.out | sed -e '1,5d')
if [[ -n "${COVERAGE_DIFF}" ]]; then
printf -- "%s\n" "${COVERAGE_DIFF}" >> $GITHUB_OUTPUT
else
echo 'This PR does not change the code coverage' >> $GITHUB_OUTPUT
fi
echo 'EOF' >> $GITHUB_OUTPUT
- name: Create or update comment
uses: edumserrano/find-create-or-update-comment@60a62b88d02efeb2c405e578d3a2b47ea0b230b1
with:
issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
body-includes: '<!-- pr-coverage -->'
comment-author: 'github-actions[bot]'
body: ${{ steps.generate-comment.outputs.comment }}
edit-mode: replace
36 changes: 32 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ OUTPUT_TYPE?=docker

OS?=linux
ARCH?=amd64
OSVERSION?=amazon
OSVERSION?=al2023

ALL_OS?=linux
ALL_ARCH_linux?=amd64 arm64
ALL_OSVERSION_linux?=amazon
ALL_OSVERSION_linux?=al2023
ALL_OS_ARCH_OSVERSION_linux=$(foreach arch, $(ALL_ARCH_linux), $(foreach osversion, ${ALL_OSVERSION_linux}, linux-$(arch)-${osversion}))

ALL_OS_ARCH_OSVERSION=$(foreach os, $(ALL_OS), ${ALL_OS_ARCH_OSVERSION_${os}})
Expand Down Expand Up @@ -97,7 +97,7 @@ create-manifest: all-image-registry
.PHONY: all-image-docker
all-image-docker: $(addprefix sub-image-docker-,$(ALL_OS_ARCH_OSVERSION_linux))
.PHONY: all-image-registry
all-image-registry: $(addprefix sub-image-registry-,$(ALL_OS_ARCH_OSVERSION))
all-image-registry: sub-image-registry-linux-arm64-al2 $(addprefix sub-image-registry-,$(ALL_OS_ARCH_OSVERSION))

sub-image-%:
$(MAKE) OUTPUT_TYPE=$(call word-hyphen,$*,1) OS=$(call word-hyphen,$*,2) ARCH=$(call word-hyphen,$*,3) OSVERSION=$(call word-hyphen,$*,4) image
Expand Down Expand Up @@ -191,6 +191,21 @@ test-e2e-external:
TEST_PATH=./tests/e2e-kubernetes/... \
GINKGO_FOCUS="External.Storage" \
GINKGO_SKIP="\[Disruptive\]|\[Serial\]" \
COLLECT_METRICS="true" \
./hack/e2e/run.sh

.PHONY: test-e2e-external-arm64
test-e2e-external-arm64:
AWS_REGION=us-west-2 \
AWS_AVAILABILITY_ZONES=us-west-2a,us-west-2b,us-west-2c \
HELM_EXTRA_FLAGS='--set=controller.k8sTagClusterId=$$CLUSTER_NAME' \
EBS_INSTALL_SNAPSHOT="true" \
TEST_PATH=./tests/e2e-kubernetes/... \
GINKGO_FOCUS="External.Storage" \
GINKGO_SKIP="\[Disruptive\]|\[Serial\]" \
INSTANCE_TYPE="m7g.medium" \
AMI_PARAMETER="/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-arm64" \
IMAGE_ARCH="arm64" \
./hack/e2e/run.sh

.PHONY: test-e2e-external-eks
Expand Down Expand Up @@ -223,6 +238,17 @@ test-e2e-external-eks-windows:
NODE_OS_DISTRO="windows" \
./hack/e2e/run.sh

.PHONY: test-e2e-external-kustomize
test-e2e-external-kustomize:
AWS_REGION=us-west-2 \
AWS_AVAILABILITY_ZONES=us-west-2a,us-west-2b,us-west-2c \
EBS_INSTALL_SNAPSHOT="true" \
TEST_PATH=./tests/e2e-kubernetes/... \
GINKGO_FOCUS="External.Storage" \
GINKGO_SKIP="\[Disruptive\]|\[Serial\]" \
DEPLOY_METHOD="kustomize" \
./hack/e2e/run.sh

.PHONY: test-helm-chart
test-helm-chart:
AWS_REGION=us-west-2 \
Expand Down Expand Up @@ -256,9 +282,11 @@ generate-kustomize: bin/helm
cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/clusterrolebinding-provisioner.yaml > ../../deploy/kubernetes/base/clusterrolebinding-provisioner.yaml
cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/clusterrolebinding-resizer.yaml > ../../deploy/kubernetes/base/clusterrolebinding-resizer.yaml
cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/clusterrolebinding-snapshotter.yaml > ../../deploy/kubernetes/base/clusterrolebinding-snapshotter.yaml
cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/controller.yaml --api-versions 'snapshot.storage.k8s.io/v1' | sed -e "/namespace: /d" > ../../deploy/kubernetes/base/controller.yaml
cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/controller.yaml --api-versions 'snapshot.storage.k8s.io/v1' --set 'controller.userAgentExtra=kustomize' | sed -e "/namespace: /d" > ../../deploy/kubernetes/base/controller.yaml
cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/csidriver.yaml > ../../deploy/kubernetes/base/csidriver.yaml
cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/node.yaml | sed -e "/namespace: /d" > ../../deploy/kubernetes/base/node.yaml
cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/poddisruptionbudget-controller.yaml --api-versions 'policy/v1/PodDisruptionBudget' | sed -e "/namespace: /d" > ../../deploy/kubernetes/base/poddisruptionbudget-controller.yaml
cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/serviceaccount-csi-controller.yaml | sed -e "/namespace: /d" > ../../deploy/kubernetes/base/serviceaccount-csi-controller.yaml
cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/serviceaccount-csi-node.yaml | sed -e "/namespace: /d" > ../../deploy/kubernetes/base/serviceaccount-csi-node.yaml
cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/role-leases.yaml | sed -e "/namespace: /d" > ../../deploy/kubernetes/base/role-leases.yaml
cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/rolebinding-leases.yaml | sed -e "/namespace: /d" > ../../deploy/kubernetes/base/rolebinding-leases.yaml
12 changes: 6 additions & 6 deletions OWNERS
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
approvers:
- AndyXiangLi
- AndrewSirenko
- bertinatto
- ConnorJC3
- gnufied
- gtxu
- hanyuel
- jsafrane
- leakingtapan
- rdpsin
- torredil
- wongma7
reviewers:
- ConnorJC3
emiritus_approvers:
- AndyXiangLi
- gtxu
- hanyuel
- rdpsin
reviewers:
- AndrewSirenko
- ConnorJC3
- torredil
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,29 @@ The [Amazon Elastic Block Store](https://aws.amazon.com/ebs/) Container Storage
* **NVMe Volumes** - Consume [NVMe](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nvme-ebs-volumes.html) volumes from EC2 [Nitro instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances).
* **Block Volumes** - Consume an EBS volume as a [raw block device](https://kubernetes-csi.github.io/docs/raw-block.html).
* **Volume Snapshots** - Create and restore [snapshots](https://kubernetes.io/docs/concepts/storage/volume-snapshots/) taken from a volume in Kubernetes.
* **Volume Resizing** - Expand the volume (both offline and online) by specifying a new size in the [PersistentVolumeClaim](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims) (PVC).
* **Volume Resizing** - Expand the volume by specifying a new size in the [PersistentVolumeClaim](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims) (PVC).

## Container Images

| Driver Version | [registry.k8s.io](https://kubernetes.io/blog/2022/11/28/registry-k8s-io-faster-cheaper-ga/) Image | [ECR Public](https://gallery.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver) Image |
|----------------|---------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|
| v1.18.0 | registry.k8s.io/provider-aws/aws-ebs-csi-driver:v1.18.0 | public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver:v1.18.0 |
| v1.24.1 | registry.k8s.io/provider-aws/aws-ebs-csi-driver:v1.24.1 | public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver:v1.24.1 |

<details>
<summary>Previous Images</summary>

| Driver Version | [registry.k8s.io](https://kubernetes.io/blog/2022/11/28/registry-k8s-io-faster-cheaper-ga/) Image | [ECR Public](https://gallery.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver) Image |
|----------------|---------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|
| v1.24.0 | registry.k8s.io/provider-aws/aws-ebs-csi-driver:v1.24.0 | public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver:v1.24.0 |
| v1.23.2 | registry.k8s.io/provider-aws/aws-ebs-csi-driver:v1.23.2 | public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver:v1.23.2 |
| v1.23.1 | registry.k8s.io/provider-aws/aws-ebs-csi-driver:v1.23.1 | public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver:v1.23.1 |
| v1.23.0 | registry.k8s.io/provider-aws/aws-ebs-csi-driver:v1.23.0 | public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver:v1.23.0 |
| v1.22.1 | registry.k8s.io/provider-aws/aws-ebs-csi-driver:v1.22.1 | public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver:v1.22.1 |
| v1.22.0 | registry.k8s.io/provider-aws/aws-ebs-csi-driver:v1.22.0 | public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver:v1.22.0 |
| v1.21.0 | registry.k8s.io/provider-aws/aws-ebs-csi-driver:v1.21.0 | public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver:v1.21.0 |
| v1.20.0 | registry.k8s.io/provider-aws/aws-ebs-csi-driver:v1.20.0 | public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver:v1.20.0 |
| v1.19.0 | registry.k8s.io/provider-aws/aws-ebs-csi-driver:v1.19.0 | public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver:v1.19.0 |
| v1.18.0 | registry.k8s.io/provider-aws/aws-ebs-csi-driver:v1.18.0 | public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver:v1.18.0 |
| v1.17.0 | registry.k8s.io/provider-aws/aws-ebs-csi-driver:v1.17.0 | public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver:v1.17.0 |
| v1.16.1 | registry.k8s.io/provider-aws/aws-ebs-csi-driver:v1.16.1 | public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver:v1.16.1 |
| v1.16.0 | registry.k8s.io/provider-aws/aws-ebs-csi-driver:v1.16.0 | public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver:v1.16.0 |
Expand Down Expand Up @@ -90,5 +100,7 @@ The EBS CSI Driver is compatible with Kubernetes versions v1.17+ and implements
* [Driver Launch Options](docs/options.md)
* [StorageClass Parameters](docs/parameters.md)
* [Volume Tagging](docs/tagging.md)
* [Volume Modification](docs/modify-volume.md)
* [Kubernetes Examples](/examples/kubernetes)
* [Driver Uninstallation](docs/install.md#uninstalling-the-ebs-csi-driver)
* [Development and Contributing](CONTRIBUTING.md)
56 changes: 56 additions & 0 deletions charts/aws-ebs-csi-driver/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,61 @@
# Helm chart

## v2.24.1
* Bump driver version to `v1.24.1`
* Upgrade sidecar images

## v2.24.0
* Bump driver version to `v1.24.0`
* Add additionalClusterRoleRules to sidecar chart templates. ([#1757](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/1757), [@AndrewSirenko](https://github.com/AndrewSirenko))
* Allow passing template value for clusterName ([#1753](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/1753), [@monicastanciu](https://github.com/monicastanciu))
* Make hostNetwork configurable for daemonset ([#1716](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/1716), [@bseenu](https://github.com/bseenu))
* Add labels to volumesnapshotclass ([#1754](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/1754), [@fad3t](https://github.com/fad3t))
* Update default API version for PodDisruptionBudget ([#1751](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/1751), [@AndrewSirenko](https://github.com/AndrewSirenko))

## v2.23.2
* Bump driver version to `v1.23.2`
* Upgrade sidecar images

## v2.23.1
* Bump driver version to `v1.23.1`

## v2.23.0
* Add `node.enableLinux` parameter ([#1732](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/1732), [@monicastanciu](https://github.com/monicastanciu))
* Additional Node DaemonSets bug fixes ([#1739](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/1739), [@monicastanciu](https://github.com/monicastanciu))
* Additional DaemonSets feature ([#1722](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/1722), [@ConnorJC3](https://github.com/ConnorJC3))
* Add doc of chart value additionalArgs ([#1697](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/1697), [@zitudu](https://github.com/zitudu))

## v2.22.1
* Bump driver version to `v1.22.1`

## v2.22.0
* Default PodDisruptionBudget to policy/v1 ([#1707](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/1707), [@iNoahNothing](https://github.com/iNoahNothing))

## v2.21.0
* Bump driver version to `v1.21.0`
* Enable additional volume mounts on node pods ([#1670](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/1670), [@AndrewSirenko](https://github.com/AndrewSirenko))
* Enable customization of aws-secret name and keys in Helm Chart ([#1668](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/1668), [@AndrewSirenko](https://github.com/AndrewSirenko))
* The sidecars have been updated. The new versions are:
- csi-snapshotter: `v6.2.2`

## v2.20.0
* Bump driver version to `v1.20.0`
* Enable leader election in csi-resizer sidecar ([#1606](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/1606), [@rdpsin](https://github.com/rdpsin))
* Namespace-scoped leases permissions ([#1614](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/1614), [@torredil](https://github.com/torredil))
* Add additionalArgs parameter for sidecars ([#1627](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/1627), [@ConnorJC3](https://github.com/ConnorJC3))
* Avoid generating manifests with empty envFrom fields ([#1630](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/1630), [@mvgmb](https://github.com/mvgmb))
* Allow to set automountServiceAccountToken in ServiceAccount ([#1619](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/1619), [@kahirokunn](https://github.com/kahirokunn))

## v2.19.0
* Bump driver version to `v1.19.0`
* The sidecars have been updated. The new versions are:
- csi-provisioner: `v3.5.0`
- csi-attacher: `v4.3.0`
- livenessprobe: `v2.10.0`
- csi-resizer: `v1.8.0`
- node-driver-registrar: `v2.8.0`
* Remove CPU limits ([#1596](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/1596), [@torredil](https://github.com/torredil))

## v2.18.0
### Urgent Upgrade Notes
*(No, really, you MUST read this before you upgrade)*
Expand Down
Loading

0 comments on commit 4eeb02f

Please sign in to comment.