Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional initContainers and volumes #17

Closed
31 changes: 31 additions & 0 deletions .github/workflows/on-push-main-publish-chart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish helm chart

on:
push:
branches:
- main
paths:
- 'charts/**'
- '.github/workflows/on-push-main-publish-chart.yml'
workflow_dispatch:

jobs:
publish-chart:

runs-on: ubuntu-latest

steps:
- 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: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
13 changes: 11 additions & 2 deletions charts/k6-loadtester/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,21 @@ apiVersion: v2
name: k6-loadtester
description: Flagger webhook using k6 to do load testing of the canary before rolling out traffic
type: application
version: 0.0.1
version: 0.0.3
appVersion: "0.1.1"
sources:
- https://github.com/grafana/flagger-k6-webhook
keywords:
- flagger
- canary
- webhook
- k6
- k6
home: https://github.com/k8s-at-home/charts/tree/master/charts/stable/autobrr
icon: https://avatars.githubusercontent.com/u/88781313?s=200&v=4
maintainers:
- name: funkypenguin
email: [email protected]
annotations:
artifacthub.io/changes: |-
- kind: added
description: Initial release
8 changes: 7 additions & 1 deletion charts/k6-loadtester/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ spec:
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
volumes:
{{- toYaml .Values.volumes | nindent 8 }}
initContainers:
{{ toYaml .Values.initContainers | indent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
Expand All @@ -47,7 +51,9 @@ spec:
secretKeyRef:
name: {{ $.Values.webhook.name }}
key: {{ $k | quote }}
{{- end }}
{{- end }}
volumeMounts:
{{- toYaml .Values.volumeMounts | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
12 changes: 11 additions & 1 deletion charts/k6-loadtester/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,14 @@ webhook:
# A list of configurable variables
vars:
"K6_CLOUD_TOKEN" : ""
"SLACK_TOKEN" : ""
"SLACK_TOKEN" : ""

# Additional volumes Deployment (can be used with initContainers, below)
volumes: []

## InitContainers allows injecting additional initContainers. This is meant to allow doing some changes
## (permissions, dir tree) on mounted volumes before starting prometheus
initContainers: []

# Additional VolumeMounts on the Deployment
volumeMounts: []