Skip to content

Commit

Permalink
Merge pull request #11 from toscott/main
Browse files Browse the repository at this point in the history
FIXES #10 - Publish Chart to a proper helm repository
  • Loading branch information
AjayTripathy authored Feb 15, 2023
2 parents 5d1078b + cb38cbd commit 0f4cfd6
Show file tree
Hide file tree
Showing 15 changed files with 84 additions and 72 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/helm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,9 @@ jobs:
uses: tj-actions/changed-files@v35
with:
files: |
templates/**
Chart.yaml
values.yaml
helm-test.yml
charts/**
# change detection in ct seems to not detect some changes. Using simple file modification for now.
# change detection in ct seems to not detect some changes. Using simple file modification for now.
# - name: Run chart-testing (list-changed)
# id: list-changed
# run: |
Expand All @@ -56,7 +53,7 @@ jobs:
# run: ct lint --chart-dirs . --target-branch ${{ github.event.repository.default_branch }}

- name: Run chart-testing (lint)
run: ct lint --chart-dirs . --charts .
run: ct lint --all

- name: Create kind cluster
uses: helm/[email protected]
Expand All @@ -67,6 +64,5 @@ jobs:
# run: ct install --chart-dirs . --target-branch ${{ github.event.repository.default_branch }} --upgrade

- name: Run chart-testing (install)
run: ct install --chart-dirs . --charts .


run: ct install --all
if: steps.files-changed.outputs.any_modified == 'true'
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# heavily borrowed from https://github.com/dirien/minecraft-prometheus-exporter/blob/main/.github/workflows/helm-publish.yaml
---
name: chart-publish
on:
push:
branches:
- main
paths:
- 'charts/**'
env:
HELM_DOCS_VERSION: '1.11.0'

Expand Down Expand Up @@ -50,7 +47,7 @@ jobs:
- name: Run chart-releaser
uses: helm/chart-releaser-action@be16258da8010256c6e82849661221415f031968 # v1.5.0
with:
charts_dir: ./
charts_dir: charts
config: './.github/configs/cr.yaml'
env:
CR_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
Expand Down
58 changes: 7 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,62 +11,18 @@ Opencost and Opencost UI
| ---- | ------ | --- |
| mattray | | <https://mattray.dev> |

## Installing the Chart
## Usage

To install the chart with the release name `my-release`:
[Helm](https://helm.sh/) must be installed to use the charts. Please refer to Helm's [documentation](https://helm.sh/docs/) to get started.

Once Helm is set up properly, add the repo as follows:

```console
$ helm repo add <put repo information>
$ helm install opencost <repoinfo>/opencost
helm repo add opencost https://opencost.github.io/opencost-helm-chart
```

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| annotations | object | `{}` | |
| opencost.exporter.defaultClusterId | string | `"default-cluster"` | |
| opencost.exporter.extraEnv | object | `{}` | |
| opencost.exporter.image.registry | string | `"quay.io"` | |
| opencost.exporter.image.repository | string | `"kubecost1/kubecost-cost-model"` | |
| opencost.exporter.image.tag | string | `"latest"` | |
| opencost.exporter.resources.limits.cpu | string | `"999m"` | |
| opencost.exporter.resources.limits.memory | string | `"1G"` | |
| opencost.exporter.resources.requests.cpu | string | `"10m"` | |
| opencost.exporter.resources.requests.memory | string | `"55M"` | |
| opencost.metrics.serviceMonitor.additionalLabels | object | `{}` | |
| opencost.metrics.serviceMonitor.enabled | bool | `false` | |
| opencost.metrics.serviceMonitor.metricRelabelings | list | `[]` | |
| opencost.metrics.serviceMonitor.namespace | string | `""` | |
| opencost.metrics.serviceMonitor.namespaceSelector | object | `{}` | |
| opencost.metrics.serviceMonitor.relabelings | list | `[]` | |
| opencost.metrics.serviceMonitor.scrapeInterval | string | `"30s"` | |
| opencost.metrics.serviceMonitor.targetLabels | list | `[]` | |
| opencost.prometheus.external.enabled | bool | `false` | |
| opencost.prometheus.external.url | string | `"https://mimir-dev-push.infra.alto.com/prometheus"` | |
| opencost.prometheus.internal.enabled | bool | `true` | |
| opencost.prometheus.internal.namespaceName | string | `"opencost"` | |
| opencost.prometheus.internal.port | int | `9090` | |
| opencost.prometheus.internal.serviceName | string | `"my-prometheus"` | |
| opencost.tolerations | list | `[]` | |
| opencost.ui.enabled | bool | `true` | |
| opencost.ui.image.registry | string | `"quay.io"` | |
| opencost.ui.image.repository | string | `"kubecost1/opencost-ui"` | |
| opencost.ui.image.tag | string | `"latest"` | |
| opencost.ui.resources.limits.cpu | string | `"999m"` | |
| opencost.ui.resources.limits.memory | string | `"1G"` | |
| opencost.ui.resources.requests.cpu | string | `"10m"` | |
| opencost.ui.resources.requests.memory | string | `"55M"` | |
| service.annotations | object | `{}` | |
| service.labels | object | `{}` | |
| service.type | string | `"ClusterIP"` | |
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.automountServiceAccountToken | bool | `true` | |
| serviceAccount.create | bool | `true` | |

## Docs Generated by [helm-docs](https://github.com/norwoodj/helm-docs)
`helm-docs -t .github/configs/README.md.gotmpl`
You can then run `helm search repo opencost` to see the charts.

## OpenCost Links
* https://github.com/opencost/opencost/tree/develop/kubernetes
* https://www.opencost.io/docs/
* https://www.opencost.io/docs/
File renamed without changes.
68 changes: 68 additions & 0 deletions charts/opencost/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# opencost

Opencost and Opencost UI

![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![AppVersion: 1.9.8](https://img.shields.io/badge/AppVersion-1.9.8-informational?style=flat-square)

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| mattray | | <https://mattray.dev> |

## Installing the Chart

To install the chart with the release name `my-release`:

```console
$ helm install opencost opencost/opencost
```

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| annotations | object | `{}` | |
| opencost.exporter.defaultClusterId | string | `"default-cluster"` | |
| opencost.exporter.extraEnv | object | `{}` | |
| opencost.exporter.image.registry | string | `"quay.io"` | |
| opencost.exporter.image.repository | string | `"kubecost1/kubecost-cost-model"` | |
| opencost.exporter.image.tag | string | `"latest"` | |
| opencost.exporter.resources.limits.cpu | string | `"999m"` | |
| opencost.exporter.resources.limits.memory | string | `"1G"` | |
| opencost.exporter.resources.requests.cpu | string | `"10m"` | |
| opencost.exporter.resources.requests.memory | string | `"55M"` | |
| opencost.metrics.serviceMonitor.additionalLabels | object | `{}` | |
| opencost.metrics.serviceMonitor.enabled | bool | `false` | |
| opencost.metrics.serviceMonitor.metricRelabelings | list | `[]` | |
| opencost.metrics.serviceMonitor.namespace | string | `""` | |
| opencost.metrics.serviceMonitor.namespaceSelector | object | `{}` | |
| opencost.metrics.serviceMonitor.relabelings | list | `[]` | |
| opencost.metrics.serviceMonitor.scrapeInterval | string | `"30s"` | |
| opencost.metrics.serviceMonitor.targetLabels | list | `[]` | |
| opencost.prometheus.external.enabled | bool | `false` | |
| opencost.prometheus.external.url | string | `"https://mimir-dev-push.infra.alto.com/prometheus"` | |
| opencost.prometheus.internal.enabled | bool | `true` | |
| opencost.prometheus.internal.namespaceName | string | `"opencost"` | |
| opencost.prometheus.internal.port | int | `9090` | |
| opencost.prometheus.internal.serviceName | string | `"my-prometheus"` | |
| opencost.tolerations | list | `[]` | |
| opencost.ui.enabled | bool | `true` | |
| opencost.ui.image.registry | string | `"quay.io"` | |
| opencost.ui.image.repository | string | `"kubecost1/opencost-ui"` | |
| opencost.ui.image.tag | string | `"latest"` | |
| opencost.ui.resources.limits.cpu | string | `"999m"` | |
| opencost.ui.resources.limits.memory | string | `"1G"` | |
| opencost.ui.resources.requests.cpu | string | `"10m"` | |
| opencost.ui.resources.requests.memory | string | `"55M"` | |
| service.annotations | object | `{}` | |
| service.labels | object | `{}` | |
| service.type | string | `"ClusterIP"` | |
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.automountServiceAccountToken | bool | `true` | |
| serviceAccount.create | bool | `true` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
## Docs Generated by [helm-docs](https://github.com/norwoodj/helm-docs)
`helm-docs -t .README.md.gotmpl`
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

{{ template "chart.header" . }}

{{ template "chart.description" . }}

{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}
Expand All @@ -11,8 +11,7 @@
To install the chart with the release name `my-release`:

```console
$ helm repo add <put repo information>
$ helm install opencost <repoinfo>/{{ template "chart.name" . }}
$ helm install opencost opencost/{{ template "chart.name" . }}
```

{{ template "chart.requirementsSection" . }}
Expand All @@ -21,8 +20,4 @@ $ helm install opencost <repoinfo>/{{ template "chart.name" . }}

{{ template "helm-docs.versionFooter" . }}
## Docs Generated by [helm-docs](https://github.com/norwoodj/helm-docs)
`helm-docs -t .github/configs/README.md.gotmpl`

## OpenCost Links
* https://github.com/opencost/opencost/tree/develop/kubernetes
* https://www.opencost.io/docs/
`helm-docs -t .README.md.gotmpl`
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 0f4cfd6

Please sign in to comment.