Fluentd: Change elasticsearch endpoint port and creds reference

Updates the fluent-logging chart to reference the elasticsearch
endpoint via lookups on the `http` port to match the elasticsearch
chart's handling of the client port.  This also updates the helm
test pod to reference the elasticsearch credentials via the
secret used elsewhere in the fluent-logging chart

Change-Id: I352d912db5e231e14dc58cdf897ae642f3256373
This commit is contained in:
Steve Wilkerson 2018-03-12 20:38:45 -05:00
parent 33cb0e8433
commit f28ef6ded2
4 changed files with 13 additions and 8 deletions

View File

@ -120,7 +120,7 @@ spec:
- name: ELASTICSEARCH_HOST - name: ELASTICSEARCH_HOST
value: {{ tuple "elasticsearch" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" | quote }} value: {{ tuple "elasticsearch" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" | quote }}
- name: ELASTICSEARCH_PORT - name: ELASTICSEARCH_PORT
value: {{ tuple "elasticsearch" "internal" "client" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }} value: {{ tuple "elasticsearch" "internal" "http" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }}
- name: ELASTICSEARCH_USERNAME - name: ELASTICSEARCH_USERNAME
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:

View File

@ -16,6 +16,7 @@ limitations under the License.
{{- if .Values.manifests.job_elasticsearch_template }} {{- if .Values.manifests.job_elasticsearch_template }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $esUserSecret := .Values.secrets.elasticsearch.user }}
{{- $dependencies := .Values.dependencies.static.elasticsearch_template }} {{- $dependencies := .Values.dependencies.static.elasticsearch_template }}
{{- $mounts_elasticsearch_template := .Values.pod.mounts.elasticsearch_template.elasticsearch_template }} {{- $mounts_elasticsearch_template := .Values.pod.mounts.elasticsearch_template.elasticsearch_template }}
{{- $mounts_elasticsearch_template_init := .Values.pod.mounts.elasticsearch_template.init_container }} {{- $mounts_elasticsearch_template_init := .Values.pod.mounts.elasticsearch_template.init_container }}
@ -44,11 +45,17 @@ spec:
- name: ELASTICSEARCH_HOST - name: ELASTICSEARCH_HOST
value: {{ tuple "elasticsearch" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" | quote }} value: {{ tuple "elasticsearch" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" | quote }}
- name: ELASTICSEARCH_PORT - name: ELASTICSEARCH_PORT
value: {{ tuple "elasticsearch" "internal" "client" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }} value: {{ tuple "elasticsearch" "internal" "http" . | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }}
- name: ELASTICSEARCH_USERNAME - name: ELASTICSEARCH_USERNAME
value: {{ .Values.endpoints.elasticsearch.auth.admin.username }} valueFrom:
secretKeyRef:
name: {{ $esUserSecret }}
key: ELASTICSEARCH_USERNAME
- name: ELASTICSEARCH_PASSWORD - name: ELASTICSEARCH_PASSWORD
value: {{ .Values.endpoints.elasticsearch.auth.admin.password }} valueFrom:
secretKeyRef:
name: {{ $esUserSecret }}
key: ELASTICSEARCH_PASSWORD
command: command:
- /tmp/create_template.sh - /tmp/create_template.sh
volumeMounts: volumeMounts:

View File

@ -43,7 +43,7 @@ spec:
name: {{ $esUserSecret }} name: {{ $esUserSecret }}
key: ELASTICSEARCH_PASSWORD key: ELASTICSEARCH_PASSWORD
- name: ELASTICSEARCH_ENDPOINT - name: ELASTICSEARCH_ENDPOINT
value: {{ tuple "elasticsearch" "internal" "client" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }} value: {{ tuple "elasticsearch" "internal" "http" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
volumeMounts: volumeMounts:
- name: fluent-logging-bin - name: fluent-logging-bin
mountPath: /tmp/helm-tests.sh mountPath: /tmp/helm-tests.sh

View File

@ -232,10 +232,8 @@ endpoints:
scheme: scheme:
default: http default: http
port: port:
client: http:
default: 80 default: 80
discovery:
default: 9300
kafka: kafka:
namespace: null namespace: null
name: kafka name: kafka