-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
139 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Helm ignore | ||
*.tgz | ||
|
||
# Hidden directories | ||
**/.DS_Store | ||
**/.idea | ||
|
||
# Temp files | ||
*.tmp | ||
*.bak | ||
*.swp | ||
*.save | ||
|
||
# IDEs | ||
.idea/ | ||
.vscode/ | ||
*.iml | ||
|
||
# Logs | ||
logs/ | ||
*.log | ||
|
||
# OS generated | ||
*.pid | ||
*.seed | ||
*.pid.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
entries: | ||
trufflehog: | ||
- apiVersion: v2 | ||
created: "2023-09-12T08:47:06.739867-07:00" | ||
description: A Helm chart for trufflehog secrets scanning | ||
digest: ef6023985ef6d494093cf19077f70d09518b073271facfdec49c93790f3b4426 | ||
name: trufflehog | ||
urls: | ||
- https://trufflescurity.github.io/helm-charts/trufflehog-0.1.0.tgz | ||
version: 0.1.0 | ||
generated: "2023-09-12T08:47:06.739412-07:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: v2 | ||
name: trufflehog | ||
description: A Helm chart for trufflehog secrets scanning | ||
version: 0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "trufflehog.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
*/}} | ||
{{- define "trufflehog.fullname" -}} | ||
{{- if .Values.fullnameOverride -}} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "trufflehog.labels" -}} | ||
helm.sh/chart: {{ include "trufflehog.chart" . }} | ||
{{ include "trufflehog.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end -}} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "trufflehog.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "trufflehog.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end -}} | ||
|
||
{{/* | ||
Chart version | ||
*/}} | ||
{{- define "trufflehog.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "trufflehog.fullname" . }} | ||
labels: | ||
{{- include "trufflehog.labels" . | nindent 4 }} | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: {{ include "trufflehog.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: {{ include "trufflehog.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
spec: | ||
volumes: | ||
- name: config-secret-volume | ||
secret: | ||
secretName: {{ .Values.config.secretName }} | ||
containers: | ||
- name: trufflehog | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
terminationMessagePolicy: FallbackToLogsOnError | ||
command: ["/usr/local/bin/scanner", "scan", "--config=/secret/config.yaml", "--port=8080"] | ||
livenessProbe: | ||
httpGet: | ||
path: /healthz | ||
port: 8080 | ||
initialDelaySeconds: {{ .Values.probe.initialDelaySeconds }} | ||
periodSeconds: {{ .Values.probe.periodSeconds }} | ||
volumeMounts: | ||
- name: config-secret-volume | ||
mountPath: /secret/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
replicaCount: 1 | ||
|
||
image: | ||
repository: us-docker.pkg.dev/thog-artifacts/public/scanner | ||
tag: latest | ||
|
||
config: | ||
secretName: config | ||
|
||
probe: | ||
initialDelaySeconds: 3 | ||
periodSeconds: 3 | ||
|
||
nameOverride: "" | ||
fullnameOverride: "" |