Skip to content

Commit 031539c

Browse files
committed
Serve script bundle from cloud proxy image for air gapped installs
Signed-off-by: Dom Del Nano <ddelnano@gmail.com> (cherry picked from commit 9430215)
1 parent 534b892 commit 031539c

4 files changed

Lines changed: 32 additions & 0 deletions

File tree

.bazelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Global bazelrc file, see https://docs.bazel.build/versions/master/guide.html#bazelrc.
2+
build --action_env=HOME
23

34
# Use strict action env to prevent leaks of env vars.
45
build --incompatible_strict_action_env

k8s/cloud/base/proxy_nginx_config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,11 @@ data:
267267
try_files "/install.sh" =404;
268268
}
269269
270+
location /bundle-oss.json {
271+
root /installer;
272+
try_files "/bundle-oss.json" =404;
273+
}
274+
270275
location / {
271276
return 307 https://work.$domain_name$request_uri;
272277
}
@@ -334,6 +339,11 @@ data:
334339
try_files "/install.sh" =404;
335340
}
336341
342+
location /bundle-oss.json {
343+
root /installer;
344+
try_files "/bundle-oss.json" =404;
345+
}
346+
337347
location / {
338348
gzip_static off;
339349
root /assets;

src/cloud/proxy/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ container_layer(
3030
directory = "/installer",
3131
files = [
3232
"//src/pixie_cli:installer_script",
33+
"//src/pxl_scripts:script_bundle",
3334
],
3435
)
3536

src/pxl_scripts/BUILD.bazel

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,33 @@
1414
#
1515
# SPDX-License-Identifier: Apache-2.0
1616

17+
load("@rules_foreign_cc//foreign_cc:make.bzl", "make")
18+
1719
package(default_visibility = ["//src:__subpackages__"])
1820

1921
filegroup(
2022
name = "preset_queries",
2123
srcs = glob([
2224
"**/*.pxl",
2325
"**/*.json",
26+
"**/*.yaml",
2427
]),
2528
visibility = ["//src:__subpackages__"],
2629
)
30+
31+
filegroup(
32+
name = "makefile",
33+
srcs = [
34+
"Makefile",
35+
":preset_queries",
36+
],
37+
visibility = ["//src:__subpackages__"],
38+
)
39+
40+
genrule(
41+
name = "script_bundle",
42+
srcs = [":makefile"],
43+
outs = ["bundle-oss.json"],
44+
cmd = "make -C src/pxl_scripts bundle-oss.json; cp bundle-oss.json $(@D)/bundle-oss.json",
45+
visibility = ["//src:__subpackages__"],
46+
)

0 commit comments

Comments
 (0)