Skip to content

Commit

Permalink
Merge 9006031 into d346f47
Browse files Browse the repository at this point in the history
  • Loading branch information
nlamirault authored Dec 2, 2020
2 parents d346f47 + 9006031 commit 1f475bf
Show file tree
Hide file tree
Showing 14 changed files with 181 additions and 87 deletions.
10 changes: 5 additions & 5 deletions .github/ct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@

# See https://github.com/helm/chart-testing#configuration
remote: origin
target-branch: main
target-branch: master
chart-dirs:
- charts
chart-repos:
- stable=https://charts.helm.sh/stable
# - prometheus-community=https://prometheus-community.github.io/helm-charts
# - grafana=https://grafana.github.io/helm-charts
- prometheus-community=https://prometheus-community.github.io/helm-charts
- banzaicloud=https://kubernetes-charts.banzaicloud.com
helm-extra-args: --timeout 600s
excluded-charts:
# excluded-charts:
# If not running on GCE, will error: "Failed to get GCE config"
# - xxxxxx
# - xxxxxx
11 changes: 11 additions & 0 deletions .github/templates/index.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Portefaix Hub - Helm charts repository

Welcome to the Portefaix Hub.

|Name|version|description|Type|appVersion|created|
|:--|:-:|:--|:--|:--:|:--|
{{#each entries}}
{{#each .}}
{{this.name}}|{{this.version}}|{{this.description}}|{{this.type}}|{{this.appVersion}}|{{this.created}}
{{/each}}
{{/each}}
84 changes: 84 additions & 0 deletions .github/workflows/chart-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Copyright (C) 2020 Nicolas Lamirault <[email protected]>

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Lint and Test Charts

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

# jobs:
# lint-test:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v2

# - name: Set up Helm
# uses: azure/setup-helm@v1
# with:
# version: v3.4.0

# - uses: actions/setup-python@v2
# with:
# python-version: 3.7

# - name: Set up chart-testing
# uses: helm/[email protected]

# - name: Run chart-testing (lint)
# id: lint
# run: ct lint --config .github/ct.yaml
# if: steps.list-changed.outputs.changed == 'true'

# - name: Create kind cluster
# uses: helm/[email protected]
# if: steps.list-changed.outputs.changed == 'true'

# - name: Run chart-testing (install)
# run: ct install --config .github/ct.yaml
# if: steps.list-changed.outputs.changed == 'true'



jobs:
# Reference https://github.com/marketplace/actions/helm-chart-testing
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Fetch history
run: git fetch --prune --unshallow

- name: Run chart-testing (lint)
id: lint
uses: helm/[email protected]
with:
command: lint
config: .github/ct.yaml

- name: Create kind cluster
uses: helm/[email protected]
# Only build a kind cluster if there are chart changes to test.
if: steps.lint.outputs.changed == 'true'

# - name: Run chart-testing (install)
# uses: helm/[email protected]
# with:
# command: install
# config: .github/ct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,35 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: GitHub Pages
name: Chart website

on:
push:
branches:
- master
- gh-pages

jobs:
build:
name: Deploy docs
update-ui:
runs-on: ubuntu-latest
steps:
- name: Checkout master
uses: actions/checkout@v1
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x

- run: npx js-yaml index.yaml | npx hbs-cli .github/templates/index.hbs -i - -e md

- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
- name: Commit changes
uses: EndBug/add-and-commit@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57 changes: 0 additions & 57 deletions .github/workflows/charts-test.yml

This file was deleted.

21 changes: 15 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
# Terraform
**/.terraform
.tfstate.*
# Created by https://www.toptal.com/developers/gitignore/api/helm,vscode
# Edit at https://www.toptal.com/developers/gitignore?templates=helm,vscode

# Python
.venv
__pycache__
### Helm ###
# Chart dependencies
**/charts/*.tgz

### vscode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# End of https://www.toptal.com/developers/gitignore/api/helm,vscode
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ init:
# ====================================

##@ Helm


31 changes: 27 additions & 4 deletions charts/thanos-mixin/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,52 @@
# Copyright (C) 2020 Nicolas Lamirault <[email protected]>

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: v2
name: thanos-mixin
description: A Helm chart for Thanos Mixin
home: https://thanos.io/
home: https://github.com/nlamirault/portefaix-hub
icon: https://raw.githubusercontent.com/thanos-io/thanos/master/docs/img/Thanos-logo_fullmedium.png
sources:
- https://github.com/thanos-io/thanos
- https://github.com/nlamirault/portefaix-hub/tree/master/charts/thanos-mixin
type: application
keywords:
- thanos
- monitoring-mixin
- portefaix

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.0
version: 0.3.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.17.1

dependencies:
- name: kube-prometheus-stack
version: 12.3.0
repository: https://prometheus-community.github.io/helm-charts
- name: thanos
version: 0.3.30
repository: https://kubernetes-charts.banzaicloud.com

maintainers:
- name: nlamirault
email: [email protected]

# https://artifacthub.io/docs/topics/repositories/
annotations:
artifacthub.io/changes: |
Expand Down
8 changes: 8 additions & 0 deletions charts/thanos-mixin/ci/test-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Values for CI
#

additionalLabels:
test: github

additionalAnnotations:
made-by: portefaix
4 changes: 2 additions & 2 deletions charts/thanos-mixin/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ $.Chart.Name }} has been installed. Check its status by running:
kubectl --namespace {{ template "thanos-mixin.namespace" . }} get prometheusrules -l "release={{ $.Release.Name }}"
kubectl --namespace {{ template "thanos-mixin.namespace" . }} get prometheusrules

Visit https://github.com/nlamirault/portefaix/charts/thanos-mixin.
Visit https://github.com/nlamirault/portefaix-hub/charts/thanos-mixin.
8 changes: 4 additions & 4 deletions charts/thanos-mixin/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
},
"additionalLabels": {
"title": "Additional labels to add to the Prometheus rules",
"type": "array",
"default": []
"type": "object",
"default": {}
},
"additionalAnnotations": {
"title": "Additional annotations to add to the Prometheus rules",
"type": "array",
"default": []
"type": "object",
"default": {}
}
},
"required": []
Expand Down
2 changes: 1 addition & 1 deletion charts/thanos-mixin/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ additionalLabels: {}

## Additional annotations to add to the Prometheus rules
##
additionalAnnotations: {}
additionalAnnotations: {}
Empty file added docs/.gitignore
Empty file.
Binary file added docs/thanos-mixin-0.3.0.tgz
Binary file not shown.

0 comments on commit 1f475bf

Please sign in to comment.