-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix: deploy to multiple namespaces #8623
fix: deploy to multiple namespaces #8623
Conversation
Codecov Report
@@ Coverage Diff @@
## main #8623 +/- ##
==========================================
- Coverage 70.48% 64.23% -6.25%
==========================================
Files 515 613 +98
Lines 23150 30708 +7558
==========================================
+ Hits 16317 19725 +3408
- Misses 5776 9503 +3727
- Partials 1057 1480 +423
... and 392 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
ARG SKAFFOLD_GO_GCFLAGS | ||
RUN go build -gcflags="${SKAFFOLD_GO_GCFLAGS}" -trimpath -o /app main.go | ||
|
||
FROM alpine:3.10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Alpine 3.10
is from ~2019, might make sense to use a more recent alpine version eg: 3.15+
ns, client := SetupNamespace(t.T) | ||
ns2, _ := SetupNamespace(t.T) | ||
|
||
_, _, fErr := replaceInFile("namespace1", ns.Name, fmt.Sprintf("%s/skaffold.yaml", "testdata/helm-multi-namespaces")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: might make sense to use a separate constant for the test data directory path instead of repeating "testdata/helm-multi-namespaces". Might make it easier to update the path if necessary in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
(cherry picked from commit 3b5320c)
Fixes: b/266719200
Description
If the rendered manifest has multiple namespaces, retry
kubectl create
dry-run
command without a namespace flag.Testing instruction
See the added integration test.