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

Add dynamic application.server config to streams app chart #214

Merged
merged 7 commits into from
Jun 12, 2024
10 changes: 5 additions & 5 deletions charts/streams-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ Alternatively, a YAML file that specifies the values for the parameters can be p

### Service

| Parameter | Description | Default |
| ----------------- | ---------------------------------------------------------------------------------------------- | ----------- |
| `service.enabled` | Whether to create a service. This requires the definition of at least one `ports.servicePort`. | `false` |
| `service.labels` | Additional service labels. | `{}` |
| `service.type` | Service type. | `ClusterIP` |
| Parameter | Description | Default |
|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|
| `service.enabled` | Whether to create a service. This requires the definition of at least one `ports.servicePort`. This also configures `application.server` for the streams app | `false` |
| `service.labels` | Additional service labels. | `{}` |
| `service.type` | Service type. | `ClusterIP` |
10 changes: 10 additions & 0 deletions charts/streams-app/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ spec:
- name: {{ printf "STREAMS_%s" $key | replace "." "_" | upper | quote }}
value: {{ $value | quote }}
{{- end }}
{{- range .Values.ports }}
{{- if .servicePort }} # TODO verify that there is at most one service port. Currently, if there are multiple service ports, the first one will be used
philipp94831 marked this conversation as resolved.
Show resolved Hide resolved
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: STREAMS_APPLICATION_SERVER
value: "$(POD_IP):{{ .containerPort }}"
{{- end }}
{{- end }}
{{- if .Values.streams.staticMembership }}
- name: STREAMS_GROUP_INSTANCE_ID
valueFrom:
Expand Down
2 changes: 1 addition & 1 deletion charts/streams-app/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ spec:
protocol: {{ .protocol }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
type: {{ .Values.service.type }}
{{- end }}
Loading