You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/09/29 19:18:31 UTC
[GitHub] [pinot] jameskelleher opened a new pull request, #9494: [feature] [kubernetes] add loadBalancerSourceRanges to service-external.yaml for controller and broker
jameskelleher opened a new pull request, #9494:
URL: https://github.com/apache/pinot/pull/9494
The primary purpose of this PR is to [add support for](https://github.com/apache/pinot/issues/9438) `loadBalancerSourceRanges` (which already exists in `values.yaml`) to the `service-external.yaml` templates for the controller and the broker. This allows the developer to specify which IP addresses they'd like to permit controller/broker access.
Additionally, I changed some template file suffixes from `.yml` to `.yaml`, to a) match internal consistency and b) adhere to Helm's recommendations.
# Testing
I tested the changes by running `helm install --dry-run --debug pinot ./kubernetes/helm/pinot`. For each test, I provide what I set `loadBalancerSourceRanges` to in `values.yaml`, as well as the templated result for `service-external.yaml`.
## Test 1: Empty source range list
```yaml
# values.yaml
loadBalancerSourceRanges: []
```
```yaml
# Source: pinot/templates/controller/service-external.yaml
apiVersion: v1
kind: Service
metadata:
name: pinot-controller-external
annotations:
{}
labels:
helm.sh/chart: pinot-0.2.6-SNAPSHOT
app: pinot
release: pinot
app.kubernetes.io/version: "0.2.6-SNAPSHOT"
app.kubernetes.io/managed-by: Helm
heritage: Helm
component: controller
spec:
type: LoadBalancer
ports:
- name: external-controller
port: 9000
selector:
app: pinot
release: pinot
component: controller
loadBalancerSourceRanges:
[]
```
```yaml
# Source: pinot/templates/broker/service-external.yaml
apiVersion: v1
kind: Service
metadata:
name: pinot-broker-external
annotations:
{}
labels:
helm.sh/chart: pinot-0.2.6-SNAPSHOT
app: pinot
release: pinot
app.kubernetes.io/version: "0.2.6-SNAPSHOT"
app.kubernetes.io/managed-by: Helm
heritage: Helm
component: broker
spec:
type: LoadBalancer
ports:
- name: external-broker
port: 8099
selector:
app: pinot
release: pinot
component: broker
loadBalancerSourceRanges:
[]
```
## Test 2: Non-empty list
```yaml
# values.yaml
loadBalancerSourceRanges:
- 127.0.0.1/32
- 123.4.5.6/24
```
```yaml
# Source: pinot/templates/controller/service-external.yaml
apiVersion: v1
kind: Service
metadata:
name: pinot-controller-external
annotations:
{}
labels:
helm.sh/chart: pinot-0.2.6-SNAPSHOT
app: pinot
release: pinot
app.kubernetes.io/version: "0.2.6-SNAPSHOT"
app.kubernetes.io/managed-by: Helm
heritage: Helm
component: controller
spec:
type: LoadBalancer
ports:
- name: external-controller
port: 9000
selector:
app: pinot
release: pinot
component: controller
loadBalancerSourceRanges:
- 127.0.0.1/32
- 123.4.5.6/24
```
```yaml
# Source: pinot/templates/broker/service-external.yaml
apiVersion: v1
kind: Service
metadata:
name: pinot-broker-external
annotations:
{}
labels:
helm.sh/chart: pinot-0.2.6-SNAPSHOT
app: pinot
release: pinot
app.kubernetes.io/version: "0.2.6-SNAPSHOT"
app.kubernetes.io/managed-by: Helm
heritage: Helm
component: broker
spec:
type: LoadBalancer
ports:
- name: external-broker
port: 8099
selector:
app: pinot
release: pinot
component: broker
loadBalancerSourceRanges:
- 127.0.0.1/32
- 123.4.5.6/24
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] jameskelleher commented on a diff in pull request #9494: [feature] [kubernetes] add loadBalancerSourceRanges to service-external.yaml for controller and broker
Posted by GitBox <gi...@apache.org>.
jameskelleher commented on code in PR #9494:
URL: https://github.com/apache/pinot/pull/9494#discussion_r995572406
##########
kubernetes/helm/pinot/templates/broker/service-external.yaml:
##########
@@ -34,4 +34,6 @@ spec:
port: {{ .Values.broker.external.port }}
selector:
{{- include "pinot.brokerMatchLabels" . | nindent 4 }}
+ loadBalancerSourceRanges:
+{{ toYaml .Values.broker.service.loadBalancerSourceRanges | indent 4 }}
Review Comment:
@walterddr good catch, the dry run failed. I made an update that maintains the same behavior for the previous two tests, as well as handles the case you provided (`loadBalancerSourceRanges` will not be in the result template if not provided as a value)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] Jackie-Jiang commented on pull request #9494: [feature] [kubernetes] add loadBalancerSourceRanges to service-external.yaml for controller and broker
Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on PR #9494:
URL: https://github.com/apache/pinot/pull/9494#issuecomment-1264509898
cc @xiangfu0 to take a look
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] walterddr commented on a diff in pull request #9494: [feature] [kubernetes] add loadBalancerSourceRanges to service-external.yaml for controller and broker
Posted by GitBox <gi...@apache.org>.
walterddr commented on code in PR #9494:
URL: https://github.com/apache/pinot/pull/9494#discussion_r996172238
##########
kubernetes/helm/pinot/templates/broker/service-external.yaml:
##########
@@ -34,4 +34,6 @@ spec:
port: {{ .Values.broker.external.port }}
selector:
{{- include "pinot.brokerMatchLabels" . | nindent 4 }}
+ loadBalancerSourceRanges:
+{{ toYaml .Values.broker.service.loadBalancerSourceRanges | indent 4 }}
Review Comment:
curious, is setting this config to empty list behave exactly the same as not setting this flag at all?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] walterddr merged pull request #9494: [feature] [kubernetes] add loadBalancerSourceRanges to service-external.yaml for controller and broker
Posted by GitBox <gi...@apache.org>.
walterddr merged PR #9494:
URL: https://github.com/apache/pinot/pull/9494
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] walterddr commented on a diff in pull request #9494: [feature] [kubernetes] add loadBalancerSourceRanges to service-external.yaml for controller and broker
Posted by GitBox <gi...@apache.org>.
walterddr commented on code in PR #9494:
URL: https://github.com/apache/pinot/pull/9494#discussion_r995140089
##########
kubernetes/helm/pinot/templates/broker/service-external.yaml:
##########
@@ -34,4 +34,6 @@ spec:
port: {{ .Values.broker.external.port }}
selector:
{{- include "pinot.brokerMatchLabels" . | nindent 4 }}
+ loadBalancerSourceRanges:
+{{ toYaml .Values.broker.service.loadBalancerSourceRanges | indent 4 }}
Review Comment:
can you also test values missing `loadBalancerSourceRanges` configuration all together and see if this will default to empty list `[]`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] jameskelleher commented on a diff in pull request #9494: [feature] [kubernetes] add loadBalancerSourceRanges to service-external.yaml for controller and broker
Posted by GitBox <gi...@apache.org>.
jameskelleher commented on code in PR #9494:
URL: https://github.com/apache/pinot/pull/9494#discussion_r998250809
##########
kubernetes/helm/pinot/templates/broker/service-external.yaml:
##########
@@ -34,4 +34,6 @@ spec:
port: {{ .Values.broker.external.port }}
selector:
{{- include "pinot.brokerMatchLabels" . | nindent 4 }}
+ loadBalancerSourceRanges:
+{{ toYaml .Values.broker.service.loadBalancerSourceRanges | indent 4 }}
Review Comment:
@walterddr hmmm I assume that it would be, since it doesn't make any sense to have a load balancer without any allowed sources
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org