diff --git a/chronograf/templates/deployment.yaml b/chronograf/templates/deployment.yaml index 22e6858..adae518 100644 --- a/chronograf/templates/deployment.yaml +++ b/chronograf/templates/deployment.yaml @@ -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 diff --git a/chronograf/templates/service.yaml b/chronograf/templates/service.yaml index dcd2e7a..f207d51 100644 --- a/chronograf/templates/service.yaml +++ b/chronograf/templates/service.yaml @@ -12,5 +12,6 @@ spec: ports: - port: 80 targetPort: 8888 + name: http-api selector: app: {{ template "fullname" . }} diff --git a/influxdb/templates/_helpers.tpl b/influxdb/templates/_helpers.tpl index f0d83d2..e9a3e5a 100644 --- a/influxdb/templates/_helpers.tpl +++ b/influxdb/templates/_helpers.tpl @@ -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 -}} \ No newline at end of file diff --git a/influxdb/templates/deployment.yaml b/influxdb/templates/deployment.yaml index 803cc56..121acb5 100644 --- a/influxdb/templates/deployment.yaml +++ b/influxdb/templates/deployment.yaml @@ -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: diff --git a/influxdb/templates/service.yaml b/influxdb/templates/service.yaml index 2952d6f..75eb4ef 100644 --- a/influxdb/templates/service.yaml +++ b/influxdb/templates/service.yaml @@ -11,17 +11,17 @@ 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 }} @@ -29,14 +29,15 @@ spec: - 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 }} diff --git a/kapacitor/templates/service.yaml b/kapacitor/templates/service.yaml index d5012e4..819cee5 100644 --- a/kapacitor/templates/service.yaml +++ b/kapacitor/templates/service.yaml @@ -12,6 +12,6 @@ spec: ports: - port: 9092 targetPort: 9092 - name: api + name: http-api selector: app: {{ template "fullname" . }}