From 9c62d90a72933c398b756db5ba546b1af0a12e6f Mon Sep 17 00:00:00 2001 From: Felix Pojtinger Date: Wed, 18 Mar 2020 17:33:11 +0100 Subject: [PATCH] refactor: Standardize ports and ingress hosts --- README.md | 4 ++-- charts/edged/templates/stack.yaml | 10 +++++----- charts/edged/values.yaml | 4 ++-- charts/supernoded/templates/stack.yaml | 10 +++++----- charts/supernoded/values.yaml | 4 ++-- cmd/constants.go | 4 ++-- examples/edged.yaml | 2 +- examples/supernoded.yaml | 2 +- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index b4f2ce3..2e6c7b2 100644 --- a/README.md +++ b/README.md @@ -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` @@ -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 ``` diff --git a/charts/edged/templates/stack.yaml b/charts/edged/templates/stack.yaml index eaf9f9b..3fd9453 100644 --- a/charts/edged/templates/stack.yaml +++ b/charts/edged/templates/stack.yaml @@ -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}} @@ -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 }} @@ -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 diff --git a/charts/edged/values.yaml b/charts/edged/values.yaml index 1d61a85..da2b462 100644 --- a/charts/edged/values.yaml +++ b/charts/edged/values.yaml @@ -14,6 +14,6 @@ resources: maxReplicas: 10 ingress: - nodePort: 31235 - domain: edged.felix.pojtinger.com + nodePort: 31060 + domain: edged.example.com path: / diff --git a/charts/supernoded/templates/stack.yaml b/charts/supernoded/templates/stack.yaml index e1827c4..653b9f5 100644 --- a/charts/supernoded/templates/stack.yaml +++ b/charts/supernoded/templates/stack.yaml @@ -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}} @@ -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 }} @@ -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 diff --git a/charts/supernoded/values.yaml b/charts/supernoded/values.yaml index 83fd5a3..b3b4ab3 100644 --- a/charts/supernoded/values.yaml +++ b/charts/supernoded/values.yaml @@ -14,6 +14,6 @@ resources: maxReplicas: 10 ingress: - nodePort: 31236 - domain: supernoded.felix.pojtinger.com + nodePort: 31050 + domain: supernoded.example.com path: / diff --git a/cmd/constants.go b/cmd/constants.go index e0fd7f6..ab23c4e 100644 --- a/cmd/constants.go +++ b/cmd/constants.go @@ -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.) ) diff --git a/examples/edged.yaml b/examples/edged.yaml index 2415b7a..7f73e2c 100644 --- a/examples/edged.yaml +++ b/examples/edged.yaml @@ -1,2 +1,2 @@ edged: - listenHostPort: localhost:1235 + listenHostPort: localhost:1060 diff --git a/examples/supernoded.yaml b/examples/supernoded.yaml index 6c80da4..ef56755 100644 --- a/examples/supernoded.yaml +++ b/examples/supernoded.yaml @@ -1,2 +1,2 @@ supernoded: - listenHostPort: localhost:1236 + listenHostPort: localhost:1050