Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase to upstream v1.30.1 and prepare release v1.4.0 #49

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .github/workflows/build-container-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:
packages: write
steps:
- name: Check out repository
uses: actions/checkout@v3.1.0
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v3.4.0
uses: actions/setup-go@v5
with:
go-version: "1.21.1"
go-version: '1.22'

- name: Set up Docker Buildx
id: docker-setup
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
with:
check_filenames: true
skip: ./.git,./.github/workflows/codespell.yml,.git,*.png,*.jpg,*.svg,*.sum,./vendor,go.sum,crd-csi-snapshot-ga.yaml,crd-csi-snapshot.yaml
ignore_words_list: "AKS,aks,ro"
ignore_words_list: "AKS,aks,ro,accend"
9 changes: 4 additions & 5 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: "1.21.1"
go-version: '1.22'
id: go

- name: Install Dependencies
run: sudo apt-get update && sudo apt-get install -y libcryptsetup-dev

- name: Build Test
run: |
go test -covermode=count -coverprofile=profile.cov ./pkg/...
run: go test -race -covermode=atomic -coverprofile=profile.cov ./pkg/...
11 changes: 4 additions & 7 deletions .github/workflows/static.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: "1.21.1"
go-version: '1.22'

- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -22,9 +22,6 @@ jobs:
run: sudo apt-get update && sudo apt-get -y install libcryptsetup-dev

- name: Run linter
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
version: v1.51
skip-pkg-cache: true
skip-build-cache: true
args: -E=gofmt,deadcode,unused,varcheck,ineffassign,revive,misspell,exportloopref,asciicheck,bodyclose,depguard,dogsled,durationcheck,errname,forbidigo -D=staticcheck --timeout=30m0s
version: v1.54
4 changes: 2 additions & 2 deletions .github/workflows/trivy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: "1.21.1"
go-version: '1.22'
id: go

- name: Checkout code
Expand Down
29 changes: 27 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,34 @@
run:
deadline: 10m
deadline: 30m

linters:
disable:
- typecheck
- structcheck
- staticcheck
enable:
- golint
- gofmt
- unused
- ineffassign
- revive
- misspell
- exportloopref
- asciicheck
- bodyclose
- depguard
- dogsled
- durationcheck
- errname
- forbidigo
linters-settings:
depguard:
rules:
main:
files:
- $all
- "!$test"
allow:
- $gostd
- k8s.io
- sigs.k8s.io
- github.com
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM debian:bullseye AS build
FROM debian:bookworm AS build

ENV DEBIAN_FRONTEND="noninteractive"
RUN apt-get update && apt-get install -y build-essential git wget pkg-config libcryptsetup12 libcryptsetup-dev
ARG GO_VER=1.21.1
ARG GO_VER=1.22.4
RUN wget https://go.dev/dl/go${GO_VER}.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go${GO_VER}.linux-amd64.tar.gz && \
rm go${GO_VER}.linux-amd64.tar.gz
Expand Down
10 changes: 1 addition & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ REGISTRY_NAME ?= $(shell echo $(REGISTRY) | sed "s/.azurecr.io//g")
IMAGE_NAME ?= constellation/azure-csi-driver
ifneq ($(BUILD_V2), true)
PLUGIN_NAME = azurediskplugin
IMAGE_VERSION ?= v1.3.0
IMAGE_VERSION ?= v1.4.0
CHART_VERSION ?= latest
else
PLUGIN_NAME = azurediskpluginv2
Expand Down Expand Up @@ -129,14 +129,6 @@ sanity-test: azuredisk
sanity-test-v2: azuredisk-v2
go test -v -timeout=30m ./test/sanity --temp-use-driver-v2

.PHONY: integration-test
integration-test: azuredisk
go test -v -timeout=30m ./test/integration

.PHONY: integration-test-v2
integration-test-v2: azuredisk-v2
go test -v -timeout=30m ./test/integration --temp-use-driver-v2

