Skip to content
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

Make nodePorts configurable #75

Merged
merged 3 commits into from
Apr 25, 2020
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
2 changes: 1 addition & 1 deletion onos-gui/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: onos-gui
description: ONOS Graphical User Interface
kubeVersion: ">=1.17.0"
type: application
version: 0.0.1
version: 0.0.2
appVersion: v0.6.0
keywords:
- onos
Expand Down
8 changes: 4 additions & 4 deletions onos-gui/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
apiVersion: v1
kind: Service
metadata:
Expand All @@ -24,8 +23,8 @@ spec:
- name: grpc-web-{{ $key }}
port: {{ $value.proxy }}
{{- end }}

---
{{- if .Values.service.external.nodePort }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -47,5 +46,6 @@ spec:
ports:
- name: web
port: 80
nodePort: 31180
protocol: TCP
nodePort: {{ .Values.service.external.nodePort }}
protocol: TCP
{{- end }}
2 changes: 2 additions & 0 deletions onos-gui/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ service:
## Service name is user-configurable for maximum service discovery flexibility.
name: onos-gui
type: LoadBalancer
external:
nodePort: 31180

ingress:
enabled: true
Expand Down
2 changes: 1 addition & 1 deletion onos-ric-ho/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: onos-ric-ho
description: ONOS Radio Access Network Handover
kubeVersion: ">=1.17.0"
type: application
version: 0.0.1
version: 0.0.2
appVersion: v0.6.0
keywords:
- onos
Expand Down
5 changes: 3 additions & 2 deletions onos-ric-ho/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ spec:
ports:
- name: exporter
port: 7001

---
{{- if .Values.service.external.nodePort }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -43,5 +43,6 @@ spec:
ports:
- name: exporter
port: 7001
nodePort: 31701
nodePort: {{ .Values.service.external.nodePort }}
protocol: TCP
{{- end }}
5 changes: 5 additions & 0 deletions onos-ric-ho/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ enableMetrics: false

store: {}

service:
# TODO: External NodePort service should be disabled by default
external:
nodePort: 31701

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
Expand Down
2 changes: 1 addition & 1 deletion onos-ric-mlb/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: onos-ric-mlb
description: ONOS Radio Access Network Load Balancer
kubeVersion: ">=1.17.0"
type: application
version: 0.0.1
version: 0.0.2
appVersion: v0.6.0
keywords:
- onos
Expand Down
5 changes: 3 additions & 2 deletions onos-ric-mlb/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ spec:
ports:
- name: exporter
port: 7002

---
{{- if .Values.service.external.nodePort }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -43,5 +43,6 @@ spec:
ports:
- name: exporter
port: 7002
nodePort: 31702
nodePort: {{ .Values.service.external.nodePort }}
protocol: TCP
{{- end }}
5 changes: 5 additions & 0 deletions onos-ric-mlb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ enableMetrics: false

store: {}

service:
# TODO: External NodePort service should be disabled by default
external:
nodePort: 31702

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
Expand Down
5 changes: 3 additions & 2 deletions onos-ric/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ spec:
port: 5150
- name: exporter
port: 7000

---
{{- if .Values.service.external.nodePort }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -45,5 +45,6 @@ spec:
ports:
- name: exporter
port: 7000
nodePort: 31700
nodePort: {{ .Values.service.external.nodePort }}
protocol: TCP
{{- end }}
4 changes: 3 additions & 1 deletion onos-ric/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ store:
partitionsPerCluster: 1

service:
type: ClusterIP
# TODO: External NodePort service should be disabled by default
external:
nodePort: 31700

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
Expand Down
6 changes: 3 additions & 3 deletions sd-ran/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ dependencies:
- name: onos-ric-ho
condition: import.onos-ric-ho.enabled
repository: file://../onos-ric-ho
version: 0.0.1
version: 0.0.2
- name: onos-ric-mlb
condition: import.onos-ric-mlb.enabled
repository: file://../onos-ric-mlb
version: 0.0.1
version: 0.0.2
- name: onos-topo
condition: import.onos-topo.enabled
repository: file://../onos-topo
Expand All @@ -55,7 +55,7 @@ dependencies:
- name: onos-gui
condition: import.onos-gui.enabled
repository: file://../onos-gui
version: 0.0.1
version: 0.0.2
- name: ran-simulator
condition: import.ran-simulator.enabled
repository: file://../ran-simulator
Expand Down
5 changes: 4 additions & 1 deletion sd-ran/tests/sd-ran.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ func (s *SDRANSuite) TestInstall(t *testing.T) {
sdran := helm.Chart("sd-ran").
Release("sd-ran").
Set("global.store.controller", "sd-ran-atomix-kubernetes-controller:5679").
Set("import.onos-gui.enabled", false)
Set("import.onos-gui.enabled", false).
Set("onos-ric.service.external.nodePort", 0).
Set("onos-ric-ho.service.external.nodePort", 0).
Set("onos-ric-mlb.service.external.nodePort", 0)
assert.NoError(t, sdran.Install(true))
}