Skip to content

Commit

Permalink
Addressing several lingering issues (#29)
Browse files Browse the repository at this point in the history
* service account name should be blank by default
* resource naming is now consistent
* Update all references to the old homepage repo and artifact
* Added support for extra rules in ClusterRole
* Added example envFrom to values.yaml
* More environment variable examples
  • Loading branch information
jameswynn authored Aug 12, 2024
1 parent b4f2223 commit ef903e4
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 26 deletions.
12 changes: 6 additions & 6 deletions charts/homepage/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
apiVersion: v2
description: Chart for benphelps homepage
icon: https://github.com/benphelps/homepage/blob/de584eae8f12a0d257e554e9511ef19bd2a1232c/public/mstile-150x150.png
description: Chart for Homepage
icon: https://github.com/gethomepage/homepage/blob/main/public/mstile-150x150.png
name: homepage
version: 1.2.3
appVersion: v0.6.10
version: 2.0.0
appVersion: v0.9.6
sources:
- https://github.com/jameswynn/helm-charts/charts/homepage
- https://github.com/benphelps/homepage/
- https://github.com/gethomepage/homepage/
maintainers:
- name: jameswynn
dependencies:
Expand All @@ -17,4 +17,4 @@ dependencies:
annotations:
artifacthub.io/changes: |-
- kind: added
description: Bumped dependency versions and app versions
description: Bumped app versions, fixed default service account, resource names are more consistent
6 changes: 3 additions & 3 deletions charts/homepage/readme.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Homepage (benphelps)
# Homepage

A modern (fully static, fast), secure (fully proxied), highly customizable application dashboard with integrations for more than 25 services and translations for over 15 languages. Easily configured via YAML files (or discovery via docker labels).

[Homepage](https://github.com/benphelps/homepage)
[Homepage](https://github.com/gethomepage/homepage)

## TL;DR

Expand All @@ -13,7 +13,7 @@ helm install my-release jameswynn/homepage

## Introduction

This chart bootstraps a [Homepage](https://github.com/benphelps/homepage) deployment on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
This chart bootstraps a [Homepage](https://github.com/gethomepage/homepage) deployment on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.

## Prerequisites

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
{{- define "homepage.configmap" -}}
{{ if not .Values.config.useExistingConfigMap }}
---
{{ $values := .Values -}}
{{- $configName := include "bjw-s.common.lib.chart.names.fullname" . -}}
{{- if and (hasKey $values "nameOverride") $values.nameOverride -}}
{{- $configName = printf "%v-%v" $configName $values.nameOverride -}}
{{ end -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "bjw-s.common.lib.chart.names.fullname" . }}
name: {{ $configName }}
labels:
{{- include "bjw-s.common.lib.metadata.allLabels" . | nindent 4 }}
data:
Expand Down Expand Up @@ -32,3 +38,4 @@ data:
{{- else }} ""
{{- end }}
{{ end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
{{- include "bjw-s.common.loader.init" . }}
{{- define "homepage.rbac" -}}
{{ 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:
Expand Down Expand Up @@ -63,6 +52,9 @@ rules:
- customresourcedefinitions/status
verbs:
- get
{{- if .Values.extraClusterRoles -}}
{{- .Values.extraClusterRoles | toYaml | nindent 2 }}
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand All @@ -83,3 +75,4 @@ subjects:
name: {{ $serviceAccountName }}
namespace: {{ .Release.Namespace }}
{{ end }}
{{- end }}
4 changes: 3 additions & 1 deletion charts/homepage/templates/common.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
{{- include "bjw-s.common.loader.init" . }}

{{- define "app-template.hardcodedValues" -}}
Expand Down Expand Up @@ -39,5 +38,8 @@ subPath:
{{- $_ := set .Values.serviceAccount "create" "true" -}}
{{ end }}

{{ include "homepage.configmap" . }}
{{ include "homepage.rbac" . }}

{{/* Render the templates */}}
{{ include "bjw-s.common.loader.generate" . }}
43 changes: 40 additions & 3 deletions charts/homepage/values.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
image:
repository: ghcr.io/benphelps/homepage
repository: ghcr.io/gethomepage/homepage
# tag: v0.6.0

# Enable RBAC. RBAC is necessary to use Kubernetes integration
enableRbac: false

extraClusterRoles:
# - apiGroups:
# - some-group
# resources:
# - some-resource
# verbs:
# - get

serviceAccount:
# Specify a different service account name
name: homepage
# Specify a different service account name. When blank it will default to the release
# name if *create* is enabled, otherwise it will refer to the default service account.
name: ""
# Create service account. Needed when RBAC is enabled.
create: false

Expand Down Expand Up @@ -99,6 +108,34 @@ config:
docker:
settings:

# -- Main environment variables. Template enabled.
# Syntax options:
# A) TZ: UTC
# B) PASSWD: '{{ .Release.Name }}'
# C) PASSWD:
# configMapKeyRef:
# name: config-map-name
# key: key-name
# D) PASSWD:
# valueFrom:
# secretKeyRef:
# name: secret-name
# key: key-name
# ...
# E) - name: TZ
# value: UTC
# F) - name: TZ
# value: '{{ .Release.Name }}'
env:

# To include environment variables from other configs or other secrets for use in
# Homepage's variable substitutions. Refer to them here.
# envFrom:
# - secretRef:
# name: my-secret
# - configMapRef:
# name: my-configmap

persistence:
logs:
enabled: true
Expand Down

0 comments on commit ef903e4

Please sign in to comment.