Skip to content

Update local development instructions #1081

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

Merged
merged 4 commits into from
Nov 17, 2022
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The following table captures the compatibility matrix of the core persistent dis
| dev | yes |

The manifest bundle which captures all the driver components (driver pod which includes the containers csi-provisioner, csi-resizer, csi-snapshotter, gce-pd-driver, csi-driver-registrar;
csi driver object, rbacs, pod security policies etc) can be picked up from the master branch [overlays](deploy/kubernetes/overlays) directory. We structure the overlays directory, per minor version of kubernetes because not all driver components can be used with all kubernetes versions.
csi driver object, rbacs, pod security policies etc) can be picked up from the master branch [overlays](deploy/kubernetes/overlays) directory. We structure the overlays directory, per minor version of kubernetes because not all driver components can be used with all kubernetes versions.

Example:

Expand Down Expand Up @@ -97,7 +97,7 @@ Controller-level and node-level deployments will both have priorityClassName set

## Further Documentation

[Local Development](docs/local-development.md)
[Local Development](docs/kubernetes/development.md)

For releasing new versions of this driver, googlers should consult [go/pdcsi-oss-release-process](go/pdcsi-oss-release-process).

Expand Down
2 changes: 1 addition & 1 deletion deploy/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function ensure_var(){

function get_needed_roles()
{
echo "roles/compute.storageAdmin roles/iam.serviceAccountUser projects/${PROJECT}/roles/gcp_compute_persistent_disk_csi_driver_custom_role"
echo "roles/editor roles/compute.storageAdmin roles/iam.serviceAccountUser projects/${PROJECT}/roles/gcp_compute_persistent_disk_csi_driver_custom_role"
}

# Installs kustomize in ${PKGDIR}/bin
Expand Down
44 changes: 44 additions & 0 deletions docs/kubernetes/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,50 @@ To bring down driver:
```
$ ./deploy/kubernetes/delete-driver.sh
```
## Testing

### E2E Tests:

#### One time setup

```console
$ export PROJECT=my-project # GCP Project to run tests in
$ export GCE_PD_SA_NAME=$PROJECT-pd-sa # Name of the service account to create
$ export GCE_PD_SA_DIR=/my/safe/credentials/directory # Directory to save the service account key
$ export ENABLE_KMS=false
$ ./deploy/setup-project.sh
```
#### Ongoing runs
```console
$ export PROJECT=my-project # GCP Project to run tests in
$ export GCE_PD_SA_NAME=$PROJECT-pd-sa
$ export IAM_NAME=$GCE_PD_SA_NAME@$PROJECT.iam.gserviceaccount.com # IAM SA that was set up in "one time setup"

$ ./test/run-e2e-local.sh
```

### Sanity Tests
> **_NOTE:_** Sanity tests are currently failing, tracked by https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/issues/990.

Sanity tests can be run from VS Code, etc directly or via the cmd line:
```
$ ./test/run-sanity.sh
```

### Unit Tests
Unit tests can be run from VS Code, etc directly or via the cmd line:
```
$ ./test/run-unit.sh
```

## Dependency Management

Use [dep](https://github.com/golang/dep)
```
$ dep ensure
```

To modify dependencies or versions change `./Gopkg.toml`

## Debugging

Expand Down
30 changes: 0 additions & 30 deletions docs/local-development.md

This file was deleted.