Skip to content

Commit eab2996

Browse files
authored
mc-router: add option for loadBalancerIP (#289)
1 parent 40b9155 commit eab2996

4 files changed

Lines changed: 33 additions & 1 deletion

File tree

charts/mc-router/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v1
22
name: mc-router
3-
version: 1.4.1
3+
version: 1.5.0
44
# not used
55
appVersion: 1.0.0
66
home: https://github.com/itzg/mc-router

charts/mc-router/templates/router-service.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ metadata:
1010
spec:
1111
{{- with .Values.services.minecraft }}
1212
type: {{ .type }}
13+
{{- if .loadBalancerIP }}
14+
loadBalancerIP: {{ .loadBalancerIP }}
15+
{{- end }}
1316
ports:
1417
- port: {{ .port }}
1518
{{- if list "LoadBalancer" "NodePort" | has .type }}

charts/mc-router/values.schema.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,34 @@
5151
"port": {
5252
"type": "integer",
5353
"minimum": 1
54+
},
55+
"nodePort": {
56+
"type": "integer",
57+
"minimum": 1
58+
},
59+
"loadBalancerIP": {
60+
"type": "string",
61+
"title": "IP address to assign to LoadBalancer service"
62+
}
63+
},
64+
"if": {
65+
"properties": {
66+
"loadBalancerIP": {
67+
"type": "string",
68+
"minLength": 1
69+
}
70+
},
71+
"required": ["loadBalancerIP"]
72+
},
73+
"then": {
74+
"properties": {
75+
"type": {
76+
"const": "LoadBalancer"
77+
}
5478
}
79+
},
80+
"errorMessage": {
81+
"then": "loadBalancerIP can only be used when service type is LoadBalancer"
5582
}
5683
}
5784
}

charts/mc-router/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ services:
6565
port: 25565
6666
# Service port exposed externally on each node
6767
# nodePort: 30065
68+
# IP address to assign to LoadBalancer service
69+
# loadBalancerIP: ""
6870
# Service annotations
6971
# annotations: {}
7072

0 commit comments

Comments
 (0)