chore(incubator): make things work with new common part 3 (#15994)

**Description**
<!--
Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.
-->
⚒️ Fixes  # <!--(issue)-->

**⚙️ Type of change**

- [ ] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [ ] ⚖️ My code follows the style guidelines of this project
- [ ] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [ ] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [ ] ⬆️ I increased versions for any altered app according to semantic
versioning

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🪞 I have opened a PR on
[truecharts/containers](https://github.com/truecharts/containers) adding
the container to TrueCharts mirror repo.
- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._
This commit is contained in:
Kjeld Schouten
2023-12-15 22:41:48 +01:00
committed by GitHub
parent d42d189d19
commit 11272a4456
936 changed files with 615 additions and 1092 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
File diff suppressed because it is too large Load Diff
+51
View File
@@ -0,0 +1,51 @@
kubeVersion: ">=1.24.0-0"
apiVersion: v2
name: linkace
version: 9.0.2
appVersion: 1.13.0
description: Your self-hosted bookmark archive. Free and open source.
home: https://truecharts.org/charts/incubator/linkace
icon: https://truecharts.org/img/hotlink-ok/chart-icons/linkace.png
deprecated: false
sources:
- https://hub.docker.com/r/linkace/linkace
- https://github.com/linkace/linkace
- https://www.linkace.org/docs/
- https://github.com/truecharts/charts/tree/master/charts/incubator/linkace
maintainers:
- name: TrueCharts
email: info@truecharts.org
url: https://truecharts.org
keywords:
- linkace
dependencies:
- name: common
version: 16.2.6
repository: https://library-charts.truecharts.org
condition: ""
alias: ""
tags: []
import-values: []
- name: mariadb
version: 10.0.2
repository: https://deps.truecharts.org/
condition: mariadb.enabled
alias: ""
tags: []
import-values: []
- name: redis
version: 9.0.3
repository: https://deps.truecharts.org
condition: redis.enabled
alias: ""
tags: []
import-values: []
annotations:
max_scale_version: 23.10.1
min_scale_version: 22.12.4
truecharts.org/SCALE-support: "true"
truecharts.org/category: media
truecharts.org/max_helm_version: "3.13"
truecharts.org/min_helm_version: "3.12"
truecharts.org/train: incubator
type: application
+27
View File
@@ -0,0 +1,27 @@
# README
## General Info
TrueCharts can be installed as both *normal* Helm Charts or as Apps on TrueNAS SCALE.
However only installations using the TrueNAS SCALE Apps system are supported.
For more information about this App, please check the docs on the TrueCharts [website](https://truecharts.org/charts/incubator/linkace)
**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/truecharts/charts/issues/new/choose)**
## Support
- Please check our [quick-start guides for TrueNAS SCALE](https://truecharts.org/manual/SCALE/guides/scale-intro).
- See the [Website](https://truecharts.org)
- Check our [Discord](https://discord.gg/tVsPTHWTtr)
- Open a [issue](https://github.com/truecharts/charts/issues/new/choose)
---
## Sponsor TrueCharts
TrueCharts can only exist due to the incredible effort of our staff.
Please consider making a [donation](https://truecharts.org/sponsor) or contributing back to the project any way you can!
*All Rights Reserved - The TrueCharts Project*
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

+239
View File
@@ -0,0 +1,239 @@
# Include{groups}
portals:
open:
# Include{portalLink}
questions:
# Include{global}
# Include{workload}
# Include{workloadDeployment}
# Include{replicas1}
# Include{podSpec}
# Include{containerMain}
- variable: env
group: "App Configuration"
label: "Image Environment"
schema:
additional_attrs: true
type: dict
attrs:
- variable: CRON_TOKEN
label: "CRON_TOKEN (Generate this inside the app)"
description: "Generate token inside the app and come back later to fill this."
schema:
type: string
default: ""
- variable: AWS_ACCESS_KEY_ID
label: "AWS_ACCESS_KEY_ID"
description: "AWS Access Key ID"
schema:
type: string
default: ""
- variable: AWS_SECRET_ACCESS_KEY
label: "AWS_SECRET_ACCESS_KEY"
description: "AWS Secret Access Key"
schema:
type: string
default: ""
- variable: AWS_DEFAULT_REGION
label: "AWS_DEFAULT_REGION"
description: "AWS Default Region"
schema:
type: string
default: ""
- variable: AWS_BUCKET
label: "AWS_BUCKET"
description: "AWS Bucket"
schema:
type: string
default: ""
- variable: MAIL_FROM_ADDRESS
label: "MAIL_FROM_ADDRESS"
description: "Mail from Address"
schema:
type: string
default: ""
- variable: MAIL_FROM_NAME
label: "MAIL_FROM_NAME"
description: "Mail from Name"
schema:
type: string
default: ""
- variable: MAIL_DRIVER
label: "MAIL_DRIVER"
description: "Mail Driver"
schema:
type: string
default: "smtp"
enum:
- value: "smtp"
description: "smtp"
- value: "mailgun"
description: "mailgun"
- value: "sendmail"
description: "sendmail"
- value: "ses"
description: "ses"
- value: "postmark"
description: "postmark"
- value: "log"
description: "log"
- value: "array"
description: "array"
- variable: MAIL_HOST
label: "MAIL_HOST"
description: "Mail Host"
schema:
type: string
default: ""
- variable: MAIL_PORT
label: "MAIL_PORT"
description: "Mail Port"
schema:
type: string
default: "587"
- variable: MAIL_USERNAME
label: "MAIL_USERNAME"
description: "Mail Username"
schema:
type: string
default: ""
- variable: MAIL_PASSWORD
label: "MAIL_PASSWORD"
description: "Mail Password"
schema:
type: string
default: ""
- variable: MAIL_ENCRYPTION
label: "MAIL_ENCRYPTION"
description: "Mail Encryption"
schema:
type: string
default: "tls"
- variable: APP_URL
label: "APP_URL"
description: "Application URL eg. https://linkace.mydomain.com"
schema:
type: string
default: "http://localhost"
- variable: APP_DEBUG
label: "APP_DEBUG"
description: "Enables the debug info"
schema:
type: boolean
default: false
- variable: BACKUP_ENABLED
label: "BACKUP_ENABLED"
description: "Enables backups"
schema:
type: boolean
default: false
- variable: BACKUP_DISK
label: "BACKUP_DISK"
description: "Backup destination"
schema:
type: string
default: "local_backups"
enum:
- value: "local_backups"
description: "local_backups"
- value: "s3"
description: "s3"
- variable: BACKUP_MAX_SIZE
label: "BACKUP_MAX_SIZE"
description: "Max size of backup in MB"
schema:
type: int
default: 512
# Include{containerBasic}
# Include{containerAdvanced}
# Include{containerConfig}
# Include{podOptions}
# 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: 10160
required: true
# Include{serviceExpertRoot}
# Include{serviceExpert}
# Include{serviceList}
# Include{persistenceRoot}
- variable: backups
label: "App Backup Storage"
description: "Stores the Application Backup."
schema:
additional_attrs: true
type: dict
attrs:
# Include{persistenceBasic}
- variable: logs
label: "App Logs Storage"
description: "Stores the Application Logs."
schema:
additional_attrs: true
type: dict
attrs:
# Include{persistenceBasic}
# Include{persistenceList}
# Include{ingressRoot}
- variable: main
label: "Main Ingress"
schema:
additional_attrs: true
type: dict
attrs:
# Include{ingressDefault}
# Include{ingressTLS}
# Include{ingressTraefik}
# Include{ingressAdvanced}
# Include{ingressList}
# Include{securityContextRoot}
- 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 of the user running the application"
schema:
type: int
default: 0
# Include{securityContextContainer}
# Include{securityContextAdvanced}
# Include{securityContextPod}
- variable: fsGroup
label: "fsGroup"
description: "The group that should own ALL storage."
schema:
type: int
default: 82
# Include{resources}
# Include{advanced}
# Include{addons}
# Include{codeserver}
# Include{netshoot}
# Include{vpn}
# Include{documentation}
+53
View File
@@ -0,0 +1,53 @@
{{/* Define the cronjob */}}
{{- define "linkace.cronjob" -}}
{{- if .Values.secret.CRON_TOKEN }}
{{- $jobName := include "tc.v1.common.names.fullname" . }}
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: {{ printf "%s-cronjob" $jobName }}
labels:
spec:
schedule: "{{ .Values.cronjob.schedule }}"
concurrencyPolicy: Forbid
{{- with .Values.cronjob.failedJobsHistoryLimit }}
failedJobsHistoryLimit: {{ . }}
{{- end }}
{{- with .Values.cronjob.successfulJobsHistoryLimit }}
successfulJobsHistoryLimit: {{ . }}
{{- end }}
jobTemplate:
metadata:
spec:
template:
metadata:
spec:
securityContext:
runAsUser: 568
runAsGroup: 568
restartPolicy: Never
containers:
- name: {{ .Chart.Name }}
securityContext:
privileged: false
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
runAsNonRoot: true
capabilities:
drop:
- ALL
env:
- name: CRON_TOKEN
value: {{ .Values.secret.CRON_TOKEN }}
image: "{{ .Values.ubuntuImage.repository }}:{{ .Values.ubuntuImage.tag }}"
args:
- curl
- "http://{{ $jobName }}.ix-{{ .Release.Name }}.svc.cluster.local:{{ .Values.service.main.ports.main.port }}/cron/$(CRON_TOKEN)"
resources:
{{ toYaml .Values.resources | indent 16 }}
{{- end -}}
{{- end }}
+14
View File
@@ -0,0 +1,14 @@
{{/* Define the secrets */}}
{{- define "linkace.secrets" -}}
enabled: true
{{- $linkaceprevious := lookup "v1" "Secret" .Release.Namespace "linkace-secrets" }}
{{- $app_key := "" }}
data:
{{- if $linkaceprevious}}
APP_KEY: {{ index $linkaceprevious.data "APP_KEY" }}
{{- else }}
{{- $app_key := randAlphaNum 32 }}
APP_KEY: {{ $app_key }}
{{- end }}
{{- end -}}
+9
View File
@@ -0,0 +1,9 @@
{{/* Make sure all variables are set properly */}}
{{ include "tc.v1.common.loader.init" . }}
{{ include "linkace.cronjob" . }}
{{ include "linkace.secrets" . }}
{{/* Render the templates */}}
{{ include "tc.v1.common.loader.apply" . }}
+82
View File
@@ -0,0 +1,82 @@
cronjob:
annotations: {}
failedJobsHistoryLimit: 5
schedule: "*/15 * * * *"
successfulJobsHistoryLimit: 2
image:
pullPolicy: IfNotPresent
repository: linkace/linkace
tag: v1.13.0-simple@sha256:b1af60405d8c57a261f9612c5d47a8b5ea1b632caa3f96798dee33709bf90384
mariadb:
enabled: true
existingSecret: mariadbcreds
mariadbDatabase: linkace
mariadbUsername: linkace
persistence:
backups:
enabled: true
mountPath: /app/storage/app/backups
logs:
enabled: true
mountPath: /app/storage/logs
portal:
open:
enabled: true
redis:
enabled: true
existingSecret: rediscreds
securityContext:
container:
readOnlyRootFilesystem: false
runAsGroup: 0
runAsUser: 0
pod:
fsGroup: 82
service:
main:
ports:
main:
port: 10160
targetPort: 80
workload:
main:
podSpec:
containers:
main:
env:
APP_DEBUG: false
APP_ENV: production
APP_KEY:
secretKeyRef:
key: APP_KEY
name: linkace-secrets
APP_NAME: LinkAce
APP_TIMEZONE: "{{ .Values.TZ }}"
APP_URL: http://localhost
BACKUP_DISK: local_backups
BACKUP_ENABLED: false
BACKUP_MAX_SIZE: 512
BACKUP_NOTIFICATION_EMAIL: your@email.com
CACHE_DRIVER: redis
DB_CONNECTION: mysql
DB_DATABASE: "{{ .Values.mariadb.mariadbDatabase }}"
DB_HOST:
secretKeyRef:
key: plainhost
name: mariadbcreds
DB_PASSWORD:
secretKeyRef:
key: mariadb-password
name: mariadbcreds
DB_PORT: "3306"
DB_USERNAME: "{{ .Values.mariadb.mariadbUsername }}"
REDIS_HOST:
secretKeyRef:
key: plainhost
name: rediscreds
REDIS_PASSWORD:
secretKeyRef:
key: redis-password
name: rediscreds
REDIS_PORT: "6379"
SESSION_DRIVER: redis