File tree 7 files changed +13
-15
lines changed
7 files changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,11 @@ RUN CGO_ENABLED=0 go get -ldflags "-s -w -extldflags '-static'" github.com/go-de
20
20
RUN GCE_PD_CSI_DEBUG=1 make gce-pd-driver
21
21
22
22
# MAD HACKS: Build a version first so we can take the scsi_id bin and put it somewhere else in our real build
23
- FROM k8s.gcr.io/build-image/debian-base-amd64:v2.1.3 as base
23
+ FROM k8s.gcr.io/build-image/debian-base-amd64:buster-v1.5.0 as mad-hack
24
24
RUN clean-install udev
25
25
26
26
# Start from Kubernetes Debian base
27
- FROM k8s.gcr.io/build-image/debian-base-amd64:v2.1.3
27
+ FROM k8s.gcr.io/build-image/debian-base-amd64:buster-v1.5.0
28
28
29
29
# Copy source code too to correlate the binary and the breakpoints
30
30
WORKDIR /go/src/sigs.k8s.io/gcp-compute-persistent-disk-csi-driver
@@ -34,7 +34,7 @@ COPY --from=builder /go/bin/dlv /go/bin/dlv
34
34
35
35
# Install necessary dependencies
36
36
RUN clean-install util-linux e2fsprogs mount ca-certificates udev xfsprogs
37
- COPY --from=base /lib/udev/scsi_id /lib/udev_containerized/scsi_id
37
+ COPY --from=mad-hack /lib/udev/scsi_id /lib/udev_containerized/scsi_id
38
38
39
39
# PDCSI driver isn't copied to / because of delve not being able to correlate
40
40
# the binary and the source code, instead just run the binary where it was
Original file line number Diff line number Diff line change @@ -40,9 +40,6 @@ BASE_IMAGE_20H2=mcr.microsoft.com/windows/servercore:20H2
40
40
# Both arrays MUST be index aligned.
41
41
WINDOWS_IMAGE_TAGS =ltsc2019 1909 2004 20H2
42
42
WINDOWS_BASE_IMAGES =$(BASE_IMAGE_LTSC2019 ) $(BASE_IMAGE_1909 ) $(BASE_IMAGE_2004 ) $(BASE_IMAGE_20H2 )
43
- # Development only
44
- WINDOWS_IMAGE_TAGS_DEV =ltsc2019
45
- WINDOWS_BASE_IMAGES_DEV =$(BASE_IMAGE_LTSC2019 )
46
43
47
44
all : gce-pd-driver gce-pd-driver-windows
48
45
gce-pd-driver :
@@ -85,9 +82,9 @@ build-and-push-multi-arch: build-and-push-container-linux build-and-push-windows
85
82
STAGINGIMAGE=" $( STAGINGIMAGE) " STAGINGVERSION=" $( STAGINGVERSION) " WINDOWS_IMAGE_TAGS=" $( WINDOWS_IMAGE_TAGS) " WINDOWS_BASE_IMAGES=" $( WINDOWS_BASE_IMAGES) " ./manifest_osversion.sh
86
83
$(DOCKER ) manifest push -p $(STAGINGIMAGE ) :$(STAGINGVERSION )
87
84
88
- build-and-push-multi-arch-dev : build-and-push-container-linux-debug build-and-push-windows-container-ltsc2019
85
+ build-and-push-multi-arch-debug : build-and-push-container-linux-debug build-and-push-windows-container-ltsc2019
89
86
$(DOCKER ) manifest create --amend $(STAGINGIMAGE ) :$(STAGINGVERSION ) $(STAGINGIMAGE ) :$(STAGINGVERSION ) _linux $(STAGINGIMAGE ) :$(STAGINGVERSION ) _ltsc2019
90
- STAGINGIMAGE=" $( STAGINGIMAGE) " STAGINGVERSION=" $( STAGINGVERSION) " WINDOWS_IMAGE_TAGS=" $( WINDOWS_IMAGE_TAGS_DEV ) " WINDOWS_BASE_IMAGES=" $( WINDOWS_BASE_IMAGES_DEV ) " ./manifest_osversion.sh
87
+ STAGINGIMAGE=" $( STAGINGIMAGE) " STAGINGVERSION=" $( STAGINGVERSION) " WINDOWS_IMAGE_TAGS=" ltsc2019 " WINDOWS_BASE_IMAGES=" $( BASE_IMAGE_LTSC2019 ) " ./manifest_osversion.sh
91
88
$(DOCKER ) manifest push -p $(STAGINGIMAGE ) :$(STAGINGVERSION )
92
89
93
90
push-container : build-container
Original file line number Diff line number Diff line change @@ -16,8 +16,9 @@ The current structure for kustomization is as follows. Note that Windows support
16
16
* ` overlays ` : It has the k8s minor version-specific driver manifest bundle.
17
17
* ` stable-master ` : Contains deployment specs of a stable driver for k8s master.
18
18
* ` stable-{k8s-minor} ` : Contains deployment specs of a stable driver for given k8s minor version release.
19
- * ` alpha ` : Contains deployment specs for features in development. Both Linux and Windows are supported.
19
+ * ` alpha ` : Contains deployment specs for features in development. Both Linux and Windows are supported.
20
20
* ` dev ` : Based on alpha, and also contains the developer's specs for use in driver development.
21
+ * ` noauth-debug ` : Based on alpha, used for debugging purposes only, see docs/kubernetes/development.md.
21
22
* ` prow-gke-release-staging-rc-master ` : Used for prow tests. Contains deployment specs of a driver for latest k8s master.
22
23
* ` prow-gke-release-staging-rc-{k8s-minor} ` : Used for prow tests. Contains deployment specs of a driver for given k8s minor version release.
23
24
* ` prow-gke-release-staging-rc-head ` : Used for prow tests. Contains deployment specs of a driver with latest sidecar images, for latest k8s master.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -21,24 +21,24 @@ $ ./deploy/kubernetes/delete-driver.sh
21
21
22
22
## Debugging
23
23
24
- We use https://github.com/go-delve/delve and its remote debugging feature for debugging, this feature
25
- is only available in the PD CSI Controller (which runs in a linux node)
24
+ We use https://github.com/go-delve/delve and its feature for remote debugging. This feature
25
+ is only available in the PD CSI Controller (which runs in a linux node).
26
26
27
27
Requirements:
28
28
29
29
- https://github.com/go-delve/delve
30
30
31
31
Steps:
32
32
33
- - Build the PD CSI driver with additional compiler flags
33
+ - Build the PD CSI driver with additional compiler flags.
34
34
35
35
```
36
36
export GCE_PD_CSI_STAGING_VERSION=latest
37
37
export GCE_PD_CSI_STAGING_IMAGE=image/repo/gcp-compute-persistent-disk-csi-driver
38
- make build-and-push-multi-arch-dev
38
+ make build-and-push-multi-arch-debug
39
39
```
40
40
41
- - Update ` deploy/kubernetes/overlays/noauth-dev /kustomization.yaml ` to match the repo you wrote above e.g.
41
+ - Update ` deploy/kubernetes/overlays/noauth-debug /kustomization.yaml ` to match the repo you wrote above e.g.
42
42
43
43
``` yaml
44
44
images :
@@ -51,7 +51,7 @@ images:
51
51
52
52
` ` ` sh
53
53
./deploy/kubernetes/delete-driver.sh && \
54
- GCE_PD_DRIVER_VERSION=noauth-dev ./deploy/kubernetes/deploy-driver.sh
54
+ GCE_PD_DRIVER_VERSION=noauth-debug ./deploy/kubernetes/deploy-driver.sh
55
55
```
56
56
57
57
At this point you could verify that delve is running in the controller logs:
You can’t perform that action at this time.
0 commit comments