Skip to content

Commit

Permalink
Merge pull request #190 from garrettprimm/master
Browse files Browse the repository at this point in the history
Add enable option to the service configuration.
  • Loading branch information
a-klebanov authored Jul 30, 2024
2 parents 636de9c + b7cb8c4 commit 2b11901
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions helm-chart-sources/logstream-workergroup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ This section covers the most likely values to override. To see the full scope of
|config.probes|true|enables (true) or disables (false) the liveness and readiness probes.|
|config.livenessProbe|see `values.yaml`|[livenessProbe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-http-request) configuration|
|config.readinessProbe|see `values.yaml`|[readinessProbe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes) configuration|
|service.enable|true|Enable creating Service resources. This is only applicable for logstream-workergroup deployments.|
|service.type|LoadBalancer|The type of service to create for the workergroup|
|service.loadBalancerIP|none (IP Address)|The IP address to use for the load balancer service interface, if the type is set to LoadBalancer. Check with your Kubernetes setup to see if this is supported. |
|service.ports|<pre>- name: tcpjson<br> port: 10001<br> protocol: TCP<br>- name: s2s<br> port: 9997<br> protocol: TCP<br>- name: http<br> port: 10080<br> protocol: TCP<br>- name: https<br> port: 10081<br> protocol: TCP<br>- name: syslog<br> port: 5140<br> protocol: TCP<br>- name: metrics<br> port: 8125<br> protocol: TCP<br>- name: elastic<br> port: 9200<br> protocol: TCP<br>- name: hec<br> port: 8088<br> protocol: TCP <br>- name: criblhttp<br> port: 10200<br> protocol: TCP<br>- name: cribltcp<br> port: 10300<br> protocol: TCP</pre>|The ports to make available both in the Deployment and the Service. Each "map" in the list needs the following values set: <dl><dt>name</dt><dd>A descriptive name of what the port is being used for.</dd><dt>port</dt><dd>The port to make available.</dd><dt>protocol</dt><dd>The protocol in use for this port (UDP/TCP).</dd></dl>|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.service.enable }}
apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -30,3 +31,4 @@ spec:
{{- if .Values.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges: {{- toYaml .Values.service.loadBalancerSourceRanges | nindent 4 }}
{{- end -}}
{{- end }}
14 changes: 14 additions & 0 deletions helm-chart-sources/logstream-workergroup/tests/service_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,17 @@ tests:
- equal:
path: spec.ports[0].nodePort
value: 30000

- it: Should configure the service by default if enable is not set
asserts:
- hasDocuments:
count: 1

- it: Should not configure the service when service.enable is set to false
set:
service:
enable: false
asserts:
- hasDocuments:
count: 0

1 change: 1 addition & 0 deletions helm-chart-sources/logstream-workergroup/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ nodeSelector: {}
# topologySpreadConstraints: []

service:
enable: true
type: LoadBalancer
annotations: {}
# externalTrafficPolicy: Local
Expand Down

0 comments on commit 2b11901

Please sign in to comment.