Commit 19ad8acd authored by Kevin Schumacher's avatar Kevin Schumacher Committed by Dhilip

[stable/kapacitor] #1785 namespace defined templates with chart name (#2137)

parent 266cea40
name: kapacitor
version: 0.3.1
description: InfluxDB's native data processing engine. It can process both stream and batch data from InfluxDB.
version: 0.4.0
description: InfluxDB's native data processing engine. It can process both stream
and batch data from InfluxDB.
keywords:
- kapacitor
- stream
......@@ -8,7 +9,7 @@ keywords:
- timeseries
home: https://www.influxdata.com/time-series-platform/kapacitor/
sources:
- https://github.com/influxdata/kapacitor
- https://github.com/influxdata/kapacitor
maintainers:
- name: Jack Zampolin
email: jack@influxdb.com
......
......@@ -2,25 +2,25 @@
{{- if not $bl }}
Kapacitor can be accessed via port 9092 on the following DNS name from within your cluster:
- http://{{ template "fullname" . }}.{{ .Release.Namespace }}:9092
- http://{{ template "kapacitor.fullname" . }}.{{ .Release.Namespace }}:9092
You can easily connect to the remote instance from a local kapacitor cli. Forward the api port to localhost:9092
- kubectl port-forward --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "fullname" . }} -o jsonpath='{ .items[0].metadata.name }') 9092:9092
- kubectl port-forward --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "kapacitor.fullname" . }} -o jsonpath='{ .items[0].metadata.name }') 9092:9092
You can also connect to the container running Kapacitor. To open a shell session in the pod run the following:
- kubectl exec -i -t --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "fullname" . }} -o jsonpath='{.items[0].metadata.name}') /bin/sh
- kubectl exec -i -t --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "kapacitor.fullname" . }} -o jsonpath='{.items[0].metadata.name}') /bin/sh
To tail the logs for the Kapacitor pod run the following:
- kubectl logs -f --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "fullname" . }} -o jsonpath='{ .items[0].metadata.name }')
- kubectl logs -f --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "kapacitor.fullname" . }} -o jsonpath='{ .items[0].metadata.name }')
{{- if eq .Values.service.type "LoadBalancer" }}
To watch for the LoadBalancer IP or Hostname to populate run the following:
- kubectl get svc -w --namespace {{ .Release.Namespace }} -l app={{ template "fullname" . }}
- kubectl get svc -w --namespace {{ .Release.Namespace }} -l app={{ template "kapacitor.fullname" . }}
{{- end }}
{{- end }}
......
......@@ -2,7 +2,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "name" -}}
{{- define "kapacitor.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
......@@ -10,7 +10,7 @@ Expand the name of the chart.
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "fullname" -}}
{{- define "kapacitor.fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
......@@ -3,18 +3,18 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ template "fullname" . }}
name: {{ template "kapacitor.fullname" . }}
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
app: {{ template "fullname" . }}
app: {{ template "kapacitor.fullname" . }}
spec:
replicas: 1
template:
metadata:
labels:
app: {{ template "fullname" . }}
app: {{ template "kapacitor.fullname" . }}
spec:
containers:
- name: {{ .Chart.Name }}
......@@ -22,7 +22,7 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: KAPACITOR_HOSTNAME
value: {{ template "fullname" . }}.{{ .Release.Namespace }}
value: {{ template "kapacitor.fullname" . }}.{{ .Release.Namespace }}
- name: KAPACITOR_INFLUXDB_0_URLS_0
value: {{ .Values.influxURL }}
{{- range $key, $val := .Values.envVars }}
......@@ -40,7 +40,7 @@ spec:
- name: data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ template "fullname" . }}
claimName: {{ template "kapacitor.fullname" . }}
{{- else }}
emptyDir: {}
{{- end }}
......
......@@ -2,12 +2,12 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "fullname" . }}
name: {{ template "kapacitor.fullname" . }}
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
app: {{ template "fullname" . }}
app: {{ template "kapacitor.fullname" . }}
spec:
accessModes:
- {{ .Values.persistence.accessMode | quote }}
......
apiVersion: v1
kind: Service
metadata:
name: {{ template "fullname" . }}
name: {{ template "kapacitor.fullname" . }}
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
app: {{ template "fullname" . }}
app: {{ template "kapacitor.fullname" . }}
spec:
type: {{ .Values.service.type }}
ports:
......@@ -14,4 +14,4 @@ spec:
targetPort: 9092
name: api
selector:
app: {{ template "fullname" . }}
app: {{ template "kapacitor.fullname" . }}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment