feat(cherry, coupon-store): add cherry, coupon-store (#4053)

* delete duplicate app

* feat(cherry): add cherry

* feat(coupon-store): add coupon store

* change port

* configmap

* root couponstore

* quote

* fix vcresion again

* root
This commit is contained in:
Stavros Kois
2022-10-10 15:09:27 +03:00
committed by GitHub
parent 01f79b1fcb
commit 0399acb0d9
25 changed files with 438 additions and 717 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
+26
View File
@@ -0,0 +1,26 @@
apiVersion: v2
appVersion: "10.6.2"
dependencies:
- name: common
repository: https://library-charts.truecharts.org
version: 10.6.11
description: An open source self-hosted bookmark service
home: https://truecharts.org/docs/charts/stable/airsonic
icon: https://truecharts.org/img/hotlink-ok/chart-icons/airsonic.png
keywords:
- bookmark
kubeVersion: ">=1.16.0-0"
maintainers:
- email: info@truecharts.org
name: TrueCharts
url: https://truecharts.org
name: cherry
sources:
- https://cherry.haishan.me/
- https://github.com/haishanh/cherry
version: 0.0.1
annotations:
truecharts.org/catagories: |
- bookmark
truecharts.org/SCALE-support: "true"
truecharts.org/grade: U
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

+162
View File
@@ -0,0 +1,162 @@
# 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}
- variable: cherry
group: Container Configuration
label: Cherry Configuration
schema:
additional_attrs: true
type: dict
attrs:
- variable: insecure_cookie
label: Insecure Cookie
schema:
type: boolean
default: false
- variable: public_registration
label: Public Registration
schema:
type: boolean
default: true
- variable: page_bookmark_limit
label: Page Bookmark Limit
schema:
type: int
default: 60
- variable: google_oauth_uri
label: Google OAuth URI
schema:
type: string
default: ""
- variable: google_oauth_id
label: Google OAuth ID
schema:
type: string
private: true
default: ""
- variable: google_oauth_secret
label: Google OAuth Secret
schema:
type: string
private: true
default: ""
# Include{containerConfig}
# 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: 10303
required: true
# Include{advancedPortHTTP}
- variable: targetPort
label: Target Port
description: The internal(!) port on the container the Application runs on
schema:
type: int
default: 8000
# Include{serviceExpertRoot}
default: false
# Include{serviceExpert}
# Include{serviceList}
# Include{persistenceRoot}
- variable: data
label: App Data Storage
description: Stores the Application Data.
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,21 @@
{{/* Define the configmap */}}
{{- define "cherry.configmap" -}}
{{- $configName := printf "%s-cherry-configmap" (include "tc.common.names.fullname" .) }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $configName }}
labels: {{- include "tc.common.labels" . | nindent 4 }}
data:
DATABASE_PATH: /data/cherry.sqlite
ENABLE_PUBLIC_REGISTRATION: {{ ternary "1" "0" .Values.cherry.public_registration | quote }}
USE_INSECURE_COOKIE: {{ ternary "1" "0" .Values.cherry.insecure_cookie | quote }}
PAGE_BOOKMARK_LIMIT: {{ .Values.cherry.page_bookmark_limit | quote }}
{{- with .Values.cherry.google_oauth_uri }}
GOOGLE_OAUTH_REDIRECT_URI: {{ . }}
{{- end }}
{{- end -}}
@@ -0,0 +1,25 @@
{{/* Define the secrets */}}
{{- define "cherry.secrets" -}}
{{- $secretName := printf "%s-cherry-secret" (include "tc.common.names.fullname" .) }}
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: {{ $secretName }}
data:
{{- with (lookup "v1" "Secret" .Release.Namespace $secretName) }}
JWT_SECRET: {{ index .data "JWT_SECRET" }}
{{- else }}
JWT_SECRET: {{ randAlphaNum 32 | b64enc }}
{{- end }}
{{- with .Values.cherry.google_oauth_id }}
GOOGLE_OAUTH_CLIENT_ID: {{ . | b64enc }}
{{- end }}
{{- with .Values.cherry.google_oauth_secret }}
GOOGLE_OAUTH_CLIENT_SECRET: {{ . | b64enc }}
{{- end }}
{{- end -}}
@@ -0,0 +1,7 @@
{{- include "tc.common.loader.init" . }}
{{- include "cherry.configmap" . }}
{{ include "cherry.secrets" . }}
{{ include "tc.common.loader.apply" . }}
+53
View File
@@ -0,0 +1,53 @@
image:
repository: tccr.io/truecharts/cherry
pullPolicy: IfNotPresent
tag: 0.0.4@sha256:9c7591a56d6a53e5c390a39fccedc7ad6c8cffc7db450ab2102aa7096ab64fa8
podSecurityContext:
runAsUser: 0
runAsGroup: 0
securityContext:
runAsNonRoot: false
readOnlyRootFilesystem: false
envFrom:
- secretRef:
name: '{{ include "tc.common.names.fullname" . }}-cherry-secret'
- configMapRef:
name: '{{ include "tc.common.names.fullname" . }}-cherry-configmap'
cherry:
insecure_cookie: true
public_registration: true
page_bookmark_limit: 60
google_oauth_uri: ""
google_oauth_id: ""
google_oauth_secret: ""
probes:
liveness:
type: HTTP
path: /
readiness:
type: HTTP
path: /
startup:
type: HTTP
path: /
service:
main:
ports:
main:
port: 10303
protocol: HTTP
targetPort: 8000
persistence:
data:
enabled: true
mountPath: "/data"
portal:
enabled: true