Skip to content

Commit

Permalink
new chart for sentinel-dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikDK committed Jan 27, 2023
1 parent e13693a commit 3137550
Show file tree
Hide file tree
Showing 7 changed files with 249 additions and 0 deletions.
23 changes: 23 additions & 0 deletions charts/sentinel-dashboard/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
6 changes: 6 additions & 0 deletions charts/sentinel-dashboard/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v2
name: sentinel-dashboard
appVersion: "1.0.0"
version: 1.0.0
description: A lightweight tool to help .Net developers work with the output of serilog's structured json logs.
type: application
58 changes: 58 additions & 0 deletions charts/sentinel-dashboard/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "sentinel-dashboard.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "sentinel-dashboard.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 }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "sentinel-dashboard.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Controller labels.
*/}}
{{- define "sentinel-dashboard.labels" -}}
helm.sh/chart: {{ include "sentinel-dashboard.chart" . }}
{{ include "sentinel-dashboard.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Controller Selector labels.
*/}}
{{- define "sentinel-dashboard.selectorLabels" -}}
app.kubernetes.io/name: {{ include "sentinel-dashboard.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use.
*/}}
{{- define "sentinel-dashboard.serviceAccountName" -}}
{{- default (include "sentinel-dashboard.fullname" .) .Values.serviceAccount.name }}
{{- end }}
62 changes: 62 additions & 0 deletions charts/sentinel-dashboard/templates/ui-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "sentinel-dashboard.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "sentinel-dashboard.labels" . | nindent 4 }}
spec:
strategy:
type: Recreate
selector:
matchLabels:
{{- include "sentinel-dashboard.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "sentinel-dashboard.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "sentinel-dashboard.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ include "sentinel-dashboard.fullname" . }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: {{ .Values.image.url }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
env:
- name: humio-api
value: {{ .Values.humioApi }}
- name: humio-repository
value: {{ .Values.humioRepository }}
- name: humio-token
valueFrom:
secretKeyRef:
name: {{ .Values.humioTokenSecret }}
key: token
optional: false
- name: namespace-filter
value: {{ .Values.namespaceFilter }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
26 changes: 26 additions & 0 deletions charts/sentinel-dashboard/templates/ui-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "sentinel-dashboard.fullname" . }}
namespace: {{ .Release.Namespace }}
{{- with .Values.ingressAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.ingressClassName }}
tls:
- hosts:
- {{ .Values.ingress }}
secretName: {{ include "sentinel-dashboard.fullname" . }}
rules:
- host: {{ .Values.ingress }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "sentinel-dashboard.fullname" . }}
port:
number: 8080
15 changes: 15 additions & 0 deletions charts/sentinel-dashboard/templates/ui-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "sentinel-dashboard.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "sentinel-dashboard.labels" . | nindent 4 }}
spec:
type: "ClusterIP"
ports:
- port: 8080
targetPort: 4654
name: http
selector:
{{- include "sentinel-dashboard.selectorLabels" . | nindent 4 }}
59 changes: 59 additions & 0 deletions charts/sentinel-dashboard/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Use these fields to override the name of the deployment
nameOverride: ""
fullnameOverride: ""

image:
url: "henrikdk/sentinel-dashboard-ui:20230127-1c9172c"
pullPolicy: IfNotPresent

# Optional list of namespace prefixes that will be accessible from this instance.
# Expects either an empty string, a single value prefixes or a list of prefixes with out spaces eg. "value,other,third"
namespaceFilter: ""

# Url to the humio instances API endpoint, defaults to humio cloud.
humioApi: "https://cloud.humio.com"

# Name of the humio repository that will act as a source for all error data.
humioRepository: ""

# Name of the secret that contains the access token used to access the Humio API. The secret must have the token value provided in the 'token' key.
humioTokenSecret: ""

# Ingress url where the dashboard will be reachable
ingress: ""

# Ingress class for the deployed ingress.
ingressClass: ""

# Annotations added to the ingress:
ingressAnnotations: {}

imagePullSecrets: []

podAnnotations: {}

podSecurityContext: {}
# fsGroup: 2000

securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000

resources: {}
# Not enabled by default, but values are provided as guidance.
# limits:
# cpu: 500m
# memory: 256Mi
# requests:
# cpu: 100m
# memory: 60Mi

nodeSelector: {}

tolerations: []

affinity: {}

0 comments on commit 3137550

Please sign in to comment.