diff --git a/Earthfile b/Earthfile index 935f62e5..f3dc76a1 100644 --- a/Earthfile +++ b/Earthfile @@ -106,7 +106,11 @@ docker: WORKDIR /app COPY ./policy ./policy + VOLUME /app/policy + COPY ./schemas ./schemas + VOLUME /app/schemas + COPY (+build-binary/kubechecks --GOARCH=amd64 --VARIANT=$TARGETVARIANT) . RUN ./kubechecks help diff --git a/charts/kubechecks/Chart.yaml b/charts/kubechecks/Chart.yaml index d8e5ea20..1eb28768 100644 --- a/charts/kubechecks/Chart.yaml +++ b/charts/kubechecks/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: kubechecks description: A Helm chart for kubechecks -version: 0.2.3 +version: 0.3.1 appVersion: "1.0.10" type: application maintainers: diff --git a/charts/kubechecks/templates/deployment.yaml b/charts/kubechecks/templates/deployment.yaml index d6e74d4c..8c44ba31 100644 --- a/charts/kubechecks/templates/deployment.yaml +++ b/charts/kubechecks/templates/deployment.yaml @@ -80,6 +80,9 @@ spec: port: 8080 scheme: HTTP {{- toYaml .Values.deployment.readinessProbe | nindent 12 }} + {{- with .Values.deployment.volumeMounts }} + volumeMounts: {{ . | toYaml | nindent 12 }} + {{- end }} {{- with .Values.deployment.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} @@ -92,3 +95,6 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.deployment.volumes }} + volumes: {{ . | toYaml | nindent 8 }} + {{- end }} diff --git a/charts/kubechecks/tests/basic_deployment_test.yaml b/charts/kubechecks/tests/basic_deployment_test.yaml index e7a5c40d..b9c7580b 100644 --- a/charts/kubechecks/tests/basic_deployment_test.yaml +++ b/charts/kubechecks/tests/basic_deployment_test.yaml @@ -128,3 +128,25 @@ tests: - equal: path: spec.template.spec.containers[0].args value: [one, two, "123"] + - it: can have volumes + set: + deployment: + volumes: + - name: test-volume + hostPath: + path: /abc/def + volumeMounts: + - name: test-volume + path: /ghi + asserts: + - equal: + path: spec.template.spec.volumes + value: + - hostPath: + path: /abc/def + name: test-volume + - equal: + path: spec.template.spec.containers[0].volumeMounts + value: + - name: test-volume + path: /ghi diff --git a/charts/kubechecks/values.yaml b/charts/kubechecks/values.yaml index e28fe2b1..23014627 100644 --- a/charts/kubechecks/values.yaml +++ b/charts/kubechecks/values.yaml @@ -77,6 +77,9 @@ deployment: successThreshold: 1 timeoutSeconds: 5 + volumes: [] + volumeMounts: [] + secrets: create: false name: '{{ include "kubechecks.fullname" . }}'