.PHONY: e2e-bootstrap
e2e-bootstrap: install-helm
ifdef WINDOWS_USE_HOST_PROCESS_CONTAINERS
Expand Down
16 changes: 8 additions & 8 deletions charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ helm repo update azuredisk-csi-driver
### install a specific version

```console
helm install azuredisk-csi-driver azuredisk-csi-driver/azuredisk-csi-driver --namespace kube-system --version v1.29.0
helm install azuredisk-csi-driver azuredisk-csi-driver/azuredisk-csi-driver --namespace kube-system --version v1.29.2
```

### install on Azure Stack
Expand Down Expand Up @@ -131,19 +131,19 @@ The following table lists the configurable parameters of the latest Azure Disk C
| `image.azuredisk.tag` | azuredisk-csi-driver docker image tag | `` |
| `image.azuredisk.pullPolicy` | azuredisk-csi-driver image pull policy | `IfNotPresent` |
| `image.csiProvisioner.repository` | csi-provisioner docker image | `/oss/kubernetes-csi/csi-provisioner` |
| `image.csiProvisioner.tag` | csi-provisioner docker image tag | `v3.5.0` |
| `image.csiProvisioner.tag` | csi-provisioner docker image tag | `v4.0.0` |
| `image.csiProvisioner.pullPolicy` | csi-provisioner image pull policy | `IfNotPresent` |
| `image.csiAttacher.repository` | csi-attacher docker image | `/oss/kubernetes-csi/csi-attacher` |
| `image.csiAttacher.tag` | csi-attacher docker image tag | `v4.3.0` |
| `image.csiAttacher.tag` | csi-attacher docker image tag | `v4.5.0` |
| `image.csiAttacher.pullPolicy` | csi-attacher image pull policy | `IfNotPresent` |
| `image.csiResizer.repository` | csi-resizer docker image | `/oss/kubernetes-csi/csi-resizer` |
| `image.csiResizer.tag` | csi-resizer docker image tag | `v1.8.0` |
| `image.csiResizer.tag` | csi-resizer docker image tag | `v1.9.3` |
| `image.csiResizer.pullPolicy` | csi-resizer image pull policy | `IfNotPresent` |
| `image.livenessProbe.repository` | liveness-probe docker image | `/oss/kubernetes-csi/livenessprobe` |
| `image.livenessProbe.tag` | liveness-probe docker image tag | `v2.10.0` |
| `image.livenessProbe.tag` | liveness-probe docker image tag | `v2.12.0` |
| `image.livenessProbe.pullPolicy` | liveness-probe image pull policy | `IfNotPresent` |
| `image.nodeDriverRegistrar.repository` | csi-node-driver-registrar docker image | `/oss/kubernetes-csi/csi-node-driver-registrar` |
| `image.nodeDriverRegistrar.tag` | csi-node-driver-registrar docker image tag | `v2.8.0` |
| `image.nodeDriverRegistrar.tag` | csi-node-driver-registrar docker image tag | `v2.10.0` |
| `image.nodeDriverRegistrar.pullPolicy` | csi-node-driver-registrar image pull policy | `IfNotPresent` |
| `imagePullSecrets` | Specify docker-registry secret names as an array | [] (does not add image pull secrets to deployed pods) | |
| `serviceAccount.create` | whether create service account of csi-azuredisk-controller, csi-azuredisk-node, and snapshot-controller| `true` |
Expand Down Expand Up @@ -205,10 +205,10 @@ The following table lists the configurable parameters of the latest Azure Disk C
| `node.logLevel` | node driver log level |`5` |
| `snapshot.enabled` | whether enable snapshot feature | `false` |
| `snapshot.image.csiSnapshotter.repository` | csi-snapshotter docker image | `/oss/kubernetes-csi/csi-snapshotter` |
| `snapshot.image.csiSnapshotter.tag` | csi-snapshotter docker image tag | `v6.2.2` |
| `snapshot.image.csiSnapshotter.tag` | csi-snapshotter docker image tag | `v6.3.3` |
| `snapshot.image.csiSnapshotter.pullPolicy` | csi-snapshotter image pull policy | `IfNotPresent` |
| `snapshot.image.csiSnapshotController.repository` | snapshot-controller docker image | `/oss/kubernetes-csi/snapshot-controller` |
| `snapshot.image.csiSnapshotController.tag` | snapshot-controller docker image tag | `v6.2.2` |
| `snapshot.image.csiSnapshotController.tag` | snapshot-controller docker image tag | `v6.3.3` |
| `snapshot.image.csiSnapshotController.pullPolicy` | snapshot-controller image pull policy | `IfNotPresent` |
| `snapshot.snapshotController.name` | snapshot controller name | `csi-snapshot-controller` |
| `snapshot.snapshotController.replicas` | the replicas of snapshot-controller | `2` |
Expand Down
4 changes: 4 additions & 0 deletions charts/artifacthub-repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
repositoryID: 80d41cba-2a79-4d87-a985-7a438993aff5
owners:
- name: andyzhangx
email: [email protected]
4 changes: 2 additions & 2 deletions charts/edgeless/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
appVersion: "v1.3.0"
appVersion: "v1.4.0"
description: Azure disk Container Storage Interface (CSI) Storage Plugin with on-node encryption support
name: azuredisk-csi-driver
version: v1.3.0
version: v1.4.0
22 changes: 19 additions & 3 deletions charts/edgeless/templates/csi-azuredisk-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ spec:
- "-leader-election"
- "--leader-election-namespace={{ .Release.Namespace }}"
- "-v=2"
- "--timeout=1200s"
env:
- name: ADDRESS
value: /csi/csi.sock
Expand Down Expand Up @@ -157,7 +158,11 @@ spec:
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
{{- if eq .Values.controller.hostNetwork true }}
- --http-endpoint=localhost:{{ .Values.controller.livenessProbe.healthPort }}
{{- else }}
- --health-port={{ .Values.controller.livenessProbe.healthPort }}
{{- end }}
- --v=2
volumeMounts:
- name: socket-dir
Expand Down Expand Up @@ -197,18 +202,29 @@ spec:
- "--enable-traffic-manager={{ .Values.controller.enableTrafficManager }}"
- "--traffic-manager-port={{ .Values.controller.trafficManagerPort }}"
- "--enable-otel-tracing={{ .Values.controller.otelTracing.enabled }}"
- "--check-disk-lun-collision=true"
{{- range $value := .Values.controller.extraArgs }}
- {{ $value | quote }}
{{- end }}
ports:
- containerPort: {{ .Values.controller.livenessProbe.healthPort }}
name: healthz
protocol: TCP
- containerPort: {{ .Values.controller.metricsPort }}
name: metrics
protocol: TCP
{{- if ne .Values.controller.hostNetwork true }}
- containerPort: {{ .Values.controller.livenessProbe.healthPort }}
name: healthz
protocol: TCP
{{- end }}
livenessProbe:
failureThreshold: 5
httpGet:
path: /healthz
{{- if eq .Values.controller.hostNetwork true }}
host: localhost
port: {{ .Values.controller.livenessProbe.healthPort }}
{{- else }}
port: healthz
{{- end }}
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 30
Expand Down
11 changes: 11 additions & 0 deletions charts/edgeless/templates/csi-azuredisk-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ spec:
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
{{- if eq .Values.linux.hostNetwork true }}
- --http-endpoint=localhost:{{ .Values.node.livenessProbe.healthPort }}
{{- else }}
- --health-port={{ .Values.node.livenessProbe.healthPort }}
{{- end }}
- --v=2
resources: {{- toYaml .Values.linux.resources.livenessProbe | nindent 12 }}
- name: node-driver-registrar
Expand Down Expand Up @@ -131,15 +135,22 @@ spec:
- "--get-nodeid-from-imds={{ .Values.node.getNodeIDFromIMDS }}"
- "--enable-otel-tracing={{ .Values.linux.otelTracing.enabled }}"
- "--kms-addr={{ .Values.global.keyServiceName }}.{{ .Values.global.keyServiceNamespace | default .Release.Namespace }}:{{ .Values.global.keyServicePort }}"
{{- if ne .Values.linux.hostNetwork true }}
ports:
- containerPort: {{ .Values.node.livenessProbe.healthPort }}
name: healthz
protocol: TCP
{{- end }}
livenessProbe:
failureThreshold: 5
httpGet:
path: /healthz
{{- if eq .Values.linux.hostNetwork true }}
host: localhost
port: {{ .Values.node.livenessProbe.healthPort }}
{{- else }}
port: healthz
{{- end }}
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 30
Expand Down
16 changes: 8 additions & 8 deletions charts/edgeless/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@ image:
baseRepo: mcr.microsoft.com
azuredisk:
repository: ghcr.io/edgelesssys/constellation/azure-csi-driver
tag: v1.3.0@sha256:1e798f066ef78c293c4c87a31677f8948be4c8709980135969b73a9d7a46ca71
tag: v1.4.0 #@sha256:1e798f066ef78c293c4c87a31677f8948be4c8709980135969b73a9d7a46ca71
pullPolicy: IfNotPresent
csiProvisioner:
repository: /oss/kubernetes-csi/csi-provisioner
tag: v3.5.0@sha256:fdf70099aa1538d1c2164976cf6d158ef8b3a5ee63db10bf0085de4ec66f59b4
tag: v4.0.0@sha256:beadfb2cfa02f8bbb2efd88261a673023527cf51ebe7894daef82c4d928264a5
pullPolicy: IfNotPresent
csiAttacher:
repository: /oss/kubernetes-csi/csi-attacher
tag: v4.3.0@sha256:4306b80bfe8caea3fe53f6d1c15807c745be3072553ff508fc4f61da8f4a0c10
tag: v4.5.0@sha256:172a9140780701b2223b7296729fc6cc3be8c86d0cfd2d0452e495f5ea28f51f
pullPolicy: IfNotPresent
csiResizer:
repository: /oss/kubernetes-csi/csi-resizer
tag: v1.8.0@sha256:6f0e8c9f3d0bdcf7a5fb5e404276ffac624033099d7687c8080692bcb6d13cd1
tag: v1.9.3@sha256:e20dc798f529436d2c861dd66bc7fcfa17623b562a2a65474aab38fb77c9824a
pullPolicy: IfNotPresent
livenessProbe:
repository: /oss/kubernetes-csi/livenessprobe
tag: v2.10.0@sha256:3aeac313cffdb7db80b733539427f2533a3f662bf538e7b6434b0f898ceb701b
tag: v2.12.0@sha256:c762188c45d1b9bc9144b694b85313d5e49c741935a81d5b94fd7db978a40ae1
pullPolicy: IfNotPresent
nodeDriverRegistrar:
repository: /oss/kubernetes-csi/csi-node-driver-registrar
tag: v2.8.0@sha256:af6bf1b5ff310d4dc02cf8276be9b06014318f7ee31238b5fa278febd1a10ca9
tag: v2.10.0@sha256:136e3a4a5897f111d1dedd404a5717ee7ff2f215e5fe878abdf4ce00c2292280
pullPolicy: IfNotPresent

serviceAccount:
Expand Down Expand Up @@ -140,11 +140,11 @@ snapshot:
image:
csiSnapshotter:
repository: /oss/kubernetes-csi/csi-snapshotter
tag: v6.2.2
tag: v6.3.3
pullPolicy: IfNotPresent
csiSnapshotController:
repository: /oss/kubernetes-csi/snapshot-controller
tag: v6.2.2
tag: v6.3.3
pullPolicy: IfNotPresent
snapshotController:
name: csi-snapshot-controller
Expand Down
Loading
Loading