Skip to content

Commit 0f4cfd6

Browse files
authored
Merge pull request #11 from toscott/main
FIXES #10 - Publish Chart to a proper helm repository
2 parents 5d1078b + cb38cbd commit 0f4cfd6

File tree

15 files changed

+84
-72
lines changed

15 files changed

+84
-72
lines changed

.github/workflows/helm-test.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,9 @@ jobs:
3939
uses: tj-actions/changed-files@v35
4040
with:
4141
files: |
42-
templates/**
43-
Chart.yaml
44-
values.yaml
45-
helm-test.yml
42+
charts/**
4643
47-
# change detection in ct seems to not detect some changes. Using simple file modification for now.
44+
# change detection in ct seems to not detect some changes. Using simple file modification for now.
4845
# - name: Run chart-testing (list-changed)
4946
# id: list-changed
5047
# run: |
@@ -56,7 +53,7 @@ jobs:
5653
# run: ct lint --chart-dirs . --target-branch ${{ github.event.repository.default_branch }}
5754

5855
- name: Run chart-testing (lint)
59-
run: ct lint --chart-dirs . --charts .
56+
run: ct lint --all
6057

6158
- name: Create kind cluster
6259
uses: helm/kind-action@v1.4.0
@@ -67,6 +64,5 @@ jobs:
6764
# run: ct install --chart-dirs . --target-branch ${{ github.event.repository.default_branch }} --upgrade
6865

6966
- name: Run chart-testing (install)
70-
run: ct install --chart-dirs . --charts .
71-
72-
67+
run: ct install --all
68+
if: steps.files-changed.outputs.any_modified == 'true'
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
# heavily borrowed from https://github.com/dirien/minecraft-prometheus-exporter/blob/main/.github/workflows/helm-publish.yaml
21
---
32
name: chart-publish
43
on:
54
push:
65
branches:
76
- main
8-
paths:
9-
- 'charts/**'
107
env:
118
HELM_DOCS_VERSION: '1.11.0'
129

@@ -50,7 +47,7 @@ jobs:
5047
- name: Run chart-releaser
5148
uses: helm/chart-releaser-action@be16258da8010256c6e82849661221415f031968 # v1.5.0
5249
with:
53-
charts_dir: ./
50+
charts_dir: charts
5451
config: './.github/configs/cr.yaml'
5552
env:
5653
CR_TOKEN: '${{ secrets.GITHUB_TOKEN }}'

README.md

Lines changed: 7 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -11,62 +11,18 @@ Opencost and Opencost UI
1111
| ---- | ------ | --- |
1212
| mattray | | <https://mattray.dev> |
1313

14-
## Installing the Chart
14+
## Usage
1515

16-
To install the chart with the release name `my-release`:
16+
[Helm](https://helm.sh/) must be installed to use the charts. Please refer to Helm's [documentation](https://helm.sh/docs/) to get started.
17+
18+
Once Helm is set up properly, add the repo as follows:
1719

1820
```console
19-
$ helm repo add <put repo information>
20-
$ helm install opencost <repoinfo>/opencost
21+
helm repo add opencost https://opencost.github.io/opencost-helm-chart
2122
```
2223

23-
## Values
24-
25-
| Key | Type | Default | Description |
26-
|-----|------|---------|-------------|
27-
| annotations | object | `{}` | |
28-
| opencost.exporter.defaultClusterId | string | `"default-cluster"` | |
29-
| opencost.exporter.extraEnv | object | `{}` | |
30-
| opencost.exporter.image.registry | string | `"quay.io"` | |
31-
| opencost.exporter.image.repository | string | `"kubecost1/kubecost-cost-model"` | |
32-
| opencost.exporter.image.tag | string | `"latest"` | |
33-
| opencost.exporter.resources.limits.cpu | string | `"999m"` | |
34-
| opencost.exporter.resources.limits.memory | string | `"1G"` | |
35-
| opencost.exporter.resources.requests.cpu | string | `"10m"` | |
36-
| opencost.exporter.resources.requests.memory | string | `"55M"` | |
37-
| opencost.metrics.serviceMonitor.additionalLabels | object | `{}` | |
38-
| opencost.metrics.serviceMonitor.enabled | bool | `false` | |
39-
| opencost.metrics.serviceMonitor.metricRelabelings | list | `[]` | |
40-
| opencost.metrics.serviceMonitor.namespace | string | `""` | |
41-
| opencost.metrics.serviceMonitor.namespaceSelector | object | `{}` | |
42-
| opencost.metrics.serviceMonitor.relabelings | list | `[]` | |
43-
| opencost.metrics.serviceMonitor.scrapeInterval | string | `"30s"` | |
44-
| opencost.metrics.serviceMonitor.targetLabels | list | `[]` | |
45-
| opencost.prometheus.external.enabled | bool | `false` | |
46-
| opencost.prometheus.external.url | string | `"https://mimir-dev-push.infra.alto.com/prometheus"` | |
47-
| opencost.prometheus.internal.enabled | bool | `true` | |
48-
| opencost.prometheus.internal.namespaceName | string | `"opencost"` | |
49-
| opencost.prometheus.internal.port | int | `9090` | |
50-
| opencost.prometheus.internal.serviceName | string | `"my-prometheus"` | |
51-
| opencost.tolerations | list | `[]` | |
52-
| opencost.ui.enabled | bool | `true` | |
53-
| opencost.ui.image.registry | string | `"quay.io"` | |
54-
| opencost.ui.image.repository | string | `"kubecost1/opencost-ui"` | |
55-
| opencost.ui.image.tag | string | `"latest"` | |
56-
| opencost.ui.resources.limits.cpu | string | `"999m"` | |
57-
| opencost.ui.resources.limits.memory | string | `"1G"` | |
58-
| opencost.ui.resources.requests.cpu | string | `"10m"` | |
59-
| opencost.ui.resources.requests.memory | string | `"55M"` | |
60-
| service.annotations | object | `{}` | |
61-
| service.labels | object | `{}` | |
62-
| service.type | string | `"ClusterIP"` | |
63-
| serviceAccount.annotations | object | `{}` | |
64-
| serviceAccount.automountServiceAccountToken | bool | `true` | |
65-
| serviceAccount.create | bool | `true` | |
66-
67-
## Docs Generated by [helm-docs](https://github.com/norwoodj/helm-docs)
68-
`helm-docs -t .github/configs/README.md.gotmpl`
24+
You can then run `helm search repo opencost` to see the charts.
6925

7026
## OpenCost Links
7127
* https://github.com/opencost/opencost/tree/develop/kubernetes
72-
* https://www.opencost.io/docs/
28+
* https://www.opencost.io/docs/
File renamed without changes.

charts/opencost/README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# opencost
2+
3+
Opencost and Opencost UI
4+
5+
![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)
6+
7+
## Maintainers
8+
9+
| Name | Email | Url |
10+
| ---- | ------ | --- |
11+
| mattray | | <https://mattray.dev> |
12+
13+
## Installing the Chart
14+
15+
To install the chart with the release name `my-release`:
16+
17+
```console
18+
$ helm install opencost opencost/opencost
19+
```
20+
21+
## Values
22+
23+
| Key | Type | Default | Description |
24+
|-----|------|---------|-------------|
25+
| annotations | object | `{}` | |
26+
| opencost.exporter.defaultClusterId | string | `"default-cluster"` | |
27+
| opencost.exporter.extraEnv | object | `{}` | |
28+
| opencost.exporter.image.registry | string | `"quay.io"` | |
29+
| opencost.exporter.image.repository | string | `"kubecost1/kubecost-cost-model"` | |
30+
| opencost.exporter.image.tag | string | `"latest"` | |
31+
| opencost.exporter.resources.limits.cpu | string | `"999m"` | |
32+
| opencost.exporter.resources.limits.memory | string | `"1G"` | |
33+
| opencost.exporter.resources.requests.cpu | string | `"10m"` | |
34+
| opencost.exporter.resources.requests.memory | string | `"55M"` | |
35+
| opencost.metrics.serviceMonitor.additionalLabels | object | `{}` | |
36+
| opencost.metrics.serviceMonitor.enabled | bool | `false` | |
37+
| opencost.metrics.serviceMonitor.metricRelabelings | list | `[]` | |
38+
| opencost.metrics.serviceMonitor.namespace | string | `""` | |
39+
| opencost.metrics.serviceMonitor.namespaceSelector | object | `{}` | |
40+
| opencost.metrics.serviceMonitor.relabelings | list | `[]` | |
41+
| opencost.metrics.serviceMonitor.scrapeInterval | string | `"30s"` | |
42+
| opencost.metrics.serviceMonitor.targetLabels | list | `[]` | |
43+
| opencost.prometheus.external.enabled | bool | `false` | |
44+
| opencost.prometheus.external.url | string | `"https://mimir-dev-push.infra.alto.com/prometheus"` | |
45+
| opencost.prometheus.internal.enabled | bool | `true` | |
46+
| opencost.prometheus.internal.namespaceName | string | `"opencost"` | |
47+
| opencost.prometheus.internal.port | int | `9090` | |
48+
| opencost.prometheus.internal.serviceName | string | `"my-prometheus"` | |
49+
| opencost.tolerations | list | `[]` | |
50+
| opencost.ui.enabled | bool | `true` | |
51+
| opencost.ui.image.registry | string | `"quay.io"` | |
52+
| opencost.ui.image.repository | string | `"kubecost1/opencost-ui"` | |
53+
| opencost.ui.image.tag | string | `"latest"` | |
54+
| opencost.ui.resources.limits.cpu | string | `"999m"` | |
55+
| opencost.ui.resources.limits.memory | string | `"1G"` | |
56+
| opencost.ui.resources.requests.cpu | string | `"10m"` | |
57+
| opencost.ui.resources.requests.memory | string | `"55M"` | |
58+
| service.annotations | object | `{}` | |
59+
| service.labels | object | `{}` | |
60+
| service.type | string | `"ClusterIP"` | |
61+
| serviceAccount.annotations | object | `{}` | |
62+
| serviceAccount.automountServiceAccountToken | bool | `true` | |
63+
| serviceAccount.create | bool | `true` | |
64+
65+
----------------------------------------------
66+
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
67+
## Docs Generated by [helm-docs](https://github.com/norwoodj/helm-docs)
68+
`helm-docs -t .README.md.gotmpl`
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
21
{{ template "chart.header" . }}
2+
33
{{ template "chart.description" . }}
44

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

1313
```console
14-
$ helm repo add <put repo information>
15-
$ helm install opencost <repoinfo>/{{ template "chart.name" . }}
14+
$ helm install opencost opencost/{{ template "chart.name" . }}
1615
```
1716

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

2221
{{ template "helm-docs.versionFooter" . }}
2322
## Docs Generated by [helm-docs](https://github.com/norwoodj/helm-docs)
24-
`helm-docs -t .github/configs/README.md.gotmpl`
25-
26-
## OpenCost Links
27-
* https://github.com/opencost/opencost/tree/develop/kubernetes
28-
* https://www.opencost.io/docs/
23+
`helm-docs -t .README.md.gotmpl`
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)