Skip to content

Commit

Permalink
fix linter complaints, add ci tests, add makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexMapley committed Nov 15, 2023
1 parent f51d84b commit 9b3bcfa
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 9 deletions.
1 change: 0 additions & 1 deletion charts/posit-chronicle/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: chronicle
description: Helm chart for the Chronicle Server
version: 0.1.0
appVersion: 2023.11.0

icon: https://rstudio.com/wp-content/uploads/2018/10/RStudio-Logo-Flat.png
home: https://www.posit.co
sources:
Expand Down
9 changes: 9 additions & 0 deletions charts/posit-chronicle/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
lint:
helm lint --strict --set service.name=example --set service.version=0.0.1 -f ./ci/empty-values.yaml .
helm lint --strict --set service.name=example --set service.version=0.0.1 -f ./ci/simple-values.yaml .

template:
helm template -f ci/simple-values.yaml .

template-debug:
helm template -f ci/simple-values.yaml --debug .
Empty file.
26 changes: 26 additions & 0 deletions charts/posit-chronicle/ci/simple-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
image:
tag: "latest"

serviceaccount:
enabled: false

Check failure on line 5 in charts/posit-chronicle/ci/simple-values.yaml

View workflow job for this annotation

GitHub Actions / lint

[indentation] wrong indentation: expected 2 but found 3
annotations: {
eks.amazonaws.com/role-arn: arn:aws:iam::123123123123123:role/chronicle-serviceaccount-role

Check failure on line 7 in charts/posit-chronicle/ci/simple-values.yaml

View workflow job for this annotation

GitHub Actions / lint

[indentation] wrong indentation: expected 5 but found 6
}

config:
localStorage:

Check failure on line 11 in charts/posit-chronicle/ci/simple-values.yaml

View workflow job for this annotation

GitHub Actions / lint

[indentation] wrong indentation: expected 2 but found 3
enabled: true

Check failure on line 12 in charts/posit-chronicle/ci/simple-values.yaml

View workflow job for this annotation

GitHub Actions / lint

[indentation] wrong indentation: expected 5 but found 6
retentionPeriod: "7d"
logging:
serviceLog: "STDOUT"

Check failure on line 15 in charts/posit-chronicle/ci/simple-values.yaml

View workflow job for this annotation

GitHub Actions / lint

[indentation] wrong indentation: expected 5 but found 6
serviceLogLevel: "DEBUG"
serviceLogFormat: "JSON"
profiling:
enabled: true

Check failure on line 19 in charts/posit-chronicle/ci/simple-values.yaml

View workflow job for this annotation

GitHub Actions / lint

[indentation] wrong indentation: expected 5 but found 6
s3Storage:
enabled: true

Check failure on line 21 in charts/posit-chronicle/ci/simple-values.yaml

View workflow job for this annotation

GitHub Actions / lint

[indentation] wrong indentation: expected 5 but found 6
bucket: "posit-chronicle-dev"
compactionEnabled: true

storage:
persistentVolumeSize: 10Gi
2 changes: 1 addition & 1 deletion charts/posit-chronicle/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Generate selector labels for various resources
app: chronicle-server
{{- end -}}

{{- define "posit-chronicle.serviceaccount.selectorLabels" -}}
{{- define "posit-chronicle.service.selectorLabels" -}}
{{- range $key,$value := $.Values.serviceaccount.selectorLabels -}}
{{ $key }}: {{ $value | quote }}
{{ end }}
Expand Down
3 changes: 1 addition & 2 deletions charts/posit-chronicle/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
{{- if $.Values.serviceaccount.enabled -}}
{{- if .Values.serviceaccount.enabled -}}
apiVersion: v1
kind: ServiceAccount
metadata:
Expand All @@ -9,4 +9,3 @@ metadata:
annotations:
{{ include "posit-chronicle.serviceaccount.annotations" . | indent 4 }}
{{- end -}}
---
4 changes: 2 additions & 2 deletions charts/posit-chronicle/templates/stateful-set.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ spec:
replicas: {{ .Values.replicas }}
selector:
matchLabels:
{{- include "posit-chronicle.selectorLabels" . | nindent 6 }}
{{- include "posit-chronicle.pod.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "posit-chronicle.pod.labels" . | nindent 8 }}
{{- include "posit-chronicle.selectorLabels" . | indent 8 }}
{{- include "posit-chronicle.pod.selectorLabels" . | indent 8 }}
annotations:
{{- include "posit-chronicle.pod.annotations" . | indent 8 }}
spec:
Expand Down
5 changes: 3 additions & 2 deletions charts/posit-chronicle/templates/svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ kind: Service
metadata:
name: chronicle-server
labels:
{{ include "posit-chronicle.service.labels" . | indent 4 }}
{{- include "posit-chronicle.service.labels" . | nindent 4 }}
{{- include "posit-chronicle.service.selectorLabels" . | indent 4 }}
annotations:
{{ include "posit-chronicle.service.annotations" . | indent 4 }}
spec:
selector:
{{- include "posit-chronicle.selectorLabels" . | nindent 5 }}
{{- include "posit-chronicle.service.selectorLabels" . | indent 4 }}
ports:
- port: {{ .Values.service.rest.port }}
targetPort: {{ .Values.service.rest.targetPort }}
Expand Down
2 changes: 1 addition & 1 deletion charts/posit-chronicle/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ config:
https:
# If https.enabled=true, we will ignore any http
# values and enable https in our config instead
enabled: false
enabled: false
listen: ":443"
key: ""
certificate: ""
Expand Down

0 comments on commit 9b3bcfa

Please sign in to comment.