mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-18 18:49:50 +00:00
Migrated helm chart from jameswynn/helm-charts
Standard chart release pipeline from: https://helm.sh/docs/howto/chart_releaser_action/
This commit is contained in:
parent
b65f6fca19
commit
563cc9ce60
9 changed files with 379 additions and 0 deletions
31
charts/homepage/templates/common.yaml
Normal file
31
charts/homepage/templates/common.yaml
Normal file
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
{{- include "bjw-s.common.loader.init" . }}
|
||||
|
||||
{{- define "app-template.hardcodedValues" -}}
|
||||
|
||||
# Set the nameOverride based on the release name if no override has been set
|
||||
{{ if not .Values.global.nameOverride }}
|
||||
global:
|
||||
nameOverride: "{{ .Release.Name }}"
|
||||
{{ end }}
|
||||
|
||||
{{- end -}}
|
||||
{{- $_ := mergeOverwrite .Values (include "app-template.hardcodedValues" . | fromYaml) -}}
|
||||
|
||||
{{/* Append the configMap volume to the volumes */}}
|
||||
{{- define "homepage.configVolume" -}}
|
||||
enabled: "true"
|
||||
mountPath: "/app/config"
|
||||
type: "custom"
|
||||
volumeSpec:
|
||||
configMap:
|
||||
name: {{ (default (include "bjw-s.common.lib.chart.names.fullname" .) .Values.config.useExistingConfigMap) }}
|
||||
{{- end -}}
|
||||
{{- $_ := set .Values.persistence "homepage-config" (include "homepage.configVolume" . | fromYaml) -}}
|
||||
|
||||
{{ if .Values.enableRbac }}
|
||||
{{- $_ := set .Values.serviceAccount "create" "true" -}}
|
||||
{{ end }}
|
||||
|
||||
{{/* Render the templates */}}
|
||||
{{ include "bjw-s.common.loader.generate" . }}
|
34
charts/homepage/templates/configmap.yaml
Normal file
34
charts/homepage/templates/configmap.yaml
Normal file
|
@ -0,0 +1,34 @@
|
|||
{{ if not .Values.config.useExistingConfigMap }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "bjw-s.common.lib.chart.names.fullname" . }}
|
||||
labels:
|
||||
{{- include "bjw-s.common.lib.metadata.allLabels" . | nindent 4 }}
|
||||
data:
|
||||
bookmarks.yaml: {{- if .Values.config.bookmarks }} |
|
||||
{{- .Values.config.bookmarks | toYaml | nindent 4}}
|
||||
{{- else }} ""
|
||||
{{- end }}
|
||||
docker.yaml: {{- if .Values.config.docker }} |
|
||||
{{- .Values.config.docker | toYaml | nindent 4 }}
|
||||
{{- else }} ""
|
||||
{{- end }}
|
||||
kubernetes.yaml: {{- if .Values.config.kubernetes }} |
|
||||
{{- .Values.config.kubernetes | toYaml | nindent 4 }}
|
||||
{{- else }} ""
|
||||
{{- end }}
|
||||
services.yaml: {{- if .Values.config.services }} |
|
||||
{{- .Values.config.services | toYaml | nindent 4 }}
|
||||
{{- else }} ""
|
||||
{{- end }}
|
||||
settings.yaml: {{- if .Values.config.settings }} |
|
||||
{{- .Values.config.settings | toYaml | nindent 4 }}
|
||||
{{- else }} ""
|
||||
{{- end }}
|
||||
widgets.yaml: {{- if .Values.config.widgets }} |
|
||||
{{- .Values.config.widgets | toYaml | nindent 4 }}
|
||||
{{- else }} ""
|
||||
{{- end }}
|
||||
{{ end }}
|
71
charts/homepage/templates/rbac.yaml
Normal file
71
charts/homepage/templates/rbac.yaml
Normal file
|
@ -0,0 +1,71 @@
|
|||
{{- include "bjw-s.common.loader.init" . }}
|
||||
{{ if .Values.enableRbac }}
|
||||
{{- $serviceAccountName := include "bjw-s.common.lib.chart.names.serviceAccountName" . -}}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
type: kubernetes.io/service-account-token
|
||||
metadata:
|
||||
name: {{ $serviceAccountName }}
|
||||
{{- with (merge (.Values.labels | default dict) (include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml)) }}
|
||||
labels: {{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
kubernetes.io/service-account.name: {{ $serviceAccountName }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ $serviceAccountName }}
|
||||
{{- with (merge (.Values.labels | default dict) (include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml)) }}
|
||||
labels: {{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with (merge (.Values.annotations | default dict) (include "bjw-s.common.lib.metadata.globalAnnotations" $ | fromYaml)) }}
|
||||
annotations: {{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- namespaces
|
||||
- pods
|
||||
- nodes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- apiGroups:
|
||||
- extensions
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- ingresses
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- apiGroups:
|
||||
- metrics.k8s.io
|
||||
resources:
|
||||
- nodes
|
||||
- pods
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ $serviceAccountName }}
|
||||
{{- with (merge (.Values.labels | default dict) (include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml)) }}
|
||||
labels: {{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with (merge (.Values.annotations | default dict) (include "bjw-s.common.lib.metadata.globalAnnotations" $ | fromYaml)) }}
|
||||
annotations: {{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ $serviceAccountName }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ $serviceAccountName }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue