Skip to content

Commit

Permalink
fix(k8s): setting larger python image for cursor-initializator-elastic (
Browse files Browse the repository at this point in the history
#75)

* adding busybox to end image

* setting larger image of python
  • Loading branch information
nikola-milosa committed Jan 19, 2024
1 parent 9b17936 commit cd5d96d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@ oci_pull(
],
)

oci_pull(
name = "python3",
digest = "sha256:5120c734a5ba810c47b97a80cdc6e03004bd4ff7ad98e492b9ccdaf70ff2b8d6",
image = "index.docker.io/library/python",
)

http_archive(
name = "rules_pkg",
sha256 = "8f9ee2dc10c1ae514ee599a8b42ed99fa262b757058f65ad3c384289ff70c4b8",
Expand Down
1 change: 1 addition & 0 deletions k8s/cursor-initializator-elastic/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ py_binary(
python_oci_image_rules(
name = "oci_image",
src = ":cursor-initializator-elastic",
base_image = "@python3"
)
9 changes: 8 additions & 1 deletion k8s/oci_images.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
rules for creating oci images from python binaries
"""

load("@rules_oci//oci:defs.bzl", "oci_image", "oci_push")
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_push", "oci_tarball")
load("@rules_pkg//:pkg.bzl", "pkg_tar")

def python_oci_image_rules(name, src, base_image = "@distroless_python3"):
Expand Down Expand Up @@ -39,6 +39,13 @@ def python_oci_image_rules(name, src, base_image = "@distroless_python3"):
}
)

tarball_name = "{}-tarball".format(binary.name)
oci_tarball(
name = tarball_name,
image = image_rule_name,
repo_tags = ["localhost/{}:latest".format(binary.name)]
)

oci_push(
name = "push_image",
image = image_rule_name,
Expand Down

0 comments on commit cd5d96d

Please sign in to comment.