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

feat: lint #1

Merged
merged 18 commits into from
Jan 29, 2020
38 changes: 38 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Lint and Test Charts

on: pull_request

jobs:
lint-app:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Lint Helm
uses: yeouchien/helm3-action@f3a7c239c5c60777210c8e631839edf5dd3fa29c
with:
command: lint ./sentry
# - name: Create kind cluster
# uses: helm/kind-action@v1.0.0-alpha.3
# with:
# install_local_path_provisioner: true
# # Only build a kind cluster if there are chart changes to test.
# if: steps.lint.outputs.changed == 'true'
# - name: Run Chart
# uses: yeouchien/helm3-action@f3a7c239c5c60777210c8e631839edf5dd3fa29c
# with:
# command: upgrade sentry --install ./sentry

lint-db:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Lint Helm
uses: yeouchien/helm3-action@f3a7c239c5c60777210c8e631839edf5dd3fa29c
with:
command: lint ./sentry-db


# - name: Run chart-testing (install)
# uses: helm/chart-testing-action@v1.0.0-alpha.3
# with:
# command: install
15 changes: 14 additions & 1 deletion sentry/templates/_helper.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,17 @@
{{- end -}}

{{- define "sentry.port" -}}9000{{- end -}}
{{- define "snuba.port" -}}1218{{- end -}}
{{- define "snuba.port" -}}1218{{- end -}}

{{- define "sentry.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion sentry/templates/hooks/user-create.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.hooks.initialUser.create .Values.hooks.enabled -}}
{{- if and .Values.user.create .Values.hooks.enabled -}}
apiVersion: batch/v1
kind: Job
metadata:
Expand Down
9 changes: 5 additions & 4 deletions sentry/values.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
prefix:

user:
create: true
email: admin@sentry.com
password: aaaa

hooks:
enabled: true
dbInit:
resources: {}
snubaInit:
resources: {}
initialUser:
create: true
email: admin@sentry.com
password: abcd

images:
sentry:
Expand Down