Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(snypy) add snypy #29808

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions charts/incubator/snypy/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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
icon.webp
icon-small.webp
4 changes: 4 additions & 0 deletions charts/incubator/snypy/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Changelog
pagefind: false
---
37 changes: 37 additions & 0 deletions charts/incubator/snypy/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
annotations:
max_scale_version: 24.04.1
min_scale_version: 24.04.0
truecharts.org/category: Productivity
truecharts.org/max_helm_version: "3.15"
truecharts.org/min_helm_version: "3.11"
truecharts.org/train: incubator
apiVersion: v2
appVersion: 1.5.2
dependencies:
- name: common
version: 25.1.7
repository: oci://tccr.io/truecharts
condition: ""
alias: ""
tags: []
import-values: []
deprecated: false
description: Open source code snippet organizer for developers.
home: https://truecharts.org/charts/incubator/snypy
icon: https://truecharts.org/img/hotlink-ok/chart-icons/snypy.webp
keywords:
- snypy
- snippets
kubeVersion: '>=1.24.0-0'
maintainers:
- name: TrueCharts
email: [email protected]
url: https://truecharts.org
name: snypy
sources:
- https://github.com/snypy/snypy-docker
- https://github.com/truecharts/charts/tree/master/charts/incubator/snypy
- https://ghcr.io/snypy/snypy-backend
- https://ghcr.io/snypy/snypy-frontend
type: application
version: 0.0.1
3 changes: 3 additions & 0 deletions charts/incubator/snypy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: README
---
Binary file added charts/incubator/snypy/icon.webp
Binary file not shown.
1 change: 1 addition & 0 deletions charts/incubator/snypy/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- include "tc.v1.common.lib.chart.notes" $ -}}
13 changes: 13 additions & 0 deletions charts/incubator/snypy/templates/_secrets.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{/* Define the secrets */}}
{{- define "snypy.secrets" -}}
{{- $secretName := (printf "%s-snypy-secrets" (include "tc.v1.common.lib.chart.names.fullname" $)) }}

{{- $secretKey := randAlphaNum 64 -}}

{{- with lookup "v1" "Secret" .Release.Namespace $secretName -}}
{{- $secretKey = index .data "SECRET_KEY" | b64dec -}}
{{- end }}
enabled: true
data:
SECRET_KEY: {{ $secretKey }}
{{- end -}}
11 changes: 11 additions & 0 deletions charts/incubator/snypy/templates/common.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{/* Make sure all variables are set properly */}}
{{- include "tc.v1.common.loader.init" . -}}

{{/* Render secrets for snypy */}}
{{- $secrets := include "snypy.secrets" . | fromYaml -}}
{{- if $secrets -}}
{{- $_ := set .Values.secret "snypy-secrets" $secrets -}}
{{- end -}}

{{/* Render the templates */}}
{{- include "tc.v1.common.loader.apply" . -}}
121 changes: 121 additions & 0 deletions charts/incubator/snypy/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
image:
repository: ghcr.io/snypy/snypy-backend
pullPolicy: IfNotPresent
tag: 1.5.2sha256:d6cc8d8fedfa5d70d0836cbd770e8b6bb5392db99f67ff8204cffd454580fa32
staticImage:
repository: ghcr.io/snypy/snypy-static
pullPolicy: IfNotPresent
tag: 1.5.2@sha256:ab866b8dc8b4e995bf9e364888b9a24499c0217f234a39e503a2434577ddbd14
uiImage:
repository: ghcr.io/snypy/snypy-frontend
pullPolicy: IfNotPresent
tag: 1.5.1@sha256:1c2cd720663d391bd386b08dc7d6c15fe337679c753ebcab0d9fbaf503b2a3b6
securityContext:
container:
runAsNonRoot: false
readOnlyRootFilesystem: false
runAsUser: 0
runAsGroup: 0
service:
main:
targetSelector: ui
ports:
main:
protocol: http
targetPort: 80
port: 8080
targetSelector: ui
api:
enabled: true
targetSelector: main
ports:
api:
enabled: true
protocol: http
targetPort: 8000
port: 8080
targetSelector: main
ingress:
api:
enabled: false
targetSelector:
api: api
workload:
main:
podSpec:
containers:
main:
imageSelector: image
probes:
liveness:
enabled: true
type: http
path: /api/version
port: "{{ .Values.service.api.ports.api.targetPort }}"
readiness:
enabled: true
type: http
path: /api/version
port: "{{ .Values.service.api.ports.api.targetPort }}"
startup:
enabled: true
type: tcp
port: "{{ .Values.service.api.ports.api.targetPort }}"
env:
SECRET_KEY:
secretKeyRef:
name: snypy-secrets
key: SECRET_KEY
DEBUG: "False"
ALLOWED_HOSTS: "127.0.0.1"
# EMAIL_URL: "smtp://mail:1025"
# STATIC_URL: "http://127.0.0.1:8081/"
DATABASE_URL: '{{ printf "psql://%s:%s@%s:5432/%s" .Values.cnpg.main.user .Values.cnpg.main.creds.password (.Values.cnpg.main.creds.host | trimAll "\"") .Values.cnpg.main.database }}'
CORS_ORIGIN_WHITELIST: "http://127.0.0.1:8080"
CSRF_TRUSTED_ORIGINS: "http://127.0.0.1"
REGISTER_VERIFICATION_URL: "http://127.0.0.1:8080/verify-user/"
RESET_PASSWORD_VERIFICATION_URL: "http://127.0.0.1:8080/set-password/"
REGISTER_EMAIL_VERIFICATION_URL: "http://127.0.0.1:8080/verify-email/"
# SENTRY_ENABLED: "True"
# SENTRY_DSN: "http://changeme@localhost:9000/1"
# GUNICORN_WORKERS: 2
ui:
enabled: true
type: Deployment
podSpec:
containers:
ui:
primary: true
enabled: true
imageSelector: uiImage
resources:
excludeExtra: true
probes:
liveness:
enabled: true
type: http
path: /
port: "{{ .Values.service.main.ports.main.targetPort }}"
readiness:
enabled: true
type: http
path: /
port: "{{ .Values.service.main.ports.main.targetPort }}"
startup:
enabled: true
type: tcp
port: "{{ .Values.service.main.ports.main.targetPort }}"
env:
REST_API_URL: '{{ printf "http://%v-api:%v" (include "tc.v1.common.lib.chart.names.fullname" $) .Values.service.api.ports.api.targetPort }}'
persistence:
fixtures:
enabled: true
mountPath: /fixtures
cnpg:
main:
enabled: true
user: snypy
database: snypy
portal:
open:
enabled: true
Loading