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

feat: Add extraPorts parameter to metadata.logs.statefulset #2924

Merged
merged 1 commit into from
Mar 13, 2023
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
1 change: 1 addition & 0 deletions .changelog/2924.added.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
feat: Add extraPorts parameter to metadata.logs.statefulset
1 change: 1 addition & 0 deletions ci/check_configuration_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
'metadata.logs.statefulset.extraEnvVars',
'metadata.logs.statefulset.extraVolumeMounts',
'metadata.logs.statefulset.extraVolumes',
'metadata.logs.statefulset.extraPorts',
'metadata.metrics.podDisruptionBudget',
'metadata.metrics.autoscaling.targetMemoryUtilizationPercentage',
'metadata.metrics.statefulset.extraEnvVars',
Expand Down
1 change: 1 addition & 0 deletions deploy/helm/sumologic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,7 @@ The following table lists the configurable parameters of the Sumo Logic chart an
| `metadata.logs.statefulset.extraEnvVars` | Additional environment variables for logs metadata enrichment (otelcol) pods. | `Nil` |
| `metadata.logs.statefulset.extraVolumes` | Additional volumes for logs metadata enrichment (otelcol) pods. | `Nil` |
| `metadata.logs.statefulset.extraVolumeMounts` | Additional volume mounts for logs metadata enrichment (otelcol) pods. | `Nil` |
| `metadata.logs.statefulset.extraPorts` | Additional exposed ports in logs metadata enrichment (otelcol) pods and service. | `Nil` |
| `metadata.logs.autoscaling.enabled` | Option to turn autoscaling on for logs metadata enrichment (otelcol) and specify params for HPA. Autoscaling needs metrics-server to access cpu metrics. | `false` |
| `metadata.logs.autoscaling.minReplicas` | Default min replicas for autoscaling. | `3` |
| `metadata.logs.autoscaling.maxReplicas` | Default max replicas for autoscaling | `10` |
Expand Down
8 changes: 8 additions & 0 deletions deploy/helm/sumologic/templates/logs/common/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,12 @@ spec:
port: 8888
targetPort: 8888
protocol: TCP
{{- if .Values.metadata.logs.statefulset.extraPorts }}
{{- range .Values.metadata.logs.statefulset.extraPorts }}
- name: {{ toYaml .name }}
port: {{ toYaml .containerPort }}
targetPort: {{ toYaml .containerPort }}
protocol: {{ toYaml .protocol }}
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ spec:
- name: pprof
containerPort: 1777
protocol: TCP
{{- if .Values.metadata.logs.statefulset.extraPorts }}
{{- toYaml .Values.metadata.logs.statefulset.extraPorts | nindent 8 }}
{{- end }}
livenessProbe:
httpGet:
path: /
Expand Down
4 changes: 4 additions & 0 deletions deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3999,6 +3999,10 @@ metadata:
# - name: es-certs
# mountPath: /certs
# readOnly: true
# extraPorts:
# - name: otlphttp2
# containerPort: 4319
# protocol: TCP
dmolenda-sumo marked this conversation as resolved.
Show resolved Hide resolved

## Option to turn autoscaling on for logs and specify params for HPA.
## Autoscaling needs metrics-server to access cpu metrics.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ metadata:
- name: es-certs
mountPath: /certs
readOnly: true
extraPorts:
- name: otlphttp2
containerPort: 4319
protocol: TCP
- name: otlphttp3
containerPort: 4320
protocol: TCP

## Option to turn autoscaling on for logs and specify params for HPA.
## Autoscaling needs metrics-server to access cpu metrics.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ spec:
- name: pprof
containerPort: 1777
protocol: TCP
- name: otlphttp2
containerPort: 4319
protocol: TCP
- name: otlphttp3
containerPort: 4320
protocol: TCP
livenessProbe:
httpGet:
path: /
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
metadata:
logs:
statefulset:
extraPorts:
- name: otlphttp2
containerPort: 4319
protocol: TCP
- name: otlphttp3
containerPort: 4320
protocol: TCP
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,14 @@ spec:
port: 8888
targetPort: 8888
protocol: TCP
- name: otlphttp2
port: 4319
targetPort: 4319
protocol: TCP
- name: otlphttp3
port: 4320
targetPort: 4320
protocol: TCP
---
# Source: sumologic/templates/metrics/common/service.yaml
apiVersion: v1
Expand Down