-
-
Notifications
You must be signed in to change notification settings - Fork 181
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
Add helm chart #46
Open
joaoss35
wants to merge
2
commits into
serjs:master
Choose a base branch
from
joaoss35:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add helm chart #46
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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/ |
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,18 @@ | ||
apiVersion: v2 | ||
name: socks5-server | ||
description: Socks5-server is a simple socks5 server using go-socks5 with authentication, allowed ips list and destination FQDNs filtering. | ||
type: application | ||
version: 1.0.0 | ||
appVersion: 0.0.3 | ||
keywords: | ||
- kubernetes | ||
- socks5 | ||
- socks5-server | ||
- service | ||
- proxy | ||
home: https://github.com/serjs/socks5-server | ||
sources: | ||
- https://github.com/serjs/socks5-server | ||
maintainers: | ||
- name: joaoss35 | ||
email: joaopachecos@hotmail.com |
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,7 @@ | ||
*********************************************************************** | ||
* Socks5-Server * | ||
*********************************************************************** | ||
Chart version: {{ .Chart.Version }} | ||
App version: {{ .Chart.AppVersion }} | ||
Image tag: {{ include "socks5.image" . }} | ||
*********************************************************************** | ||
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,70 @@ | ||
{{/* | ||
The chart name | ||
*/}} | ||
{{- define "socks5-server.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "socks5-server.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 }} | ||
|
||
{{/* | ||
Define the chart name and version, just like the chart label. | ||
*/}} | ||
{{- define "socks5-server.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Define some common labels | ||
*/}} | ||
{{- define "socks5-server.labels" -}} | ||
helm.sh/chart: {{ include "socks5-server.chart" . }} | ||
{{ include "socks5-server.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- with .Values.commonLabels }} | ||
{{ toYaml . }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Define the selector labels | ||
*/}} | ||
{{- define "socks5-server.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "socks5-server.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Defime the service account anme | ||
*/}} | ||
{{- define "socks5-server.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "socks5-server.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Define the image | ||
*/}} | ||
{{- define "socks5.image" -}} | ||
{{- printf "%s:%s" .Values.image.repository (default (printf "v%s" .Chart.AppVersion) .Values.image.tag) }} | ||
{{- 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,103 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "socks5-server.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "socks5-server.labels" . | nindent 4 }} | ||
{{- with .Values.deploymentAnnotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
{{- include "socks5-server.selectorLabels" . | nindent 6 }} | ||
strategy: | ||
{{- toYaml .Values.deploymentStrategy | nindent 4 }} | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "socks5-server.selectorLabels" . | nindent 8 }} | ||
{{- with .Values.podLabels }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
spec: | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
serviceAccountName: {{ include "socks5-server.serviceAccountName" . }} | ||
{{- with .Values.shareProcessNamespace }} | ||
shareProcessNamespace: {{ . }} | ||
{{- end }} | ||
{{- with .Values.podSecurityContext }} | ||
securityContext: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.priorityClassName }} | ||
priorityClassName: {{ . | quote }} | ||
{{- end }} | ||
{{- with .Values.terminationGracePeriodSeconds }} | ||
terminationGracePeriodSeconds: {{ . }} | ||
{{- end }} | ||
{{- with .Values.dnsPolicy }} | ||
dnsPolicy: {{ . }} | ||
{{- end }} | ||
containers: | ||
- name: socks5-server | ||
{{- with .Values.securityContext }} | ||
securityContext: | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
image: {{ include "socks5.image" . }} | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
{{- with .Values.env }} | ||
env: | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
args: | ||
{{- range .Values.extraArgs }} | ||
- {{ tpl . $ }} | ||
{{- end }} | ||
ports: | ||
- name: socks5 | ||
protocol: TCP | ||
containerPort: 1080 | ||
livenessProbe: | ||
{{- toYaml .Values.livenessProbe | nindent 12 }} | ||
readinessProbe: | ||
{{- toYaml .Values.readinessProbe | nindent 12 }} | ||
{{- if .Values.extraVolumeMounts }} | ||
volumeMounts: | ||
{{- with .Values.extraVolumeMounts }} | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- with .Values.resources }} | ||
resources: | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
{{- if .Values.extraVolumes }} | ||
volumes: | ||
{{- with .Values.extraVolumes }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- with .Values.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.topologySpreadConstraints }} | ||
topologySpreadConstraints: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- 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,20 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "socks5-server.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "socks5-server.labels" . | nindent 4 }} | ||
{{- with .Values.service.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
{{- include "socks5-server.selectorLabels" . | nindent 4 }} | ||
ports: | ||
- name: socks5 | ||
port: {{ .Values.service.port }} | ||
targetPort: socks5 | ||
protocol: TCP |
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,16 @@ | ||
{{- if .Values.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ include "socks5-server.serviceAccountName" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "socks5-server.labels" . | nindent 4 }} | ||
{{- with .Values.serviceAccount.labels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with .Values.serviceAccount.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- 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,79 @@ | ||
# socks5-server values file YAML-formatted= | ||
|
||
image: | ||
repository: "serjs/go-socks5-proxy" | ||
# Define this override v{{ .Chart.AppVersion }}, which is the default | ||
# tag: "v0.0.3" | ||
pullPolicy: IfNotPresent | ||
|
||
imagePullSecrets: [] | ||
|
||
nameOverride: "" | ||
fullnameOverride: "" | ||
|
||
commonLabels: {} | ||
|
||
serviceAccount: | ||
create: true | ||
annotations: {} | ||
labels: {} | ||
# Defaults to the the fullname template if empty | ||
name: "" | ||
|
||
deploymentAnnotations: {} | ||
|
||
podLabels: {} | ||
|
||
podAnnotations: {} | ||
|
||
shareProcessNamespace: false | ||
|
||
podSecurityContext: | ||
fsGroup: 65534 | ||
joaoss35 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
seccompProfile: | ||
type: RuntimeDefault | ||
|
||
securityContext: | ||
runAsNonRoot: true | ||
runAsUser: 65534 | ||
readOnlyRootFilesystem: true | ||
capabilities: | ||
drop: ["ALL"] | ||
|
||
# Defaults to `ClusterFirst` | ||
dnsPolicy: | ||
|
||
priorityClassName: "" | ||
|
||
terminationGracePeriodSeconds: | ||
|
||
env: | ||
# - name: PROXY_USER | ||
# value: "foo" | ||
# - name: PROXY_PASSWORD | ||
# value: "bar" | ||
# - name: PROXY_PORT | ||
# value: "1080" | ||
|
||
service: | ||
port: 1080 | ||
annotations: {} | ||
|
||
extraVolumes: [] | ||
|
||
extraVolumeMounts: [] | ||
|
||
resources: {} | ||
|
||
nodeSelector: {} | ||
|
||
tolerations: [] | ||
|
||
affinity: {} | ||
|
||
topologySpreadConstraints: [] | ||
|
||
extraArgs: [] | ||
|
||
deploymentStrategy: | ||
type: RollingUpdate |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this node the name/port setup by the
Service
definition?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't find it necessary, specially since we are using 1080.