Skip to content

Commit

Permalink
Add ability to install any tezos-k8s chart (#21)
Browse files Browse the repository at this point in the history
* 1.0.2

* Add ability to deploy and tezos-k8s chart

* 1.1.0
  • Loading branch information
harryttd committed Jan 12, 2023
1 parent a5a886a commit 223e69b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions components/TezosK8sHelmChart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ import {

import { ChartOpts, LocalChartOpts } from "@pulumi/kubernetes/helm/v3"

/** We hardcode the chart's `config` properties `chart` and `fetchOpts` to
* install the `tezos-k8s` chart */
/** We hardcode the chart's `config.fetchOpts` property to use
* `tezos-helm-charts` as the Helm repo. The `chart` property we will add as an
* optional property and it defaults to `tezos-chain`. */
type CustomChartOpts = Omit<ChartOpts, "chart" | "fetchOpts">
/** Make that user can't specify both ChartOpts and LocalChartOpts */
type CustomChartConfig = CustomChartOpts | LocalChartOpts
/** Describes the Helm chart config */
export type TezosK8sHelmChartConfig = CustomChartConfig & {
/** Chart to use in the `tezos-k8s` helm repo. Example `pyrometer`. Defaults
* to `tezos-chain`. */
chart?: string
/**
* Path to a tezos-k8s Helm chart values file(s). File precedence goes from
* right to left. Values will be overridden by the `values` property.
Expand Down Expand Up @@ -89,7 +93,7 @@ export class TezosK8sHelmChart extends pulumi.ComponentResource {
// The `chart` and `fetchOpts` props can't be set on `filledInConfig`
// unless it is casted to `ChartOpts`.
const configAsChartOpts = filledInConfig as ChartOpts
configAsChartOpts.chart = "tezos-chain"
configAsChartOpts.chart = config.chart || "tezos-chain"
configAsChartOpts.fetchOpts = {
repo: "https://oxheadalpha.github.io/tezos-helm-charts/",
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oxheadalpha/tezos-pulumi",
"version": "1.0.1",
"version": "1.1.0",
"author": "Aryeh Harris <aryeh.harris@oxheadalpha.com>",
"license": "MIT",
"description": "Deploy Tezos Infrastructure in the Cloud",
Expand Down

0 comments on commit 223e69b

Please sign in to comment.