Skip to content

Commit f005fa3

Browse files
authored
Publish images with more descriptive names (#59)
Github's Packages and GHCR.io offer relatively flat namespaces which means images like `go`, `python`, or `nodejs` can cause confusion. This patch renames the images to variants of `skaffold-debug-xxx`, but continues to publish the images to the original locations (gcp-dev-tools, k8s-skaffold) using the shortened name.
1 parent c3012d9 commit f005fa3

File tree

6 files changed

+67
-15
lines changed

6 files changed

+67
-15
lines changed

integration/k8s-test-go113.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ spec:
2828
- mountPath: /dbg
2929
name: go-debugging-support
3030
initContainers:
31-
- image: gcr.io/gcp-dev-tools/duct-tape/go
31+
- image: skaffold-debug-go
3232
name: install-go-support
3333
resources: {}
3434
volumeMounts:
@@ -64,7 +64,7 @@ spec:
6464
name: kubectl
6565
containers:
6666
- name: dlv-to-go113
67-
image: gcr.io/gcp-dev-tools/duct-tape/go
67+
image: skaffold-debug-go
6868
command: [sh, -c, 'sleep 5;
6969
/kubectl/kubectl port-forward pod/go113pod 56286:56286 &
7070
sleep 2;

integration/k8s-test-go114.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ spec:
2828
- mountPath: /dbg
2929
name: go-debugging-support
3030
initContainers:
31-
- image: gcr.io/gcp-dev-tools/duct-tape/go
31+
- image: skaffold-debug-go
3232
name: install-go-support
3333
resources: {}
3434
volumeMounts:
@@ -64,7 +64,7 @@ spec:
6464
name: kubectl
6565
containers:
6666
- name: dlv-to-go114
67-
image: gcr.io/gcp-dev-tools/duct-tape/go
67+
image: skaffold-debug-go
6868
command: [sh, -c, 'sleep 5;
6969
/kubectl/kubectl port-forward pod/go114pod 56286:56286 &
7070
sleep 2;

integration/k8s-test-go115.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ spec:
2828
- mountPath: /dbg
2929
name: go-debugging-support
3030
initContainers:
31-
- image: gcr.io/gcp-dev-tools/duct-tape/go
31+
- image: skaffold-debug-go
3232
name: install-go-support
3333
resources: {}
3434
volumeMounts:
@@ -64,7 +64,7 @@ spec:
6464
name: kubectl
6565
containers:
6666
- name: dlv-to-go115
67-
image: gcr.io/gcp-dev-tools/duct-tape/go
67+
image: skaffold-debug-go
6868
command: [sh, -c, 'sleep 5;
6969
/kubectl/kubectl port-forward pod/go115pod 56286:56286 &
7070
sleep 2;

integration/k8s-test-nodejs12.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ spec:
2323
- mountPath: /dbg
2424
name: node-debugging-support
2525
initContainers:
26-
- image: gcr.io/gcp-dev-tools/duct-tape/nodejs
26+
- image: skaffold-debug-nodejs
2727
name: install-node-support
2828
resources: {}
2929
volumeMounts:

publish.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
11
#!/bin/sh
2+
set -eu
3+
4+
# publish with longer image names
25
skaffold build -p prod --default-repo gcr.io/k8s-skaffold/skaffold-debug-support
36
skaffold build -p prod --default-repo gcr.io/gcp-dev-tools/duct-tape
7+
8+
# the github project packages is a backup location; will need to
9+
# migrate to ghcr.io/googlecontainertools at some point
10+
skaffold build -p prod --default-repo docker.pkg.github.com/googlecontainertools/skaffold
11+
12+
# publish with shorter (deprecated) image names
13+
skaffold build -p prod,deprecated-names --default-repo gcr.io/k8s-skaffold/skaffold-debug-support
14+
skaffold build -p prod,deprecated-names --default-repo gcr.io/gcp-dev-tools/duct-tape

skaffold.yaml

Lines changed: 49 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@ apiVersion: skaffold/v1beta9
22
kind: Config
33
build:
44
artifacts:
5-
- image: go
5+
- image: skaffold-debug-go
66
context: go
7-
- image: python
7+
- image: skaffold-debug-python
88
context: python
9-
- image: netcore
9+
- image: skaffold-debug-netcore
1010
context: netcore
11-
- image: nodejs
11+
- image: skaffold-debug-nodejs
1212
context: nodejs
1313
# ensure images are tagged with :latest
1414
tagPolicy:
1515
sha256: {}
1616
test:
17-
- image: go
17+
- image: skaffold-debug-go
1818
structureTests: [./test/structure-tests-go.yaml]
19-
- image: python
19+
- image: skaffold-debug-python
2020
structureTests: [./test/structure-tests-python.yaml]
21-
- image: netcore
21+
- image: skaffold-debug-netcore
2222
structureTests: [./test/structure-tests-netcore.yaml]
23-
- image: nodejs
23+
- image: skaffold-debug-nodejs
2424
structureTests: [./test/structure-tests-nodejs.yaml]
2525
deploy:
2626
kubectl:
@@ -78,3 +78,44 @@ profiles:
7878
build:
7979
local:
8080
push: true
81+
82+
# Use short (deprecated) image names: images were renamed so they were
83+
# more easily distinguished from other images with similar names.
84+
- name: deprecated-names
85+
patches:
86+
- op: replace
87+
path: /build/artifacts/0/image
88+
from: skaffold-debug-go
89+
value: go
90+
- op: replace
91+
path: /test/0/image
92+
from: skaffold-debug-go
93+
value: go
94+
95+
- op: replace
96+
path: /build/artifacts/1/image
97+
from: skaffold-debug-python
98+
value: python
99+
- op: replace
100+
path: /test/1/image
101+
from: skaffold-debug-python
102+
value: python
103+
104+
- op: replace
105+
path: /build/artifacts/2/image
106+
from: skaffold-debug-netcore
107+
value: netcore
108+
- op: replace
109+
path: /test/2/image
110+
from: skaffold-debug-netcore
111+
value: netcore
112+
113+
- op: replace
114+
path: /build/artifacts/3/image
115+
from: skaffold-debug-nodejs
116+
value: nodejs
117+
- op: replace
118+
path: /test/3/image
119+
from: skaffold-debug-nodejs
120+
value: nodejs
121+

0 commit comments

Comments
 (0)