-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from zufardhiyaulhaq/feature/advanced-ngrok-1
Feature/advanced ngrok & release 0.0.2
- Loading branch information
Showing
15 changed files
with
236 additions
and
16 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
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,20 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: nginx-deployment | ||
namespace: default | ||
spec: | ||
selector: | ||
matchLabels: | ||
run: nginx | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
run: nginx | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx | ||
ports: | ||
- containerPort: 80 |
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: ngrok.com/v1alpha1 | ||
kind: Ngrok | ||
metadata: | ||
name: nginx-ngrok-full | ||
namespace: default | ||
spec: | ||
# ngrok authtoken | ||
authtoken: your-auth-token | ||
|
||
# protocol used, currently support http & tcp | ||
# tcp is less tested, please create issue | ||
# if there is an issue with tcp | ||
protocol: http | ||
|
||
# region where ngrok run | ||
# refer to the docs | ||
# https://ngrok.com/docs | ||
region: ap | ||
|
||
# auth protect your http | ||
# with user password combination | ||
# <user>:<password> | ||
auth: user:password | ||
|
||
# enable inspection | ||
# only works for http protocol | ||
inspect: true | ||
|
||
# this supported starting with basic plan | ||
# using custom hostname require to set authtoken | ||
# the behaviour when set `hostname` with free account | ||
# is unknown! | ||
hostname: ngrok.zufardhiyaulhaq.com | ||
|
||
# service section represent | ||
# the service name in the same namespace | ||
service: nginx-service | ||
|
||
# port section represent | ||
# the service port in the same namespace | ||
port: 80 |
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,11 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: nginx-service | ||
namespace: default | ||
spec: | ||
ports: | ||
- port: 80 | ||
protocol: TCP | ||
selector: | ||
run: nginx |
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,32 @@ | ||
web_addr: 0.0.0.0:4040 | ||
|
||
{{if .Spec.AuthToken }} | ||
authtoken: {{ .Spec.AuthToken }} | ||
{{end}} | ||
|
||
{{if .Spec.Region }} | ||
region: {{ .Spec.Region }} | ||
{{end}} | ||
|
||
tunnels: | ||
app: | ||
proto: {{ .Spec.Protocol }} | ||
addr: {{ .Spec.Service }}:{{ .Spec.Port }} | ||
|
||
{{if eq .Spec.Protocol "http"}} | ||
inspect: {{ .Spec.Inspect }} | ||
|
||
{{if .Spec.Auth }} | ||
auth: {{ .Spec.Auth }} | ||
{{ end }} | ||
|
||
{{if .Spec.AuthToken }}{{if .Spec.Hostname }} | ||
hostname: {{ .Spec.Hostname }} | ||
{{end}}{{end}} | ||
{{end}} | ||
|
||
{{if eq .Spec.Protocol "tcp"}} | ||
{{if .Spec.AuthToken }}{{if .Spec.Hostname }} | ||
remote_addr: {{ .Spec.Hostname }} | ||
{{end}}{{end}} | ||
{{end}} |