Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.

Commit

Permalink
refactor: Standardize ports and ingress hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
pojntfx committed Mar 18, 2020
1 parent 3955cd9 commit 9c62d90
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Usage:
Flags:
-h, --help help for supernoded
-f, --supernoded.configFile string Configuration file to use.
-l, --supernoded.listenHostPort string TCP listen host:port. (default "localhost:1236")
-l, --supernoded.listenHostPort string TCP listen host:port. (default "localhost:1050")
```

#### `edged`
Expand All @@ -84,7 +84,7 @@ Usage:

Flags:
-f, --edged.configFile string Configuration file to use.
-l, --edged.listenHostPort string TCP listen host:port. (default "localhost:1235")
-l, --edged.listenHostPort string TCP listen host:port. (default "localhost:1060")
-h, --help help for edged
```

Expand Down
10 changes: 5 additions & 5 deletions charts/edged/templates/stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
cpu: {{ .Values.resources.cpu }}
{{ end }}
ports:
- containerPort: 1235
- containerPort: 1060
{{ if and .Values.meta.dev .Values.meta.debug }}
- containerPort: {{ .Values.meta.debugPort }}
{{end}}
Expand All @@ -59,8 +59,8 @@ spec:
type: NodePort
ports:
- name: grpc
port: 1235
targetPort: 1235
port: 1060
targetPort: 1060
nodePort: {{ .Values.ingress.nodePort }}
- name: debug
port: {{ .Values.meta.debugNodePort }}
Expand Down Expand Up @@ -96,8 +96,8 @@ spec:
app: edged-{{ .Release.Name }}
ports:
- name: grpc
port: 1235
targetPort: 1235
port: 1060
targetPort: 1060

---
apiVersion: networking.k8s.io/v1beta1
Expand Down
4 changes: 2 additions & 2 deletions charts/edged/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ resources:
maxReplicas: 10

ingress:
nodePort: 31235
domain: edged.felix.pojtinger.com
nodePort: 31060
domain: edged.example.com
path: /
10 changes: 5 additions & 5 deletions charts/supernoded/templates/stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
cpu: {{ .Values.resources.cpu }}
{{ end }}
ports:
- containerPort: 1236
- containerPort: 1050
{{ if and .Values.meta.dev .Values.meta.debug }}
- containerPort: {{ .Values.meta.debugPort }}
{{end}}
Expand All @@ -59,8 +59,8 @@ spec:
type: NodePort
ports:
- name: grpc
port: 1236
targetPort: 1236
port: 1050
targetPort: 1050
nodePort: {{ .Values.ingress.nodePort }}
- name: debug
port: {{ .Values.meta.debugNodePort }}
Expand Down Expand Up @@ -96,8 +96,8 @@ spec:
app: supernoded-{{ .Release.Name }}
ports:
- name: grpc
port: 1236
targetPort: 1236
port: 1050
targetPort: 1050

---
apiVersion: networking.k8s.io/v1beta1
Expand Down
4 changes: 2 additions & 2 deletions charts/supernoded/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ resources:
maxReplicas: 10

ingress:
nodePort: 31236
domain: supernoded.felix.pojtinger.com
nodePort: 31050
domain: supernoded.example.com
path: /
4 changes: 2 additions & 2 deletions cmd/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package cmd

const (
SupernodeHostPortDefault = "localhost:1234" // SupernodeHostPortDefault is the default supernode Host:port that edges started in `edged` should connect to.
EdgedServerHostPortDefault = "localhost:1235" // EdgedServerHostPortDefault is the default Host:port of `edged`.
SupernodeServerHostPortDefault = "localhost:1236" // SupernodeServerHostPortDefault is the default Host:port of `supernoded`.
EdgedServerHostPortDefault = "localhost:1060" // EdgedServerHostPortDefault is the default Host:port of `edged`.
SupernodeServerHostPortDefault = "localhost:1050" // SupernodeServerHostPortDefault is the default Host:port of `supernoded`.
HostPortDocs = "Host:port of the server to use." // HostPortDocs is the documentation for the host:port flag.
ConfigurationFileDocs = "Configuration file to use." // ConfigurationFileDocs is the documentation for the configuration file flag.)
)
Expand Down
2 changes: 1 addition & 1 deletion examples/edged.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
edged:
listenHostPort: localhost:1235
listenHostPort: localhost:1060
2 changes: 1 addition & 1 deletion examples/supernoded.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
supernoded:
listenHostPort: localhost:1236
listenHostPort: localhost:1050

0 comments on commit 9c62d90

Please sign in to comment.