feat(magicmirror-2) add magicmirror-2 (#4345)

* feat(magicmirror-2) add magicmirror-2

* change icon

* add uid + gid

* rar and rofs false

* disable probes

* set higher probe rates

* disable probes

* rename and probes

* mount config file

* update confmap

* add gui

* update path

* whoops..

* fix common.yaml

* whopsies

* Update charts/incubator/magicmirror2/values.yaml

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* Update charts/incubator/magicmirror2/values.yaml

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* ...

* Update charts/incubator/magicmirror2/questions.yaml

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: Stavros kois <s.kois@outlook.com>
Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
This commit is contained in:
Xstar97
2022-11-10 10:47:57 +01:00
committed by GitHub
co-authored by Stavros kois Stavros Kois
parent 10d7852fcd
commit 0394ce17cc
8 changed files with 425 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
# 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
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
# OWNERS file for Kubernetes
OWNERS
# helm-docs templates
*.gotmpl
# docs folder
/docs
# icon
icon.png
+31
View File
@@ -0,0 +1,31 @@
apiVersion: v2
appVersion: "0.20.2218"
dependencies:
- name: common
repository: https://library-charts.truecharts.org
version: 10.9.1
deprecated: false
description: Open source modular smart mirror platform.
home: https://truecharts.org/docs/charts/incubator/magicmirror2
icon: https://truecharts.org/img/hotlink-ok/chart-icons/magicmirror2.png
keywords:
- magicmirror2
- iot
- smart
kubeVersion: ">=1.16.0-0"
maintainers:
- email: info@truecharts.org
name: TrueCharts
url: https://truecharts.org
name: magicmirror2
sources:
- https://github.com/truecharts/charts/tree/master/charts/incubator/magicmirror2
- https://hub.docker.com/r/ich777/magic-mirror2
type: application
version: 0.0.1
annotations:
truecharts.org/catagories: |
- smart
- iot
truecharts.org/SCALE-support: "true"
truecharts.org/grade: U
+1
View File
@@ -0,0 +1 @@
# magicmirror-2
Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

@@ -0,0 +1,170 @@
# Include{groups}
portals:
open:
# Include{portalLink}
questions:
# Include{global}
# Include{controller}
# Include{controllerDeployment}
# Include{replicas}
# Include{replica1}
# Include{strategy}
# Include{recreate}
# Include{controllerExpert}
# Include{controllerExpertExtraArgs}
# Include{containerConfig}
- variable: magicmirror
group: Container Configuration
label: Magic Mirror 2 Configuration
schema:
additional_attrs: true
type: dict
attrs:
- variable: force_update
label: Force Update
description: Check for updates on every restart for MagicMirror²
schema:
type: boolean
default: false
- variable: force_update_modules
label: Force Update Modules
description: Check for updates on every restart for the modules
schema:
type: boolean
default: false
- variable: language
label: Language
description: The language of the interface.
schema:
type: string
default: en
- variable: time_format
label: Time Format
description: The form of time notation that will be used
schema:
type: string
default: "24"
enum:
- value: "24"
description: "24"
- value: "12"
description: "12"
- variable: units
label: Units
description: The units that will be used in the default weather modules.
schema:
type: string
default: metrics
enum:
- value: metrics
description: metrics
- value: imperial
description: imperial
# Include{serviceRoot}
- variable: main
label: Main Service
description: The Primary service on which the healthcheck runs, often the webUI
schema:
additional_attrs: true
type: dict
attrs:
# Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras}
- variable: main
label: Main Service Port Configuration
schema:
additional_attrs: true
type: dict
attrs:
- variable: port
label: Port
description: This port exposes the container port on the service
schema:
type: int
default: 10590
required: true
# Include{advancedPortHTTP}
- variable: targetPort
label: Target Port
description: The internal(!) port on the container the Application runs on
schema:
type: int
default: 10590
# Include{serviceExpertRoot}
default: false
# Include{serviceExpert}
# Include{serviceList}
# Include{persistenceRoot}
- variable: config
label: App Config Storage
description: Stores the Application Configuration.
schema:
additional_attrs: true
type: dict
attrs:
# Include{persistenceBasic}
# Include{persistenceAdvanced}
# Include{persistenceList}
# Include{ingressRoot}
- variable: main
label: Main Ingress
schema:
additional_attrs: true
type: dict
attrs:
# Include{ingressDefault}
# Include{ingressTLS}
# Include{ingressTraefik}
# Include{ingressExpert}
# Include{ingressList}
# Include{security}
# Include{securityContextAdvancedRoot}
- variable: privileged
label: Privileged mode
schema:
type: boolean
default: false
- variable: readOnlyRootFilesystem
label: ReadOnly Root Filesystem
schema:
type: boolean
default: false
- variable: allowPrivilegeEscalation
label: Allow Privilege Escalation
schema:
type: boolean
default: false
- variable: runAsNonRoot
label: runAsNonRoot
schema:
type: boolean
default: false
# Include{securityContextAdvanced}
# Include{podSecurityContextRoot}
- variable: runAsUser
label: runAsUser
description: The UserID of the user running the application
schema:
type: int
default: 0
- variable: runAsGroup
label: runAsGroup
description: The groupID this App of the user running the application
schema:
type: int
default: 0
- variable: fsGroup
label: fsGroup
description: The group that should own ALL storage.
schema:
type: int
default: 568
# Include{podSecurityContextAdvanced}
# Include{resources}
# Include{advanced}
# Include{addons}
# Include{codeserver}
# Include{promtail}
# Include{netshoot}
# Include{vpn}
# Include{documentation}
@@ -0,0 +1,128 @@
{{/* Define the configmap */}}
{{- define "magicmirror.config" -}}
{{- $configName := printf "%s-magicmirror-config" (include "tc.common.names.fullname" .) }}
{{- $configEnvName := printf "%s-magicmirror-env" (include "tc.common.names.fullname" .) }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $configName }}
labels:
{{- include "tc.common.labels" . | nindent 4 }}
data:
config.js: |
/* Magic Mirror Config Sample
*
* By Michael Teeuw http://michaelteeuw.nl
* MIT Licensed.
*
* For more information on how you can configure this file
* See https://github.com/MichMich/MagicMirror#configuration
*
*/
var config = {
address: "0.0.0.0",
port: {{ .Values.service.main.ports.main.port }},
ipWhitelist: [], // Set [] to allow all IP addresses
// or add a specific IPv4 of 192.168.1.5 :
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
// or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
useHttps: false, // Support HTTPS or not, default "false" will use HTTP
language: {{ .Values.magicmirror.language | quote }},
timeFormat: {{ .Values.magicmirror.time_format | trimAll "\"" }},
units: {{ .Values.magicmirror.units | quote }},
serverOnly: "true",
modules: [
{
module: "alert",
},
{
module: "updatenotification",
position: "top_bar"
},
{
module: "clock",
position: "top_left"
},
{
module: "calendar",
header: "US Holidays",
position: "top_left",
config: {
calendars: [
{
symbol: "calendar-check",
url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics"
}
]
}
},
{
module: "compliments",
position: "lower_third"
},
{
module: "currentweather",
position: "top_right",
config: {
location: "New York",
locationID: "", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
appid: "YOUR_OPENWEATHER_API_KEY"
}
},
{
module: "weatherforecast",
position: "top_right",
header: "Weather Forecast",
config: {
location: "New York",
locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
appid: "YOUR_OPENWEATHER_API_KEY"
}
},
{
module: "newsfeed",
position: "bottom_bar",
config: {
feeds: [
{
title: "New York Times",
url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
}
],
showSourceTitle: true,
showPublishDate: true,
broadcastNewsFeeds: true,
broadcastNewsUpdates: true
}
},
]
};
/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== "undefined") {module.exports = config;}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $configEnvName }}
labels:
{{- include "tc.common.labels" . | nindent 4 }}
data:
DATA_DIR: /magicmirror2
UID: {{ .Values.security.PUID | quote }}
GID: {{ .Values.podSecurityContext.fsGroup | quote }}
FORCE_UPDATE: {{ .Values.magicmirror.force_update | quote }}
FORCE_UPDATE_MODULES: {{ .Values.magicmirror.force_update_modules | quote }}
{{- end -}}
@@ -0,0 +1,7 @@
{{/* Make sure all variables are set properly */}}
{{- include "tc.common.loader.init" . }}
{{- include "magicmirror.config" . }}
{{/* Render the templates */}}
{{ include "tc.common.loader.apply" . }}
+58
View File
@@ -0,0 +1,58 @@
image:
repository: tccr.io/truecharts/magicmirror-2
pullPolicy: IfNotPresent
tag: latest@sha256:d39dd5ba0f16b97ce6da85803c780fa6880569dbcce141c6a4e4700079501625
securityContext:
runAsNonRoot: false
readOnlyRootFilesystem: false
podSecurityContext:
runAsUser: 0
runAsGroup: 0
magicmirror:
force_update: false
force_update_modules: false
language: en
time_format: "24"
units: metrics
envFrom:
- configMapRef:
name: '{{ include "tc.common.names.fullname" . }}-magicmirror-env'
probes:
liveness:
type: HTTP
path: /
readiness:
type: HTTP
path: /
startup:
type: HTTP
path: /
service:
main:
ports:
main:
port: 10590
protocol: HTTP
persistence:
config:
enabled: true
mountPath: /magicmirror2
configfile:
enabled: true
type: custom
mountPath: /magicmirror2/config/config.js
subPath: config.js
defaultMode: "0770"
volumeSpec:
configMap:
name: '{{ printf "%s-magicmirror-config" (include "tc.common.names.fullname" .) }}'
portal:
enabled: true