-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
475 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: v2 | ||
name: SctgDesk-RendezVous | ||
description: A Helm chart for Kubernetes | ||
type: application | ||
version: 1.0.0 | ||
appVersion: 1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ .Release.Name }}-api-config | ||
data: | ||
config.yml: | | ||
dbtype: 'sqlite3' | ||
authkey: {{ .Values.api.authkey }} | ||
cryptkey: {{ .Values.api.cryptkey }} |
41 changes: 41 additions & 0 deletions
41
charts/sctgdesk-rendezvous/templates/deployment-api-server.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Release.Name }}-api | ||
labels: | ||
app: {{ .Release.Name }}-api | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: {{ .Release.Name }}-api | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ .Release.Name }}-api | ||
spec: | ||
containers: | ||
- name: {{ .Release.Name }}-api-server-container | ||
image: eltorio/sctgdesk-api-server:v1.4.5 | ||
command: | ||
- "/bin/sh" | ||
- "-c" | ||
- "ln -svf /app/conf/configmap/config.yml /app/conf/config.yml && [ -f /data/sqlite3.db ] && ln -s /data/sqlite3.db /app/sqlite3.db || true && /app/rustdesk-api-server" | ||
ports: | ||
- containerPort: 21114 | ||
volumeMounts: | ||
{{- if .Values.persistence.enabled }} | ||
- name: data | ||
mountPath: /data | ||
{{- end }} | ||
- name: config-volume | ||
mountPath: /app/conf/configmap | ||
volumes: | ||
- name: data | ||
{{- if .Values.persistence.enabled }} | ||
persistentVolumeClaim: | ||
claimName: {{ .Release.Name }}-pvc | ||
{{- end }} | ||
- name: config-volume | ||
configMap: | ||
name: {{ .Release.Name }}-api-config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{- if .Values.gateway.enabled }} | ||
{{- $ports := list 21115 21116 21117 21118 -}} | ||
apiVersion: gateway.networking.k8s.io/v1 | ||
kind: Gateway | ||
metadata: | ||
name: hbbr-hbbs-gateway | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
gatewayClassName: haproxy-gatewayclass | ||
listeners: | ||
{{- range $ports }} | ||
- name: port-{{ . }} | ||
protocol: TCP | ||
port: {{ . }} | ||
allowedRoutes: | ||
kinds: | ||
- kind: TCPRoute | ||
namespaces: | ||
from: Same | ||
{{- end }} | ||
{{- end}} |
31 changes: 31 additions & 0 deletions
31
charts/sctgdesk-rendezvous/templates/ingress-api-server.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{{- if .Values.ingress.enabled -}} | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ .Release.Name }}-api-server-ingress | ||
annotations: | ||
{{- if .Values.ingress.annotations }} | ||
{{- toYaml .Values.ingress.annotations | nindent 4 }} | ||
{{- end }} | ||
{{- if .Values.ingress.clusterIssuer }} | ||
cert-manager.io/cluster-issuer: {{ .Values.ingress.clusterIssuer }} | ||
{{- end }} | ||
spec: | ||
{{- if .Values.ingress.clusterIssuer }} | ||
tls: | ||
- hosts: | ||
- {{ .Values.ingress.host }} | ||
secretName: {{ .Release.Name }}-tls | ||
{{- end }} | ||
rules: | ||
- host: {{ .Values.ingress.host }} | ||
http: | ||
paths: | ||
- pathType: Prefix | ||
path: "/" | ||
backend: | ||
service: | ||
name: {{ .Release.Name }}-api-server-service | ||
port: | ||
number: 21114 | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Release.Name }}-hbb | ||
labels: | ||
app: {{ .Release.Name }}-hbb | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: {{ .Release.Name }}-hbb | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ .Release.Name }}-hbb | ||
spec: | ||
restartPolicy: Always | ||
volumes: | ||
- name: data | ||
{{- if .Values.persistence.enabled }} | ||
persistentVolumeClaim: | ||
claimName: {{ .Release.Name }}-pvc | ||
{{- else }} | ||
emptyDir: {} | ||
{{- end }} | ||
- name: secret-volume | ||
secret: | ||
secretName: {{ .Release.Name }}-secret | ||
containers: | ||
- name: hbbs | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
# command: [ "{{ .Values.hbbs.command }}" ] | ||
command: [ "/bin/sh", "-c", "ln -svf {{ .Values.volume.mountPath }}/secrets/* {{ .Values.volume.mountPath }}/ && {{ .Values.hbbs.command }}" ] | ||
env: | ||
- name: KEY_PUB | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ .Release.Name }}-secret | ||
key: id_ed25519.pub | ||
- name: KEY_PRIV | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ .Release.Name }}-secret | ||
key: id_ed25519 | ||
volumeMounts: | ||
- name: data | ||
mountPath: {{ .Values.volume.mountPath }} | ||
- name: secret-volume | ||
mountPath: "{{ .Values.volume.mountPath }}/secrets" | ||
readOnly: true | ||
- name: hbbr | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
command: [ "/bin/sh", "-c", "ln -svf {{ .Values.volume.mountPath }}/secrets/* {{ .Values.volume.mountPath }}/ && {{ .Values.hbbr.command }}" ] | ||
env: | ||
- name: KEY_PUB | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ .Release.Name }}-secret | ||
key: id_ed25519.pub | ||
- name: KEY_PRIV | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ .Release.Name }}-secret | ||
key: id_ed25519 | ||
volumeMounts: | ||
- name: data | ||
mountPath: {{ .Values.volume.mountPath }} | ||
- name: secret-volume | ||
mountPath: "{{ .Values.volume.mountPath }}/secrets" | ||
readOnly: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{{- if .Values.persistence.enabled }} | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: {{ .Release.Name }}-pvc | ||
spec: | ||
accessModes: | ||
- ReadWriteMany | ||
resources: | ||
requests: | ||
storage: {{ .Values.persistence.size }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ .Release.Name }}-secret | ||
type: Opaque | ||
data: | ||
id_ed25519: {{ .Values.secret.id_ed25519 }} | ||
id_ed25519.pub: {{ .Values.secret.id_ed25519_pub }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ .Release.Name }}-api-server-service | ||
spec: | ||
type: LoadBalancer | ||
selector: | ||
app: {{ .Release.Name }}-api | ||
ports: | ||
- name: port-21114 | ||
port: 21114 | ||
targetPort: 21114 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ .Release.Name }}-hbbr-hbbs-service | ||
spec: | ||
type: LoadBalancer | ||
selector: | ||
app: {{ .Release.Name }}-hbb | ||
ports: | ||
- name: port-21115 | ||
port: 21115 | ||
targetPort: 21115 | ||
- name: port-21116 | ||
port: 21116 | ||
targetPort: 21116 | ||
- name: port-21117 | ||
port: 21117 | ||
targetPort: 21117 | ||
- name: port-21118 | ||
port: 21118 | ||
targetPort: 21118 | ||
- name: port-21119 | ||
port: 21119 | ||
targetPort: 21119 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{{- if .Values.gateway.enabled }} | ||
{{- $ports := list 21115 21116 21117 21118 -}} | ||
{{- range $ports }} | ||
--- | ||
apiVersion: gateway.networking.k8s.io/v1alpha2 | ||
kind: TCPRoute | ||
metadata: | ||
name: port-{{ . }} | ||
namespace: {{ $.Release.Namespace }} | ||
annotations: | ||
{{- if $.Values.gateway.proxyV2 }} | ||
haproxy.org/send-proxy-v2: 'true' | ||
{{- end}} | ||
spec: | ||
parentRefs: | ||
- name: haproxy-gateway | ||
sectionName: port-{{ . }} | ||
rules: | ||
- backendRefs: | ||
- kind: Service | ||
name: {{ $.Release.Name }}-hbbr-hbbs-service | ||
port: {{ . }} | ||
{{- end }} | ||
{{- end }} |
Oops, something went wrong.