From eea03ea0f69958f61b1c59cef08771026219dc64 Mon Sep 17 00:00:00 2001 From: Zach Renner Date: Wed, 4 Sep 2024 18:43:26 +0000 Subject: [PATCH 1/3] feat: golang / dlv 1.23 support --- go/helper-image/Dockerfile | 4 +- go/helper-image/delve-as-options.patch | 41 ------------ go/skaffold.yaml | 28 ++++++++ go/test/k8s-test-go121.yaml | 89 ++++++++++++++++++++++++++ go/test/k8s-test-go122.yaml | 89 ++++++++++++++++++++++++++ go/test/k8s-test-go123.yaml | 89 ++++++++++++++++++++++++++ 6 files changed, 296 insertions(+), 44 deletions(-) delete mode 100644 go/helper-image/delve-as-options.patch create mode 100644 go/test/k8s-test-go121.yaml create mode 100644 go/test/k8s-test-go122.yaml create mode 100644 go/test/k8s-test-go123.yaml diff --git a/go/helper-image/Dockerfile b/go/helper-image/Dockerfile index e1bca021..ac0cb1b8 100644 --- a/go/helper-image/Dockerfile +++ b/go/helper-image/Dockerfile @@ -4,7 +4,7 @@ ARG BUILDPLATFORM ARG TARGETOS ARG TARGETARCH -ARG DELVE_VERSION=1.20.1 +ARG DELVE_VERSION=1.23.0 # Patch delve to make defaults for --check-go-version and --only-same-user # to be set at build time. We must install patch(1) to apply the patch. @@ -19,8 +19,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ RUN curl --location --output delve.tar.gz https://github.com/go-delve/delve/archive/v$DELVE_VERSION.tar.gz \ && tar xzf delve.tar.gz \ && mv delve-$DELVE_VERSION delve-source -COPY delve-*.patch . -RUN patch -p0 -d delve-source < delve-as-options.patch # Produce an as-static-as-possible dlv binary to work on musl and glibc RUN cd delve-source \ diff --git a/go/helper-image/delve-as-options.patch b/go/helper-image/delve-as-options.patch deleted file mode 100644 index 2405efe6..00000000 --- a/go/helper-image/delve-as-options.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff --git cmd/dlv/cmds/commands.go cmd/dlv/cmds/commands.go -index 15df5f6..f145330 100644 ---- cmd/dlv/cmds/commands.go -+++ cmd/dlv/cmds/commands.go -@@ -46,6 +46,10 @@ var ( - apiVersion int - // acceptMulti allows multiple clients to connect to the same server - acceptMulti bool -+ // checkGoVersionDefault sets default for --check-go-version -+ checkGoVersionDefault = "true" -+ // checkLocalConnUserDefault sets default for --only-same-user -+ checkLocalConnUserDefault = "true" - // addr is the debugging server listen address. - addr string - // initFile is the path to initialization file. -@@ -139,8 +143,8 @@ func New(docCall bool) *cobra.Command { - rootCommand.PersistentFlags().StringVar(&initFile, "init", "", "Init file, executed by the terminal client.") - rootCommand.PersistentFlags().StringVar(&buildFlags, "build-flags", buildFlagsDefault, "Build flags, to be passed to the compiler. For example: --build-flags=\"-tags=integration -mod=vendor -cover -v\"") - rootCommand.PersistentFlags().StringVar(&workingDir, "wd", "", "Working directory for running the program.") -- rootCommand.PersistentFlags().BoolVarP(&checkGoVersion, "check-go-version", "", true, "Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve.") -- rootCommand.PersistentFlags().BoolVarP(&checkLocalConnUser, "only-same-user", "", true, "Only connections from the same user that started this instance of Delve are allowed to connect.") -+ rootCommand.PersistentFlags().BoolVarP(&checkGoVersion, "check-go-version", "", parseBool(checkGoVersionDefault), "Exits if the version of Go in use is not compatible (too old or too new) with the version of Delve.") -+ rootCommand.PersistentFlags().BoolVarP(&checkLocalConnUser, "only-same-user", "", parseBool(checkLocalConnUserDefault), "Only connections from the same user that started this instance of Delve are allowed to connect.") - rootCommand.PersistentFlags().StringVar(&backend, "backend", "default", `Backend selection (see 'dlv help backend').`) - rootCommand.PersistentFlags().StringArrayVarP(&redirects, "redirect", "r", []string{}, "Specifies redirect rules for target process (see 'dlv help redirect')") - rootCommand.PersistentFlags().BoolVar(&allowNonTerminalInteractive, "allow-non-terminal-interactive", false, "Allows interactive sessions of Delve that don't have a terminal as stdin, stdout and stderr") -@@ -1020,3 +1024,14 @@ func parseRedirects(redirects []string) ([3]string, error) { - } - return r, nil - } -+ -+// parseBool parses a boolean value represented by a string, and panics if there is an error. -+// It is intended for boolean build-time constants that are set with 'go build -ldflags=-X xxx=bool' -+// and should only be a valid value. -+func parseBool(value string) bool { -+ b, err := strconv.ParseBool(value) -+ if err != nil { -+ panic(err) -+ } -+ return b -+} diff --git a/go/skaffold.yaml b/go/skaffold.yaml index bda83a79..26898f3a 100644 --- a/go/skaffold.yaml +++ b/go/skaffold.yaml @@ -62,12 +62,40 @@ profiles: docker: buildArgs: GOVERSION: '1.20' + - op: add + path: /build/artifacts/- + value: + image: go121app + context: test/goapp + docker: + buildArgs: + GOVERSION: '1.21' + - op: add + path: /build/artifacts/- + value: + image: go122app + context: test/goapp + docker: + buildArgs: + GOVERSION: '1.22' + - op: add + path: /build/artifacts/- + value: + image: go123app + context: test/goapp + docker: + buildArgs: + GOVERSION: '1.23' + deploy: kubectl: manifests: - test/k8s-test-go118.yaml - test/k8s-test-go119.yaml - test/k8s-test-go120.yaml + - test/k8s-test-go121.yaml + - test/k8s-test-go122.yaml + - test/k8s-test-go123.yaml # release: pushes images to production with :latest - name: release diff --git a/go/test/k8s-test-go121.yaml b/go/test/k8s-test-go121.yaml new file mode 100644 index 00000000..8f1fb2ad --- /dev/null +++ b/go/test/k8s-test-go121.yaml @@ -0,0 +1,89 @@ +# This test approximates `skaffold debug` for a go app. +apiVersion: v1 +kind: Pod +metadata: + name: go121pod + labels: + app: hello + protocol: dlv + runtime: go121 +spec: + containers: + - name: go121app + image: go121app + args: + - /dbg/go/bin/dlv + - exec + - --log + - --headless + - --continue + - --accept-multiclient + # listen on 0.0.0.0 as it is exposed as a service + - --listen=0.0.0.0:56286 + - --api-version=2 + - ./app + ports: + - containerPort: 8080 + - containerPort: 56286 + name: dlv + readinessProbe: + httpGet: + path: / + port: 8080 + volumeMounts: + - mountPath: /dbg + name: go-debugging-support + initContainers: + - image: skaffold-debug-go + name: install-go-support + resources: {} + volumeMounts: + - mountPath: /dbg + name: go-debugging-support + volumes: + - emptyDir: {} + name: go-debugging-support + +--- +apiVersion: v1 +kind: Service +metadata: + name: hello-dlv-go121 +spec: + ports: + - name: http + port: 8080 + protocol: TCP + - name: dlv + port: 56286 + protocol: TCP + selector: + app: hello + protocol: dlv + runtime: go121 + +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: connect-to-go121 + labels: + project: container-debug-support + type: integration-test +spec: + ttlSecondsAfterFinished: 10 + backoffLimit: 1 + template: + spec: + restartPolicy: Never + initContainers: + - name: wait-for-go121 + image: kubectl + command: [sh, -c, "while ! curl -s hello-dlv-go121:8080 2>/dev/null; do echo waiting for app; sleep 1; done"] + containers: + - name: dlv-to-go121 + image: skaffold-debug-go + command: [sh, -c, ' + (echo bt; echo exit -c) > init.txt; + set -x; + /duct-tape/go/bin/dlv connect --init init.txt hello-dlv-go121:56286'] diff --git a/go/test/k8s-test-go122.yaml b/go/test/k8s-test-go122.yaml new file mode 100644 index 00000000..fb2a13a3 --- /dev/null +++ b/go/test/k8s-test-go122.yaml @@ -0,0 +1,89 @@ +# This test approximates `skaffold debug` for a go app. +apiVersion: v1 +kind: Pod +metadata: + name: go122pod + labels: + app: hello + protocol: dlv + runtime: go122 +spec: + containers: + - name: go122app + image: go122app + args: + - /dbg/go/bin/dlv + - exec + - --log + - --headless + - --continue + - --accept-multiclient + # listen on 0.0.0.0 as it is exposed as a service + - --listen=0.0.0.0:56286 + - --api-version=2 + - ./app + ports: + - containerPort: 8080 + - containerPort: 56286 + name: dlv + readinessProbe: + httpGet: + path: / + port: 8080 + volumeMounts: + - mountPath: /dbg + name: go-debugging-support + initContainers: + - image: skaffold-debug-go + name: install-go-support + resources: {} + volumeMounts: + - mountPath: /dbg + name: go-debugging-support + volumes: + - emptyDir: {} + name: go-debugging-support + +--- +apiVersion: v1 +kind: Service +metadata: + name: hello-dlv-go122 +spec: + ports: + - name: http + port: 8080 + protocol: TCP + - name: dlv + port: 56286 + protocol: TCP + selector: + app: hello + protocol: dlv + runtime: go122 + +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: connect-to-go122 + labels: + project: container-debug-support + type: integration-test +spec: + ttlSecondsAfterFinished: 10 + backoffLimit: 1 + template: + spec: + restartPolicy: Never + initContainers: + - name: wait-for-go122 + image: kubectl + command: [sh, -c, "while ! curl -s hello-dlv-go122:8080 2>/dev/null; do echo waiting for app; sleep 1; done"] + containers: + - name: dlv-to-go122 + image: skaffold-debug-go + command: [sh, -c, ' + (echo bt; echo exit -c) > init.txt; + set -x; + /duct-tape/go/bin/dlv connect --init init.txt hello-dlv-go122:56286'] diff --git a/go/test/k8s-test-go123.yaml b/go/test/k8s-test-go123.yaml new file mode 100644 index 00000000..80e5b92c --- /dev/null +++ b/go/test/k8s-test-go123.yaml @@ -0,0 +1,89 @@ +# This test approximates `skaffold debug` for a go app. +apiVersion: v1 +kind: Pod +metadata: + name: go123pod + labels: + app: hello + protocol: dlv + runtime: go123 +spec: + containers: + - name: go123app + image: go123app + args: + - /dbg/go/bin/dlv + - exec + - --log + - --headless + - --continue + - --accept-multiclient + # listen on 0.0.0.0 as it is exposed as a service + - --listen=0.0.0.0:56286 + - --api-version=2 + - ./app + ports: + - containerPort: 8080 + - containerPort: 56286 + name: dlv + readinessProbe: + httpGet: + path: / + port: 8080 + volumeMounts: + - mountPath: /dbg + name: go-debugging-support + initContainers: + - image: skaffold-debug-go + name: install-go-support + resources: {} + volumeMounts: + - mountPath: /dbg + name: go-debugging-support + volumes: + - emptyDir: {} + name: go-debugging-support + +--- +apiVersion: v1 +kind: Service +metadata: + name: hello-dlv-go123 +spec: + ports: + - name: http + port: 8080 + protocol: TCP + - name: dlv + port: 56286 + protocol: TCP + selector: + app: hello + protocol: dlv + runtime: go123 + +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: connect-to-go123 + labels: + project: container-debug-support + type: integration-test +spec: + ttlSecondsAfterFinished: 10 + backoffLimit: 1 + template: + spec: + restartPolicy: Never + initContainers: + - name: wait-for-go123 + image: kubectl + command: [sh, -c, "while ! curl -s hello-dlv-go123:8080 2>/dev/null; do echo waiting for app; sleep 1; done"] + containers: + - name: dlv-to-go123 + image: skaffold-debug-go + command: [sh, -c, ' + (echo bt; echo exit -c) > init.txt; + set -x; + /duct-tape/go/bin/dlv connect --init init.txt hello-dlv-go123:56286'] From 93691e65844532eec4b68df44d3099e55e2cb070 Mon Sep 17 00:00:00 2001 From: Zach Renner Date: Wed, 4 Sep 2024 20:19:54 +0000 Subject: [PATCH 2/3] Fix integration tests for local --- go/skaffold.yaml | 4 ++++ integration/skaffold.yaml | 3 +++ publish.sh | 0 3 files changed, 7 insertions(+) mode change 100644 => 100755 publish.sh diff --git a/go/skaffold.yaml b/go/skaffold.yaml index 26898f3a..17e1cc4a 100644 --- a/go/skaffold.yaml +++ b/go/skaffold.yaml @@ -37,6 +37,10 @@ profiles: # integration: set of `skaffold debug`-like integration tests - name: integration + build: + local: + useBuildkit: true + push: false patches: - op: add path: /build/artifacts/- diff --git a/integration/skaffold.yaml b/integration/skaffold.yaml index 8ae4d207..7984ec19 100644 --- a/integration/skaffold.yaml +++ b/integration/skaffold.yaml @@ -17,6 +17,9 @@ profiles: # integration: set of `skaffold debug`-like integration tests - name: integration build: + local: + useBuildkit: true + push: false artifacts: - image: kubectl context: kubectl diff --git a/publish.sh b/publish.sh old mode 100644 new mode 100755 From 1589ae2a704374506d3e355e6b756d7666ea668b Mon Sep 17 00:00:00 2001 From: Zach Renner Date: Wed, 4 Sep 2024 20:29:11 +0000 Subject: [PATCH 3/3] remove unsupported golang version tests --- go/skaffold.yaml | 27 ----------- go/test/k8s-test-go113.yaml | 91 ------------------------------------- go/test/k8s-test-go114.yaml | 91 ------------------------------------- go/test/k8s-test-go115.yaml | 91 ------------------------------------- go/test/k8s-test-go116.yaml | 91 ------------------------------------- go/test/k8s-test-go117.yaml | 91 ------------------------------------- go/test/k8s-test-go118.yaml | 91 ------------------------------------- go/test/k8s-test-go119.yaml | 91 ------------------------------------- go/test/k8s-test-go120.yaml | 89 ------------------------------------ 9 files changed, 753 deletions(-) delete mode 100644 go/test/k8s-test-go113.yaml delete mode 100644 go/test/k8s-test-go114.yaml delete mode 100644 go/test/k8s-test-go115.yaml delete mode 100644 go/test/k8s-test-go116.yaml delete mode 100644 go/test/k8s-test-go117.yaml delete mode 100644 go/test/k8s-test-go118.yaml delete mode 100644 go/test/k8s-test-go119.yaml delete mode 100644 go/test/k8s-test-go120.yaml diff --git a/go/skaffold.yaml b/go/skaffold.yaml index 17e1cc4a..6515b5c5 100644 --- a/go/skaffold.yaml +++ b/go/skaffold.yaml @@ -42,30 +42,6 @@ profiles: useBuildkit: true push: false patches: - - op: add - path: /build/artifacts/- - value: - image: go118app - context: test/goapp - docker: - buildArgs: - GOVERSION: 1.18 - - op: add - path: /build/artifacts/- - value: - image: go119app - context: test/goapp - docker: - buildArgs: - GOVERSION: 1.19 - - op: add - path: /build/artifacts/- - value: - image: go120app - context: test/goapp - docker: - buildArgs: - GOVERSION: '1.20' - op: add path: /build/artifacts/- value: @@ -94,9 +70,6 @@ profiles: deploy: kubectl: manifests: - - test/k8s-test-go118.yaml - - test/k8s-test-go119.yaml - - test/k8s-test-go120.yaml - test/k8s-test-go121.yaml - test/k8s-test-go122.yaml - test/k8s-test-go123.yaml diff --git a/go/test/k8s-test-go113.yaml b/go/test/k8s-test-go113.yaml deleted file mode 100644 index ab4be2f3..00000000 --- a/go/test/k8s-test-go113.yaml +++ /dev/null @@ -1,91 +0,0 @@ -# This test approximates `skaffold debug` for a go app. -apiVersion: v1 -kind: Pod -metadata: - name: go113pod - labels: - app: hello - protocol: dlv - runtime: go113 -spec: - containers: - - name: go113app - image: go113app - args: - - /dbg/go/bin/dlv - - exec - - --log - - --headless - - --continue - - --accept-multiclient - # listen on 0.0.0.0 as it is exposed as a service - - --listen=0.0.0.0:56286 - - --api-version=2 - - ./app - ports: - - containerPort: 8080 - - containerPort: 56286 - name: dlv - readinessProbe: - httpGet: - path: / - port: 8080 - volumeMounts: - - mountPath: /dbg - name: go-debugging-support - initContainers: - - image: skaffold-debug-go - name: install-go-support - resources: {} - volumeMounts: - - mountPath: /dbg - name: go-debugging-support - volumes: - - emptyDir: {} - name: go-debugging-support - ---- -apiVersion: v1 -kind: Service -metadata: - name: hello-dlv-go113 -spec: - ports: - - name: http - port: 8080 - protocol: TCP - - name: dlv - port: 56286 - protocol: TCP - selector: - app: hello - protocol: dlv - runtime: go113 - ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: connect-to-go113 - labels: - project: container-debug-support - type: integration-test -spec: - ttlSecondsAfterFinished: 10 - backoffLimit: 1 - template: - spec: - restartPolicy: Never - initContainers: - - name: wait-for-go113pod - image: kubectl - command: [sh, -c, "while ! curl -s hello-dlv-go113:8080 2>/dev/null; do echo waiting for app; sleep 1; done"] - containers: - - name: dlv-to-go113 - image: skaffold-debug-go - command: [sh, -c, ' - (echo bt; echo exit -c) > init.txt; - set -x; - /duct-tape/go/bin/dlv connect --init init.txt hello-dlv-go113:56286'] - - diff --git a/go/test/k8s-test-go114.yaml b/go/test/k8s-test-go114.yaml deleted file mode 100644 index 9012b435..00000000 --- a/go/test/k8s-test-go114.yaml +++ /dev/null @@ -1,91 +0,0 @@ -# This test approximates `skaffold debug` for a go app. -apiVersion: v1 -kind: Pod -metadata: - name: go114pod - labels: - app: hello - protocol: dlv - runtime: go114 -spec: - containers: - - name: go114app - image: go114app - args: - - /dbg/go/bin/dlv - - exec - - --log - - --headless - - --continue - - --accept-multiclient - # listen on 0.0.0.0 as it is exposed as a service - - --listen=0.0.0.0:56286 - - --api-version=2 - - ./app - ports: - - containerPort: 8080 - - containerPort: 56286 - name: dlv - readinessProbe: - httpGet: - path: / - port: 8080 - volumeMounts: - - mountPath: /dbg - name: go-debugging-support - initContainers: - - image: skaffold-debug-go - name: install-go-support - resources: {} - volumeMounts: - - mountPath: /dbg - name: go-debugging-support - volumes: - - emptyDir: {} - name: go-debugging-support - ---- -apiVersion: v1 -kind: Service -metadata: - name: hello-dlv-go114 -spec: - ports: - - name: http - port: 8080 - protocol: TCP - - name: dlv - port: 56286 - protocol: TCP - selector: - app: hello - protocol: dlv - runtime: go114 - ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: connect-to-go114 - labels: - project: container-debug-support - type: integration-test -spec: - ttlSecondsAfterFinished: 10 - backoffLimit: 1 - template: - spec: - restartPolicy: Never - initContainers: - - name: wait-for-go114pod - image: kubectl - command: [sh, -c, "while ! curl -s hello-dlv-go114:8080 2>/dev/null; do echo waiting for app; sleep 1; done"] - containers: - - name: dlv-to-go114 - image: skaffold-debug-go - command: [sh, -c, ' - (echo bt; echo exit -c) > init.txt; - set -x; - /duct-tape/go/bin/dlv connect --init init.txt hello-dlv-go114:56286'] - - diff --git a/go/test/k8s-test-go115.yaml b/go/test/k8s-test-go115.yaml deleted file mode 100644 index 988f35b4..00000000 --- a/go/test/k8s-test-go115.yaml +++ /dev/null @@ -1,91 +0,0 @@ -# This test approximates `skaffold debug` for a go app. -apiVersion: v1 -kind: Pod -metadata: - name: go115pod - labels: - app: hello - protocol: dlv - runtime: go115 -spec: - containers: - - name: go115app - image: go115app - args: - - /dbg/go/bin/dlv - - exec - - --log - - --headless - - --continue - - --accept-multiclient - # listen on 0.0.0.0 as it is exposed as a service - - --listen=0.0.0.0:56286 - - --api-version=2 - - ./app - ports: - - containerPort: 8080 - - containerPort: 56286 - name: dlv - readinessProbe: - httpGet: - path: / - port: 8080 - volumeMounts: - - mountPath: /dbg - name: go-debugging-support - initContainers: - - image: skaffold-debug-go - name: install-go-support - resources: {} - volumeMounts: - - mountPath: /dbg - name: go-debugging-support - volumes: - - emptyDir: {} - name: go-debugging-support - ---- -apiVersion: v1 -kind: Service -metadata: - name: hello-dlv-go115 -spec: - ports: - - name: http - port: 8080 - protocol: TCP - - name: dlv - port: 56286 - protocol: TCP - selector: - app: hello - protocol: dlv - runtime: go115 - ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: connect-to-go115 - labels: - project: container-debug-support - type: integration-test -spec: - ttlSecondsAfterFinished: 10 - backoffLimit: 1 - template: - spec: - restartPolicy: Never - initContainers: - - name: wait-for-go115pod - image: kubectl - command: [sh, -c, "while ! curl -s hello-dlv-go115:8080 2>/dev/null; do echo waiting for app; sleep 1; done"] - containers: - - name: dlv-to-go115 - image: skaffold-debug-go - command: [sh, -c, ' - (echo bt; echo exit -c) > init.txt; - set -x; - /duct-tape/go/bin/dlv connect --init init.txt hello-dlv-go115:56286'] - - diff --git a/go/test/k8s-test-go116.yaml b/go/test/k8s-test-go116.yaml deleted file mode 100644 index a54cefa7..00000000 --- a/go/test/k8s-test-go116.yaml +++ /dev/null @@ -1,91 +0,0 @@ -# This test approximates `skaffold debug` for a go app. -apiVersion: v1 -kind: Pod -metadata: - name: go116pod - labels: - app: hello - protocol: dlv - runtime: go116 -spec: - containers: - - name: go116app - image: go116app - args: - - /dbg/go/bin/dlv - - exec - - --log - - --headless - - --continue - - --accept-multiclient - # listen on 0.0.0.0 as it is exposed as a service - - --listen=0.0.0.0:56286 - - --api-version=2 - - ./app - ports: - - containerPort: 8080 - - containerPort: 56286 - name: dlv - readinessProbe: - httpGet: - path: / - port: 8080 - volumeMounts: - - mountPath: /dbg - name: go-debugging-support - initContainers: - - image: skaffold-debug-go - name: install-go-support - resources: {} - volumeMounts: - - mountPath: /dbg - name: go-debugging-support - volumes: - - emptyDir: {} - name: go-debugging-support - ---- -apiVersion: v1 -kind: Service -metadata: - name: hello-dlv-go116 -spec: - ports: - - name: http - port: 8080 - protocol: TCP - - name: dlv - port: 56286 - protocol: TCP - selector: - app: hello - protocol: dlv - runtime: go116 - ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: connect-to-go116 - labels: - project: container-debug-support - type: integration-test -spec: - ttlSecondsAfterFinished: 10 - backoffLimit: 1 - template: - spec: - restartPolicy: Never - initContainers: - - name: wait-for-go116pod - image: kubectl - command: [sh, -c, "while ! curl -s hello-dlv-go116:8080 2>/dev/null; do echo waiting for app; sleep 1; done"] - containers: - - name: dlv-to-go116 - image: skaffold-debug-go - command: [sh, -c, ' - (echo bt; echo exit -c) > init.txt; - set -x; - /duct-tape/go/bin/dlv connect --init init.txt hello-dlv-go116:56286'] - - diff --git a/go/test/k8s-test-go117.yaml b/go/test/k8s-test-go117.yaml deleted file mode 100644 index b45bc81b..00000000 --- a/go/test/k8s-test-go117.yaml +++ /dev/null @@ -1,91 +0,0 @@ -# This test approximates `skaffold debug` for a go app. -apiVersion: v1 -kind: Pod -metadata: - name: go117pod - labels: - app: hello - protocol: dlv - runtime: go117 -spec: - containers: - - name: go117app - image: go117app - args: - - /dbg/go/bin/dlv - - exec - - --log - - --headless - - --continue - - --accept-multiclient - # listen on 0.0.0.0 as it is exposed as a service - - --listen=0.0.0.0:56286 - - --api-version=2 - - ./app - ports: - - containerPort: 8080 - - containerPort: 56286 - name: dlv - readinessProbe: - httpGet: - path: / - port: 8080 - volumeMounts: - - mountPath: /dbg - name: go-debugging-support - initContainers: - - image: skaffold-debug-go - name: install-go-support - resources: {} - volumeMounts: - - mountPath: /dbg - name: go-debugging-support - volumes: - - emptyDir: {} - name: go-debugging-support - ---- -apiVersion: v1 -kind: Service -metadata: - name: hello-dlv-go117 -spec: - ports: - - name: http - port: 8080 - protocol: TCP - - name: dlv - port: 56286 - protocol: TCP - selector: - app: hello - protocol: dlv - runtime: go117 - ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: connect-to-go117 - labels: - project: container-debug-support - type: integration-test -spec: - ttlSecondsAfterFinished: 10 - backoffLimit: 1 - template: - spec: - restartPolicy: Never - initContainers: - - name: wait-for-go117pod - image: kubectl - command: [sh, -c, "while ! curl -s hello-dlv-go117:8080 2>/dev/null; do echo waiting for app; sleep 1; done"] - containers: - - name: dlv-to-go117 - image: skaffold-debug-go - command: [sh, -c, ' - (echo bt; echo exit -c) > init.txt; - set -x; - /duct-tape/go/bin/dlv connect --init init.txt hello-dlv-go117:56286'] - - diff --git a/go/test/k8s-test-go118.yaml b/go/test/k8s-test-go118.yaml deleted file mode 100644 index fd51bdf0..00000000 --- a/go/test/k8s-test-go118.yaml +++ /dev/null @@ -1,91 +0,0 @@ -# This test approximates `skaffold debug` for a go app. -apiVersion: v1 -kind: Pod -metadata: - name: go118pod - labels: - app: hello - protocol: dlv - runtime: go118 -spec: - containers: - - name: go118app - image: go118app - args: - - /dbg/go/bin/dlv - - exec - - --log - - --headless - - --continue - - --accept-multiclient - # listen on 0.0.0.0 as it is exposed as a service - - --listen=0.0.0.0:56286 - - --api-version=2 - - ./app - ports: - - containerPort: 8080 - - containerPort: 56286 - name: dlv - readinessProbe: - httpGet: - path: / - port: 8080 - volumeMounts: - - mountPath: /dbg - name: go-debugging-support - initContainers: - - image: skaffold-debug-go - name: install-go-support - resources: {} - volumeMounts: - - mountPath: /dbg - name: go-debugging-support - volumes: - - emptyDir: {} - name: go-debugging-support - ---- -apiVersion: v1 -kind: Service -metadata: - name: hello-dlv-go118 -spec: - ports: - - name: http - port: 8080 - protocol: TCP - - name: dlv - port: 56286 - protocol: TCP - selector: - app: hello - protocol: dlv - runtime: go118 - ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: connect-to-go118 - labels: - project: container-debug-support - type: integration-test -spec: - ttlSecondsAfterFinished: 10 - backoffLimit: 1 - template: - spec: - restartPolicy: Never - initContainers: - - name: wait-for-go118pod - image: kubectl - command: [sh, -c, "while ! curl -s hello-dlv-go118:8080 2>/dev/null; do echo waiting for app; sleep 1; done"] - containers: - - name: dlv-to-go118 - image: skaffold-debug-go - command: [sh, -c, ' - (echo bt; echo exit -c) > init.txt; - set -x; - /duct-tape/go/bin/dlv connect --init init.txt hello-dlv-go118:56286'] - - diff --git a/go/test/k8s-test-go119.yaml b/go/test/k8s-test-go119.yaml deleted file mode 100644 index 85f184df..00000000 --- a/go/test/k8s-test-go119.yaml +++ /dev/null @@ -1,91 +0,0 @@ -# This test approximates `skaffold debug` for a go app. -apiVersion: v1 -kind: Pod -metadata: - name: go119pod - labels: - app: hello - protocol: dlv - runtime: go119 -spec: - containers: - - name: go119app - image: go119app - args: - - /dbg/go/bin/dlv - - exec - - --log - - --headless - - --continue - - --accept-multiclient - # listen on 0.0.0.0 as it is exposed as a service - - --listen=0.0.0.0:56286 - - --api-version=2 - - ./app - ports: - - containerPort: 8080 - - containerPort: 56286 - name: dlv - readinessProbe: - httpGet: - path: / - port: 8080 - volumeMounts: - - mountPath: /dbg - name: go-debugging-support - initContainers: - - image: skaffold-debug-go - name: install-go-support - resources: {} - volumeMounts: - - mountPath: /dbg - name: go-debugging-support - volumes: - - emptyDir: {} - name: go-debugging-support - ---- -apiVersion: v1 -kind: Service -metadata: - name: hello-dlv-go119 -spec: - ports: - - name: http - port: 8080 - protocol: TCP - - name: dlv - port: 56286 - protocol: TCP - selector: - app: hello - protocol: dlv - runtime: go119 - ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: connect-to-go119 - labels: - project: container-debug-support - type: integration-test -spec: - ttlSecondsAfterFinished: 10 - backoffLimit: 1 - template: - spec: - restartPolicy: Never - initContainers: - - name: wait-for-go119pod - image: kubectl - command: [sh, -c, "while ! curl -s hello-dlv-go119:8080 2>/dev/null; do echo waiting for app; sleep 1; done"] - containers: - - name: dlv-to-go119 - image: skaffold-debug-go - command: [sh, -c, ' - (echo bt; echo exit -c) > init.txt; - set -x; - /duct-tape/go/bin/dlv connect --init init.txt hello-dlv-go119:56286'] - - diff --git a/go/test/k8s-test-go120.yaml b/go/test/k8s-test-go120.yaml deleted file mode 100644 index 3c9991ad..00000000 --- a/go/test/k8s-test-go120.yaml +++ /dev/null @@ -1,89 +0,0 @@ -# This test approximates `skaffold debug` for a go app. -apiVersion: v1 -kind: Pod -metadata: - name: go120pod - labels: - app: hello - protocol: dlv - runtime: go120 -spec: - containers: - - name: go120app - image: go120app - args: - - /dbg/go/bin/dlv - - exec - - --log - - --headless - - --continue - - --accept-multiclient - # listen on 0.0.0.0 as it is exposed as a service - - --listen=0.0.0.0:56286 - - --api-version=2 - - ./app - ports: - - containerPort: 8080 - - containerPort: 56286 - name: dlv - readinessProbe: - httpGet: - path: / - port: 8080 - volumeMounts: - - mountPath: /dbg - name: go-debugging-support - initContainers: - - image: skaffold-debug-go - name: install-go-support - resources: {} - volumeMounts: - - mountPath: /dbg - name: go-debugging-support - volumes: - - emptyDir: {} - name: go-debugging-support - ---- -apiVersion: v1 -kind: Service -metadata: - name: hello-dlv-go120 -spec: - ports: - - name: http - port: 8080 - protocol: TCP - - name: dlv - port: 56286 - protocol: TCP - selector: - app: hello - protocol: dlv - runtime: go120 - ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: connect-to-go120 - labels: - project: container-debug-support - type: integration-test -spec: - ttlSecondsAfterFinished: 10 - backoffLimit: 1 - template: - spec: - restartPolicy: Never - initContainers: - - name: wait-for-go120 - image: kubectl - command: [sh, -c, "while ! curl -s hello-dlv-go120:8080 2>/dev/null; do echo waiting for app; sleep 1; done"] - containers: - - name: dlv-to-go120 - image: skaffold-debug-go - command: [sh, -c, ' - (echo bt; echo exit -c) > init.txt; - set -x; - /duct-tape/go/bin/dlv connect --init init.txt hello-dlv-go120:56286']