Skip to content
Merged
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
23 changes: 23 additions & 0 deletions charts/gost-agent/.helmignore
Original file line number Diff line number Diff line change
@@ -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/
12 changes: 12 additions & 0 deletions charts/gost-agent/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v2
name: gost-agent
description: A Helm chart for Kubernetes
type: application
version: 0.1.0
maintainers:
- name: codefresh
url: https://codefresh-io.github.io/
dependencies:
- name: cf-common
repository: oci://quay.io/codefresh/charts
version: 0.24.0
61 changes: 61 additions & 0 deletions charts/gost-agent/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# gost-agent

![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)

A Helm chart for Kubernetes

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| codefresh | | <https://codefresh-io.github.io/> |

## Requirements

| Repository | Name | Version |
|------------|------|---------|
| oci://quay.io/codefresh/charts | cf-common | 0.24.0 |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| container.args[0] | string | `"-L"` | |
| container.args[1] | string | `"rtcp://:0//internal-gateway:80"` | |
| container.args[2] | string | `"-F"` | |
| container.args[3] | string | `"tunnel+wss://$(GOST_SERVER_HOSTNAME):443?tunnel.id=$(GOST_PLATFORM_TUNNEL_ID)&keepalive=true&ttl=15s"` | |
| container.command[0] | string | `"gost"` | |
| container.env.GOST_PLATFORM_TUNNEL_HOSTNAME | string | `""` | |
| container.env.GOST_PLATFORM_TUNNEL_ID | string | `""` | |
| container.env.GOST_SERVER_HOSTNAME | string | `""` | |
| container.image.pullPolicy | string | `"IfNotPresent"` | |
| container.image.registry | string | `"docker.io"` | |
| container.image.repository | string | `"gogost/gost"` | |
| container.image.tag | string | `"latest"` | |
| container.probes.liveness.enabled | bool | `true` | |
| container.probes.liveness.exec.command[0] | string | `"wget"` | |
| container.probes.liveness.exec.command[1] | string | `"--server-response"` | |
| container.probes.liveness.exec.command[2] | string | `"--spider"` | |
| container.probes.liveness.exec.command[3] | string | `"https://$(GOST_PLATFORM_TUNNEL_HOSTNAME)"` | |
| container.probes.liveness.spec.failureThreshold | int | `2` | |
| container.probes.liveness.spec.initialDelaySeconds | int | `30` | |
| container.probes.liveness.spec.periodSeconds | int | `15` | |
| container.probes.liveness.spec.successThreshold | int | `1` | |
| container.probes.liveness.spec.timeoutSeconds | int | `15` | |
| container.probes.liveness.type | string | `"exec"` | |
| controller.deployment.strategy | string | `"Recreate"` | |
| controller.enabled | bool | `true` | |
| controller.replicas | int | `1` | |
| controller.type | string | `"deployment"` | |
| global | object | `{}` | |
| hpa | object | `{}` | |
| keda.auth | object | `{}` | |
| keda.spec | object | `{}` | |
| libraryMode | bool | `false` | |
| nodeSelector | object | `{}` | |
| pdb | object | `{}` | |
| tolerations | list | `[]` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.9.1](https://github.com/norwoodj/helm-docs/releases/v1.9.1)
6 changes: 6 additions & 0 deletions charts/gost-agent/templates/_components/controller.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{- define "gost-agent.controller" }}

{{- $templateName := printf "cf-common-%s.controller" (index .Subcharts "cf-common").Chart.Version -}}
{{- include $templateName . -}}

{{- end }}
62 changes: 62 additions & 0 deletions charts/gost-agent/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "ngrok-agent.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 chart name it will be used as a full name.
*/}}
{{- define "ngrok-agent.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 chart name and version as used by the chart label.
*/}}
{{- define "ngrok-agent.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "ngrok-agent.labels" -}}
helm.sh/chart: {{ include "ngrok-agent.chart" . }}
{{ include "ngrok-agent.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "ngrok-agent.selectorLabels" -}}
app.kubernetes.io/name: {{ include "ngrok-agent.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "ngrok-agent.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "ngrok-agent.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
5 changes: 5 additions & 0 deletions charts/gost-agent/templates/all_resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{- define "ngrok-agent.resources" -}}

{{ include "ngrok-agent.controller" . }}

{{- end -}}
3 changes: 3 additions & 0 deletions charts/gost-agent/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{- if not .Values.libraryMode }}
{{- include "gost-agent.controller" . }}
{{- end }}
53 changes: 53 additions & 0 deletions charts/gost-agent/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
libraryMode: false

global: {}

controller:
enabled: true
type: deployment
replicas: 1
deployment:
strategy: Recreate

container:
image:
registry: docker.io
repository: gogost/gost
tag: latest
pullPolicy: IfNotPresent
command:
- "gost"
args:
- "-L"
- 'rtcp://:0//internal-gateway:80'
- "-F"
- "tunnel+wss://$(GOST_SERVER_HOSTNAME):443?tunnel.id=$(GOST_PLATFORM_TUNNEL_ID)&keepalive=true&ttl=15s"
env:
GOST_SERVER_HOSTNAME: ""
GOST_PLATFORM_TUNNEL_ID: ""
GOST_PLATFORM_TUNNEL_HOSTNAME: ""
probes:
liveness:
enabled: true
type: exec
exec:
command:
- wget
- --server-response
- --spider
- https://$(GOST_PLATFORM_TUNNEL_HOSTNAME)
spec:
initialDelaySeconds: 30
periodSeconds: 15
timeoutSeconds: 15
successThreshold: 1
failureThreshold: 2

nodeSelector: {}
tolerations: []
affinity: {}
hpa: {}
keda:
spec: {}
auth: {}
pdb: {}
Loading