Skip to content

Commit 479c831

Browse files
feat: add gost-agent
1 parent b435285 commit 479c831

File tree

8 files changed

+198
-0
lines changed

8 files changed

+198
-0
lines changed

charts/gost-agent/.helmignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

charts/gost-agent/Chart.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v2
2+
name: ngrok-agent
3+
description: A Helm chart for Kubernetes
4+
type: application
5+
version: 0.1.0
6+
maintainers:
7+
- name: codefresh
8+
url: https://codefresh-io.github.io/
9+
dependencies:
10+
- name: cf-common
11+
repository: oci://quay.io/codefresh/charts
12+
version: 0.24.1

charts/gost-agent/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# ngrok-agent
2+
3+
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
4+
5+
A Helm chart for Kubernetes
6+
7+
## Maintainers
8+
9+
| Name | Email | Url |
10+
| ---- | ------ | --- |
11+
| codefresh | | <https://codefresh-io.github.io/> |
12+
13+
## Requirements
14+
15+
| Repository | Name | Version |
16+
|------------|------|---------|
17+
| oci://quay.io/codefresh/charts | cf-common | 0.24.1 |
18+
19+
## Values
20+
21+
| Key | Type | Default | Description |
22+
|-----|------|---------|-------------|
23+
| affinity | object | `{}` | |
24+
| container.args[0] | string | `"-L"` | |
25+
| container.args[1] | string | `"rtcp://:0//internal-gateway:80"` | |
26+
| container.args[2] | string | `"-F"` | |
27+
| container.args[3] | string | `"tunnel+wss://${GOST_SERVER_HOSTNAME}:443?tunnel.id=${GOST_PLATFORM_TUNNEL_ID}&keepalive=true&ttl=15s"` | |
28+
| container.command[0] | string | `"gost"` | |
29+
| container.env.GOST_PLATFORM_TUNNEL_ID | string | `"c5db1800-ce4c-11de-8413-6a7c5a153390"` | |
30+
| container.env.GOST_SERVER_HOSTNAME | string | `"f598c8b79c17fe29.gost.shared-services.cf-infra.com"` | |
31+
| container.image.pullPolicy | string | `"IfNotPresent"` | |
32+
| container.image.registry | string | `"docker.io"` | |
33+
| container.image.repository | string | `"gogost/gost"` | |
34+
| container.image.tag | string | `"latest"` | |
35+
| controller.deployment.strategy | string | `"Recreate"` | |
36+
| controller.enabled | bool | `true` | |
37+
| controller.replicas | int | `1` | |
38+
| controller.type | string | `"deployment"` | |
39+
| global | object | `{}` | |
40+
| hpa | object | `{}` | |
41+
| keda.auth | object | `{}` | |
42+
| keda.spec | object | `{}` | |
43+
| libraryMode | bool | `false` | |
44+
| nodeSelector | object | `{}` | |
45+
| pdb | object | `{}` | |
46+
| tolerations | list | `[]` | |
47+
48+
----------------------------------------------
49+
Autogenerated from chart metadata using [helm-docs v1.9.1](https://github.com/norwoodj/helm-docs/releases/v1.9.1)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{{- define "gost-agent.controller" }}
2+
3+
{{- $templateName := printf "cf-common-%s.controller" (index .Subcharts "cf-common").Chart.Version -}}
4+
{{- include $templateName . -}}
5+
6+
{{- end }}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "ngrok-agent.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "ngrok-agent.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "ngrok-agent.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "ngrok-agent.labels" -}}
37+
helm.sh/chart: {{ include "ngrok-agent.chart" . }}
38+
{{ include "ngrok-agent.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "ngrok-agent.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "ngrok-agent.name" . }}
50+
app.kubernetes.io/instance: {{ .Release.Name }}
51+
{{- end }}
52+
53+
{{/*
54+
Create the name of the service account to use
55+
*/}}
56+
{{- define "ngrok-agent.serviceAccountName" -}}
57+
{{- if .Values.serviceAccount.create }}
58+
{{- default (include "ngrok-agent.fullname" .) .Values.serviceAccount.name }}
59+
{{- else }}
60+
{{- default "default" .Values.serviceAccount.name }}
61+
{{- end }}
62+
{{- end }}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{{- define "ngrok-agent.resources" -}}
2+
3+
{{ include "ngrok-agent.controller" . }}
4+
---
5+
{{ include "ngrok-agent.configmap" . }}
6+
7+
{{- end -}}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{{- if not .Values.libraryMode }}
2+
{{- include "gost-agent.controller" . }}
3+
{{- end }}

charts/gost-agent/values.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
libraryMode: false
2+
3+
global: {}
4+
5+
controller:
6+
enabled: true
7+
type: deployment
8+
replicas: 1
9+
deployment:
10+
strategy: Recreate
11+
12+
container:
13+
image:
14+
registry: docker.io
15+
repository: gogost/gost
16+
tag: latest
17+
pullPolicy: IfNotPresent
18+
command:
19+
- "gost"
20+
args:
21+
- "-L"
22+
- 'rtcp://:0//internal-gateway:80'
23+
- "-F"
24+
- "tunnel+wss://${GOST_SERVER_HOSTNAME}:443?tunnel.id=${GOST_PLATFORM_TUNNEL_ID}&keepalive=true&ttl=15s"
25+
env:
26+
GOST_SERVER_HOSTNAME: f598c8b79c17fe29.gost.shared-services.cf-infra.com
27+
GOST_PLATFORM_TUNNEL_ID: c5db1800-ce4c-11de-8413-6a7c5a153390
28+
29+
nodeSelector: {}
30+
tolerations: []
31+
affinity: {}
32+
hpa: {}
33+
keda:
34+
spec: {}
35+
auth: {}
36+
pdb: {}

0 commit comments

Comments
 (0)