chore: add files
This commit is contained in:
commit
a7f5c1f772
10 changed files with 209 additions and 0 deletions
23
chart/.helmignore
Normal file
23
chart/.helmignore
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# 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
|
||||||
|
*.orig
|
||||||
|
*~
|
||||||
|
# Various IDEs
|
||||||
|
.project
|
||||||
|
.idea/
|
||||||
|
*.tmproj
|
||||||
|
.vscode/
|
9
chart/Chart.lock
Normal file
9
chart/Chart.lock
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
dependencies:
|
||||||
|
- name: nats
|
||||||
|
repository: https://nats-io.github.io/k8s/helm/charts/
|
||||||
|
version: 1.2.2
|
||||||
|
- name: versia_go
|
||||||
|
repository: file://../versia
|
||||||
|
version: 0.1.0
|
||||||
|
digest: sha256:b44a0f4359140bf676876ebc26549491314a2c83b4cd5e8bbb7080866a760010
|
||||||
|
generated: "2024-08-26T00:54:23.909163411+02:00"
|
14
chart/Chart.yaml
Normal file
14
chart/Chart.yaml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
apiVersion: v2
|
||||||
|
type: application
|
||||||
|
name: versia-go-run
|
||||||
|
description: Versia Go runtime
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: "0.0.1"
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
- name: nats
|
||||||
|
version: 1.2.2
|
||||||
|
repository: https://nats-io.github.io/k8s/helm/charts/
|
||||||
|
- name: versia_go
|
||||||
|
version: 0.1.0
|
||||||
|
repository: file://../versia
|
BIN
chart/charts/nats-1.2.2.tgz
Normal file
BIN
chart/charts/nats-1.2.2.tgz
Normal file
Binary file not shown.
BIN
chart/charts/versia_go-0.1.0.tgz
Normal file
BIN
chart/charts/versia_go-0.1.0.tgz
Normal file
Binary file not shown.
51
chart/templates/_helpers.tpl
Normal file
51
chart/templates/_helpers.tpl
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
{{/*
|
||||||
|
Expand the name of the versiagorun.
|
||||||
|
*/}}
|
||||||
|
{{- define "versiagorun.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains versiagorun name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "versiagorun.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride }}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||||
|
{{- if contains $name .Release.Name }}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create versiagorun name and version as used by the versiagorun label.
|
||||||
|
*/}}
|
||||||
|
{{- define "versiagorun.versiagorun" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "versiagorun.labels" -}}
|
||||||
|
helm.sh/versiagorun: {{ include "versiagorun.versiagorun" . }}
|
||||||
|
{{ include "versiagorun.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "versiagorun.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "versiagorun.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end }}
|
37
chart/templates/certificate.yaml
Normal file
37
chart/templates/certificate.yaml
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{{- if and .Values.versia_go.ingress.enabled (hasKey .Values.versia_go.ingress "sslSecret") }}
|
||||||
|
apiVersion: cert-manager.io/v1
|
||||||
|
kind: Certificate
|
||||||
|
metadata:
|
||||||
|
name: {{ include "versiagorun.fullname" . }}
|
||||||
|
{{- if eq hasKey .Values.ingress.className "istio" }}
|
||||||
|
namespace: istio-system
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
{{- include "versiagorun.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
{{ $host := include "versiago.instanceHostname" .Values.versia_go.versia.instance.address }}
|
||||||
|
secretName: {{ .Values.versia_go.ingress.sslSecret }}
|
||||||
|
commonName: {{ $host }}
|
||||||
|
dnsNames:
|
||||||
|
- {{ $host }}
|
||||||
|
subject:
|
||||||
|
organizations:
|
||||||
|
- {{ .Values.ssl.org }}
|
||||||
|
duration: 2160h0m0s # 90d
|
||||||
|
renewBefore: 720h0m0s # 30d
|
||||||
|
issuerRef:
|
||||||
|
{{- if (and (hasKey .Values.ssl "issuerKind") (hasKey .Values.ssl "issuerName")) }}
|
||||||
|
name: {{ .Values.ssl.issuerName }}
|
||||||
|
kind: {{ .Values.ssl.issuerKind }}
|
||||||
|
{{- else }}
|
||||||
|
name: {{ include "versiagorun.fullname" . | quote }}
|
||||||
|
kind: Issuer
|
||||||
|
{{- end }}
|
||||||
|
usages:
|
||||||
|
- server auth
|
||||||
|
- client auth
|
||||||
|
privateKey:
|
||||||
|
algorithm: RSA
|
||||||
|
encoding: PKCS1
|
||||||
|
size: 4096
|
||||||
|
{{- end }}
|
18
chart/templates/issuer.yaml
Normal file
18
chart/templates/issuer.yaml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{{- if not (and (hasKey .Values.ssl "issuerKind") (hasKey .Values.ssl "issuerName")) }}
|
||||||
|
apiVersion: cert-manager.io/v1
|
||||||
|
kind: Issuer
|
||||||
|
metadata:
|
||||||
|
name: {{ include "versiagorun.fullname" . | quote }}
|
||||||
|
spec:
|
||||||
|
acme:
|
||||||
|
server: https://acme-v02.api.letsencrypt.org/directory
|
||||||
|
email: {{ .Values.ssl.issuer.email }}
|
||||||
|
privateKeySecretRef:
|
||||||
|
name: {{ include "versiagorun.fullname" . }}-tls-account-key
|
||||||
|
solvers:
|
||||||
|
- http01:
|
||||||
|
{{- if hasKey .Values.versia_go.ingress "className" }}
|
||||||
|
ingress:
|
||||||
|
class: {{ .Values.versia_go.ingress.className | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
23
chart/values.yaml
Normal file
23
chart/values.yaml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
---
|
||||||
|
ssl: {
|
||||||
|
# org:
|
||||||
|
|
||||||
|
# Self provided issuer
|
||||||
|
# issuerName:
|
||||||
|
# issuerKind:
|
||||||
|
|
||||||
|
# Create a new namespaced Issuer
|
||||||
|
# issuer:
|
||||||
|
# email:
|
||||||
|
}
|
||||||
|
|
||||||
|
versia_go:
|
||||||
|
nats:
|
||||||
|
uri: nats://versia-nats:4222
|
||||||
|
|
||||||
|
nats:
|
||||||
|
config:
|
||||||
|
cluster:
|
||||||
|
enabled: true
|
||||||
|
jetstream:
|
||||||
|
enabled: true
|
34
values.yaml
Normal file
34
values.yaml
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
ssl:
|
||||||
|
org: DevMiner.xyz
|
||||||
|
issuer:
|
||||||
|
email: devminer@devminer.xyz
|
||||||
|
|
||||||
|
versia_go:
|
||||||
|
image:
|
||||||
|
tag: "main"
|
||||||
|
|
||||||
|
environment: staging
|
||||||
|
|
||||||
|
versia:
|
||||||
|
instance:
|
||||||
|
name: Versia-Go
|
||||||
|
description: Versia-Go instance running in Kubernetes
|
||||||
|
address: "https://versia.devminer.xyz"
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
className: istio
|
||||||
|
sslSecret: "a"
|
||||||
|
|
||||||
|
pod:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 16Mi
|
||||||
|
|
||||||
|
database:
|
||||||
|
type: "sqlite"
|
||||||
|
size: 1Gi
|
||||||
|
storageClassName: longhorn
|
Loading…
Reference in a new issue