Coder Social home page Coder Social logo

rules_kustomize's Introduction

rules_kustomize

The rules define a collection of Bazel macros for working with kustomize. These rules are intentionally lightweight and intended to be composable with other Kubernetes related rules.

The rules are tested against Bazel 5.4 and supported on the following host platforms:

  • Linux, macOS
  • amd64, arm64

Patches to support additional platforms are welcome.

Setup

After setup, see the examples directory and the API documentation.

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")


http_archive(
    name = "com_benchsci_rules_kustomize",
    sha256 = "7c2308991352d534c4ad3d9a0e37eee402ccb8a7c96eeb718c18c52f81c45fb1",
    strip_prefix = "rules_kustomize-4b979472aae1953799a616e45a10748acafcd982",
    urls = ["https://github.com/benchsci/rules_kustomize/archive/4b979472aae1953799a616e45a10748acafcd982.zip"],
)

load("@com_benchsci_rules_kustomize//:workspace.bzl", "download_kustomize_deps")

download_kustomize_deps()

# Optional for some handy GKE related utilities.
load("@com_benchsci_rules_kustomize//:workspace.bzl", "download_gcloud_deps")

download_gcloud_deps()

These rules make a best-effort attempt to track the stable releases of its dependencies. If you need to lock to different versions you can specify them explictly in your WORKSPACE file by copying and modifying the contents of the helper functions in workspace.bzl (e.g. the body of the download_kustomize_deps function)

Additional tools:

The underlying tools that the macros use are exposed as run commands::

bazel run @com_benchsci_rules_kustomize//:kubectl
bazel run @com_benchsci_rules_kustomize//:kustomize
bazel run @com_benchsci_rules_kustomize//:gcloud

You can alias these tools into your own Bazel repository via alias. For example:

alias(
    name = "kubectl",
    actual = "@com_benchsci_rules_kustomize//:kubectl",
)

rules_kustomize's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rules_kustomize's Issues

Support for arm64

Hey @bshi

Hope you are doing well. I'm running into an issue when using this package with arm64 (M1). It looks like we need to add a kubetctl srcs for @bazel_tools//src/conditions:darwin_arm64 and @bazel_tools//src/conditions:linux_aarch64 (for docker images compiled on arm64).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.