All Projects → tmc → rules_helm

tmc / rules_helm

Licence: other
rules_helm: Bazel rules for managing helm charts

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to rules helm

Rules rust
Rust rules for Bazel
Stars: ✭ 241 (+423.91%)
Mutual labels:  bazel, bazel-rules
rules antlr
ANTLR rules for Bazel
Stars: ✭ 24 (-47.83%)
Mutual labels:  bazel, bazel-rules
rules openapi
🍃 bazel rules for generating code from openapi specifications
Stars: ✭ 49 (+6.52%)
Mutual labels:  bazel, bazel-rules
Rules k8s
This repository contains rules for interacting with Kubernetes configurations / clusters.
Stars: ✭ 222 (+382.61%)
Mutual labels:  bazel, bazel-rules
rules sass
Sass rules for Bazel
Stars: ✭ 47 (+2.17%)
Mutual labels:  bazel, bazel-rules
Rules python
Experimental Bazel Python Rules
Stars: ✭ 233 (+406.52%)
Mutual labels:  bazel, bazel-rules
rules proto grpc
Bazel rules for building Protobuf and gRPC code and libraries from proto_library targets
Stars: ✭ 201 (+336.96%)
Mutual labels:  bazel, bazel-rules
Rules kotlin
Bazel rules for Kotlin
Stars: ✭ 162 (+252.17%)
Mutual labels:  bazel, bazel-rules
rules dart
Dart rules for Bazel
Stars: ✭ 35 (-23.91%)
Mutual labels:  bazel, bazel-rules
rules ocaml
OCaml build rules for Bazel
Stars: ✭ 38 (-17.39%)
Mutual labels:  bazel, bazel-rules
Rules apple
Bazel rules to build apps for Apple platforms.
Stars: ✭ 217 (+371.74%)
Mutual labels:  bazel, bazel-rules
rules appengine
AppEngine rules for Bazel
Stars: ✭ 28 (-39.13%)
Mutual labels:  bazel, bazel-rules
Rules protobuf
Bazel rules for building protocol buffers and gRPC services (java, c++, go, ...)
Stars: ✭ 206 (+347.83%)
Mutual labels:  bazel, bazel-rules
Rules kotlin
Bazel rules for Kotlin
Stars: ✭ 235 (+410.87%)
Mutual labels:  bazel, bazel-rules
Rules haskell
Haskell rules for Bazel.
Stars: ✭ 196 (+326.09%)
Mutual labels:  bazel, bazel-rules
bazel-maven-proxy
A local (read-only) proxy for Bazel to access Maven resources behind a secure repository or from the local Maven repository
Stars: ✭ 22 (-52.17%)
Mutual labels:  bazel, bazel-rules
Rules swift
Bazel rules to build Swift on Apple and Linux platforms
Stars: ✭ 151 (+228.26%)
Mutual labels:  bazel, bazel-rules
Bazel Skylib
Common useful functions and rules for Bazel
Stars: ✭ 153 (+232.61%)
Mutual labels:  bazel, bazel-rules
bazel-latex
Bazel build system rules for LaTeX
Stars: ✭ 67 (+45.65%)
Mutual labels:  bazel, bazel-rules
rules gitops
This repository contains rules for continuous, GitOps driven Kubernetes deployments.
Stars: ✭ 112 (+143.48%)
Mutual labels:  bazel, bazel-rules

rules_helm

This repository contains Bazel rules to install and manipulate Helm charts with Bazel.

This allows you to describe Kubernetes applications in a deterministic manner.

Features

Documentation

API

  • helm_chart - describes a helm chart.
  • helm_release - describes a helm release.

Getting started

In your Bazel WORKSPACE file add this repository as a dependency:

git_repository(
    name = "com_github_tmc_rules_helm",
    tag = "0.4.0",
    remote = "https://github.com/tmc/rules_helm.git",
)

Then in your BUILD files include the helm_chart and/or helm_release rules:

charts/a-great-chart/zBUILD:

load("@com_github_tmc_rules_helm//:helm.bzl", "helm_chart")

package(default_visibility = ["//visibility:public"])

helm_chart(
    name = "a_great_chart",
    srcs = glob(["**"]),
)

Referencing the chart with helm_release:

BUILD:

load("@com_github_tmc_rules_helm//:helm.bzl", "helm_release")

helm_release(
    name = "a_great_release",
    chart = "//charts/a-great-chart:chart",
    release_name = "a-great-release-1",
    values_yaml = "//:a-great-release-values.yaml",
)

This defines targets you can now use to manage the release:

:a_great_release.test.noclean
:a_great_release.test
:a_great_release.status
:a_great_release.install.wait
:a_great_release.install
:a_great_release.delete

You could now install, test, and clean up the chart via: bazel run :a_great_release.install.wait && bazel run :a_great_release.test && bazel run :a_great_release.delete

See rules_helm_examples for detailed usage examples.

Istio Example

These rules demonstrae describing an installation of Istio. See https://github.com/tmc/rules_helm_example/tree/master/charts/istio for details.

load("@com_github_tmc_rules_helm//:helm.bzl", "helm_release")

package(default_visibility = ["//visibility:public"])

helm_release(
    name = "istio_init",
    chart = "@com_github_istio_istio//:istio_init",
    namespace = "istio-system",
    release_name = "istio-init",
    values_yaml = ":istio_values.yaml",
)

helm_release(
    name = "istio",
    chart = "@com_github_istio_istio//:istio",
    namespace = "istio-system",
    release_name = "istio",
    values_yaml = ":istio_values.yaml",
)

The releases above create the following targets:

:istio_init.test.noclean
:istio_init.test
:istio_init.status
:istio_init.install.wait
:istio_init.install
:istio_init.delete

And:

:istio.test.noclean
:istio.test
:istio.status
:istio.install.wait
:istio.install
:istio.delete

Running bazel run :istio_init.install and a subsequent bazel run :istio.install (waiting for the CRDs to be created) will install Istio. See rules_helm_examples for detailed usage examples.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].