From 7bae594a38d602b456a25d2443015381260b4bbc Mon Sep 17 00:00:00 2001 From: Kali Norby Date: Wed, 15 May 2019 17:10:36 -0700 Subject: [PATCH 1/5] Renaming ports to include port type for istio --- influxdb/templates/_helpers.tpl | 4 ++++ influxdb/templates/deployment.yaml | 13 +++++++------ influxdb/templates/service.yaml | 11 ++++++----- 3 files changed, 17 insertions(+), 11 deletions(-) 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 }} From 269dfae6739c11f827bc4a5a203e065bf8770ce0 Mon Sep 17 00:00:00 2001 From: Kali Norby Date: Thu, 16 May 2019 10:27:51 -0700 Subject: [PATCH 2/5] Modifying kapacitor api port name as well --- kapacitor/templates/_helpers.tpl | 4 ++++ kapacitor/templates/service.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/kapacitor/templates/_helpers.tpl b/kapacitor/templates/_helpers.tpl index f0d83d2..61c82e9 100644 --- a/kapacitor/templates/_helpers.tpl +++ b/kapacitor/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 -}} diff --git a/kapacitor/templates/service.yaml b/kapacitor/templates/service.yaml index d5012e4..409250d 100644 --- a/kapacitor/templates/service.yaml +++ b/kapacitor/templates/service.yaml @@ -12,6 +12,6 @@ spec: ports: - port: 9092 targetPort: 9092 - name: api + name: {{ template "apiPortName" . }} selector: app: {{ template "fullname" . }} From b18561eec278474fa98daefd7c2478c8c2c0958b Mon Sep 17 00:00:00 2001 From: Kali Norby Date: Thu, 16 May 2019 10:45:17 -0700 Subject: [PATCH 3/5] Removing port name switch --- kapacitor/templates/_helpers.tpl | 4 ---- kapacitor/templates/service.yaml | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/kapacitor/templates/_helpers.tpl b/kapacitor/templates/_helpers.tpl index 61c82e9..f0d83d2 100644 --- a/kapacitor/templates/_helpers.tpl +++ b/kapacitor/templates/_helpers.tpl @@ -14,7 +14,3 @@ 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 -}} diff --git a/kapacitor/templates/service.yaml b/kapacitor/templates/service.yaml index 409250d..819cee5 100644 --- a/kapacitor/templates/service.yaml +++ b/kapacitor/templates/service.yaml @@ -12,6 +12,6 @@ spec: ports: - port: 9092 targetPort: 9092 - name: {{ template "apiPortName" . }} + name: http-api selector: app: {{ template "fullname" . }} From d058d7fb07e5ecb6c9347c3538fd6bef84e5f897 Mon Sep 17 00:00:00 2001 From: Kali Norby Date: Thu, 16 May 2019 15:38:24 -0700 Subject: [PATCH 4/5] Changing chronograf port name as well --- chronograf/templates/deployment.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 From 352b5b6508c31feb86a1be17a731cd3f5dc24a17 Mon Sep 17 00:00:00 2001 From: Kali Norby Date: Thu, 16 May 2019 15:50:39 -0700 Subject: [PATCH 5/5] placing port name on chronograf service as well --- chronograf/templates/service.yaml | 1 + 1 file changed, 1 insertion(+) 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" . }}