More prototypeGui work (#849)

* allow additional Ingress

* Add serviceList and portsList to common

* add portslist GUI

* add additional services GUI

* bump

* Add custom-app App

* use the custom service app as a canary for Common mistakes

* fix typo in custom-app
This commit is contained in:
Kjeld Schouten-Lebbing 2021-08-30 12:56:36 +02:00 committed by GitHub
parent 34bef67d10
commit f5055b1410
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 1778 additions and 5 deletions

View File

@ -0,0 +1,24 @@
# 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

View File

View File

@ -0,0 +1,22 @@
apiVersion: v2
appVersion: auto
dependencies:
- name: common
repository: https://truecharts.org/
version: 6.11.0
deprecated: false
description: Advanced tool to create your own TrueCharts-based App
home: https://github.com/truecharts/apps/tree/master/charts/stable/custom-app
icon: https://truecharts.org/_static/img/custom-app-icon.png
keywords:
- custom
kubeVersion: '>=1.16.0-0'
maintainers:
- email: info@truecharts.org
name: TrueCharts
url: truecharts.org
name: custom-app
sources:
- https://github.com/truecharts/apps/tree/master/charts/stable/custom-app
type: application
version: 0.0.1

View File

View File

@ -0,0 +1,3 @@
categories:
- custom
icon_url: https://truecharts.org/_static/img/custom-app-icon.png

View File

@ -0,0 +1,10 @@
##
# This file contains Values.yaml content that gets added to the output of questions.yaml
# It's ONLY meant for content that the user is NOT expected to change.
# Example: Everything under "image" is not included in questions.yaml but is included here.
##
##
# Most other defaults are set in questions.yaml
# For other options please refer to the wiki, default_values.yaml or the common library chart
##

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
{{ include "common.all" . }}

View File

@ -0,0 +1,42 @@
# Default values for Jackett.
image:
repository: ghcr.io/k8s-at-home/jackett
pullPolicy: IfNotPresent
tag: v0.18.616
strategy:
type: Recreate
service:
main:
enabled: true
ports:
main:
port: 9117
portsList:
- name: "extraport"
enabled: true
port: 9118
serviceList:
- name: extraservice
enabled: true
portsList:
- name: "extraserviceport"
port: 9119
env: {}
# TZ: UTC
# PUID: 1001
# PGID: 1001
persistence:
config:
enabled: true
mountPath: "/config"
type: pvc
accessMode: ReadWriteOnce
size: "100Gi"

View File

@ -24,4 +24,4 @@ name: prototypegui
sources:
- https://github.com/Jackett/Jackett
type: application
version: 6.9.0
version: 6.9.1

View File

@ -329,6 +329,170 @@ questions:
min: 9000
max: 65535
default: 36009
- variable: portsList
label: "Additional Service Ports"
schema:
type: list
default: []
items:
- variable: portsListEntry
label: "Custom ports"
schema:
type: dict
attrs:
- variable: enabled
label: "Enable the port"
schema:
type: boolean
default: true
hidden: true
- variable: name
label: "Port Name"
schema:
type: string
default: ""
- variable: protocol
label: "Port Type"
schema:
type: string
default: "TCP"
enum:
- value: HTTP
description: "HTTP"
- value: "HTTPS"
description: "HTTPS"
- value: TCP
description: "TCP"
- value: "UDP"
description: "UDP"
- variable: port
label: "Container Port"
schema:
type: int
required: true
- variable: targetPort
label: "Target Port"
description: "This port exposes the container port on the service"
schema:
type: int
required: true
- variable: nodePort
label: "Node Port (Optional)"
description: "This port gets exposed to the node. Only considered when service type is NodePort"
schema:
type: int
min: 9000
max: 65535
- variable: serviceList
label: "Additional Services"
group: "Storage and Persistence"
schema:
type: list
default: []
items:
- variable: serviceListEntry
label: "Custom Service"
schema:
type: dict
attrs:
- variable: enabled
label: "Enable the service"
schema:
type: boolean
default: true
hidden: true
- variable: name
label: "Name"
schema:
type: string
default: ""
- variable: type
label: "Service Type"
description: "ClusterIP's are only internally available, nodePorts expose the container to the host node System, Loadbalancer exposes the service using the system loadbalancer"
schema:
type: string
default: "NodePort"
enum:
- value: "NodePort"
description: "NodePort"
- value: "ClusterIP"
description: "ClusterIP"
- value: "LoadBalancer"
description: "LoadBalancer"
- variable: loadBalancerIP
label: "LoadBalancer IP"
description: "LoadBalancerIP"
schema:
show_if: [["type", "=", "LoadBalancer"]]
type: string
default: ""
- variable: externalIPs
label: "External IP's"
description: "External IP's"
schema:
show_if: [["type", "=", "LoadBalancer"]]
type: list
default: []
items:
- variable: externalIP
label: "External IP"
schema:
type: string
- variable: portsList
label: "Additional Service Ports"
schema:
type: list
default: []
items:
- variable: portsListEntry
label: "Custom ports"
schema:
type: dict
attrs:
- variable: enabled
label: "Enable the port"
schema:
type: boolean
default: true
hidden: true
- variable: name
label: "Port Name"
schema:
type: string
default: ""
- variable: protocol
label: "Port Type"
schema:
type: string
default: "TCP"
enum:
- value: HTTP
description: "HTTP"
- value: "HTTPS"
description: "HTTPS"
- value: TCP
description: "TCP"
- value: "UDP"
description: "UDP"
- variable: port
label: "Container Port"
schema:
type: int
required: true
- variable: targetPort
label: "Target Port"
description: "This port exposes the container port on the service"
schema:
type: int
required: true
- variable: nodePort
label: "Node Port (Optional)"
description: "This port gets exposed to the node. Only considered when service type is NodePort"
schema:
type: int
min: 9000
max: 65535
- variable: persistence
label: "Integrated Persistent Storage"
@ -790,6 +954,180 @@ questions:
default: ""
required: true
- variable: ingressList
label: "Additional Ingress"
group: "Ingress"
schema:
type: list
default: []
items:
- variable: ingressListEntry
label: "Custom Ingress"
schema:
type: dict
attrs:
- variable: enabled
label: "Enable Ingress"
schema:
type: boolean
default: true
hidden: true
- variable: name
label: "Name"
schema:
type: string
default: ""
- variable: ingressClassName
label: "IngressClass Name"
schema:
type: string
default: ""
- variable: labelsList
label: "Labels"
schema:
type: list
default: []
items:
- variable: labelItem
label: "Label"
schema:
type: dict
attrs:
- variable: name
label: "Name"
schema:
type: string
- variable: value
label: "Value"
schema:
type: string
- variable: annotationsList
label: "Annotations"
schema:
type: list
default: []
items:
- variable: annotationItem
label: "Label"
schema:
type: dict
attrs:
- variable: name
label: "Name"
schema:
type: string
- variable: value
label: "Value"
schema:
type: string
- variable: hosts
label: "Hosts"
schema:
type: list
default: []
items:
- variable: hostEntry
label: "Host"
schema:
type: dict
attrs:
- variable: host
label: "HostName"
schema:
type: string
default: ""
required: true
- variable: paths
label: "Paths"
schema:
type: list
default: []
items:
- variable: pathEntry
label: "Host"
schema:
type: dict
attrs:
- variable: path
label: "path"
schema:
type: string
required: true
default: "/"
- variable: pathType
label: "pathType"
schema:
type: string
required: true
default: "Prefix"
- variable: service
label: "Linked Service"
schema:
type: dict
attrs:
- variable: name
label: "Service Name"
schema:
type: string
default: ""
- variable: port
label: "Service Port"
schema:
type: int
- variable: tls
label: "TLS-Settings"
schema:
type: list
default: []
items:
- variable: tlsEntry
label: "Host"
schema:
type: dict
attrs:
- variable: hosts
label: "Certificate Hosts"
schema:
type: list
default: []
items:
- variable: host
label: "Host"
schema:
type: string
default: ""
required: true
- variable: scaleCert
label: "Select TrueNAS SCALE Certificate"
schema:
type: int
$ref:
- "definitions/certificate"
- variable: entrypoint
label: "Traefik Entrypoint"
description: "Entrypoint used by Traefik when using Traefik as Ingress Provider"
schema:
type: string
default: "websecure"
required: true
- variable: middlewares
label: "Traefik Middlewares"
description: "Add previously created Traefik Middlewares to this Ingress"
schema:
type: list
default: []
items:
- variable: name
label: "Name"
schema:
type: string
default: ""
required: true
- variable: securityContext
group: "Security and Permissions"
label: "Security Context"
@ -797,7 +1135,7 @@ questions:
type: dict
attrs:
- variable: privileged
label: Privileged mode"
label: "Privileged mode"
schema:
type: boolean
default: false
@ -842,13 +1180,13 @@ questions:
type: int
default: 568
- variable: supplementalGroups
label: "When should we take ownership?"
label: "supplementalGroups"
schema:
type: list
default: []
items:
- variable: supplementalGroupsEntry
label: "When should we take ownership?"
label: "supplementalGroup"
schema:
type: int
- variable: fsGroupChangePolicy

View File

@ -18,4 +18,4 @@ maintainers:
name: common
sources: null
type: library
version: 6.11.0
version: 6.12.0

View File

@ -150,4 +150,31 @@
{{/* write appended supplementalGroups to .Values */}}
{{- $_ := set .Values.podSecurityContext "supplementalGroups" $supGroups -}}
{{/* merge serviceList with service */}}
{{- $portsDict := dict }}
{{- range $index, $item := .Values.serviceList -}}
{{- $name := ( printf "list-%s" ( $index | toString ) ) }}
{{- if $item.name }}
{{- $name = $item.name }}
{{- end }}
{{- $_ := set $portsDict $name $item }}
{{- end }}
{{- $srv := merge .Values.service $portsDict }}
{{- $_ := set .Values "service" (deepCopy $srv) -}}
{{/* merge portsList with ports */}}
{{- range $index, $item := .Values.service -}}
{{- $portsDict := dict }}
{{- range $item.portsList -}}
{{- $name := ( printf "list-%s" ( $index | toString ) ) }}
{{- if $item.name }}
{{- $name = $item.name }}
{{- end }}
{{- $_ := set $portsDict $name $item }}
{{- end }}
{{- $tmp := $item.ports }}
{{- $ports := merge $tmp $portsDict }}
{{- $_ := set $item "ports" (deepCopy $ports) -}}
{{- end }}
{{- end -}}

View File

@ -250,6 +250,11 @@ termination:
# -- [[ref](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#lifecycle)]
gracePeriodSeconds: 10
# -- Configure additional services for the chart here.
# @default -- See below
serviceList: []
# -- Configure the services for the chart here.
# Additional services can be added by adding a dictionary key similar to the 'main' service.
# @default -- See below
@ -280,6 +285,10 @@ service:
# -- Provide additional labels which may be required.
labels: {}
# -- Configure additional Service port information here.
# @default -- See below
portsList: []
# -- Configure the Service port information here.
# Additional ports can be added by adding a dictionary key similar to the 'http' service.
# @default -- See below