Skip to content
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.

Adding protocols to port names #97

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions chronograf/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ spec:
{{- end }}
ports:
- containerPort: 8888
name: api
name: http-api
livenessProbe:
httpGet:
path: /ping
port: api
port: http-api
readinessProbe:
httpGet:
path: /ping
port: api
port: http-api
volumeMounts:
- name: data
mountPath: /var/lib/chronograf
Expand Down
1 change: 1 addition & 0 deletions chronograf/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ spec:
ports:
- port: 80
targetPort: 8888
name: http-api
selector:
app: {{ template "fullname" . }}
4 changes: 4 additions & 0 deletions influxdb/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{- define "apiPortName" -}}
{{- if .Values.config.http.https_enabled -}}https-api{{- else -}}http-api{{- end -}}
{{- end -}}
13 changes: 7 additions & 6 deletions influxdb/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,35 @@ spec:
resources:
{{ toYaml .Values.resources | indent 10 }}
ports:
- name: api
- name: {{ template "apiPortName" . }}
containerPort: {{ .Values.config.http.bind_address }}
{{- if .Values.config.graphite.enabled }}
- name: graphite
- name: tcp-graphite
containerPort: {{ .Values.config.graphite.bind_address }}
{{- end }}
{{- if .Values.config.collectd.enabled }}
- name: collectd
- name: tcp-collectd
containerPort: {{ .Values.config.collectd.bind_address }}
{{- end }}
{{- if .Values.config.udp.enabled }}
- name: udp
containerPort: {{ .Values.config.udp.bind_address }}
protocol: UDP
{{- end }}
{{- if .Values.config.opentsdb.enabled }}
- name: opentsdb
- name: tcp-opentsdb
containerPort: {{ .Values.config.opentsdb.bind_address }}
{{- end }}
livenessProbe:
httpGet:
path: /ping
port: api
port: {{ template "apiPortName" . }}
initialDelaySeconds: 30
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /ping
port: api
port: {{ template "apiPortName" . }}
initialDelaySeconds: 5
timeoutSeconds: 1
volumeMounts:
Expand Down
11 changes: 6 additions & 5 deletions influxdb/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,33 @@ spec:
type: {{ .Values.service.type }}
ports:
{{- if .Values.config.http.enabled }}
- name: api
- name: {{ template "apiPortName" . }}
port: {{ .Values.config.http.bind_address }}
targetPort: {{ .Values.config.http.bind_address }}
{{- end }}
{{- if .Values.config.graphite.enabled }}
- name: graphite
- name: tcp-graphite
port: {{ .Values.config.graphite.bind_address }}
targetPort: {{ .Values.config.graphite.bind_address }}
{{- end }}
{{- if .Values.config.collectd.enabled }}
- name: collectd
- name: tcp-collectd
port: {{ .Values.config.collectd.bind_address }}
targetPort: {{ .Values.config.collectd.bind_address }}
{{- end }}
{{- if .Values.config.udp.enabled }}
- name: udp
port: {{ .Values.config.udp.bind_address }}
targetPort: {{ .Values.config.udp.bind_address }}

{{- end }}
{{- if .Values.config.opentsdb.enabled }}
- name: opentsdb
- name: tcp-opentsdb
port: {{ .Values.config.opentsdb.bind_address }}
targetPort: {{ .Values.config.opentsdb.bind_address }}
{{- end }}
{{- if .Values.config.rpc.enabled }}
- name: rpc
- name: http-rpc
port: {{ .Values.config.rpc.bind_address }}
targetPort: {{ .Values.config.rpc.bind_address }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion kapacitor/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ spec:
ports:
- port: 9092
targetPort: 9092
name: api
name: http-api
selector:
app: {{ template "fullname" . }}