Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
influxdb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
influxdb
Commits
5151027d
Unverified
Commit
5151027d
authored
Jun 21, 2023
by
tomklapka
Committed by
GitHub
Jun 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: influxdb ports, ingress resource (#566)
parent
e293200e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
85 additions
and
60 deletions
+85
-60
Chart.yaml
charts/influxdb/Chart.yaml
+1
-1
README.md
charts/influxdb/README.md
+0
-0
NOTES.txt
charts/influxdb/templates/NOTES.txt
+3
-3
_helpers.tpl
charts/influxdb/templates/_helpers.tpl
+27
-2
backup-cronjob.yaml
charts/influxdb/templates/backup-cronjob.yaml
+1
-1
configmap.yaml
charts/influxdb/templates/configmap.yaml
+2
-2
ingress.yaml
charts/influxdb/templates/ingress.yaml
+20
-25
meta-configmap.yaml
charts/influxdb/templates/meta-configmap.yaml
+2
-2
meta-service.yaml
charts/influxdb/templates/meta-service.yaml
+1
-1
meta-statefulset.yaml
charts/influxdb/templates/meta-statefulset.yaml
+3
-3
service.yaml
charts/influxdb/templates/service.yaml
+6
-6
statefulset.yaml
charts/influxdb/templates/statefulset.yaml
+9
-7
values.yaml
charts/influxdb/values.yaml
+10
-7
No files found.
charts/influxdb/Chart.yaml
View file @
5151027d
apiVersion
:
v1
name
:
influxdb
version
:
4.12.
1
version
:
4.12.
2
appVersion
:
1.8.10
description
:
Scalable datastore for metrics, events, and real-time analytics.
keywords
:
...
...
charts/influxdb/README.md
View file @
5151027d
This diff is collapsed.
Click to expand it.
charts/influxdb/templates/NOTES.txt
View file @
5151027d
InfluxDB can be accessed via port {{
.Values.config.http.bind_address | default 8086
}} on the following DNS name from within your cluster:
InfluxDB can be accessed via port {{
include "influxdb.httpPortNumber" .
}} on the following DNS name from within your cluster:
http://{{ include "influxdb.fullname" . }}.{{ .Release.Namespace }}:{{
.Values.config.http.bind_address | default 8086
}}
http://{{ include "influxdb.fullname" . }}.{{ .Release.Namespace }}:{{
include "influxdb.httpPortNumber" .
}}
You can connect to the remote instance with the influx CLI. To forward the API port to localhost:8086, run the following:
kubectl port-forward --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ include "influxdb.fullname" . }} -o jsonpath='{ .items[0].metadata.name }') 8086:{{
.Values.config.http.bind_address | default 8086
}}
kubectl port-forward --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ include "influxdb.fullname" . }} -o jsonpath='{ .items[0].metadata.name }') 8086:{{
include "influxdb.httpPortNumber" .
}}
You can also connect to the influx CLI from inside the container. To open a shell session in the InfluxDB pod, run the following:
...
...
charts/influxdb/templates/_helpers.tpl
View file @
5151027d
...
...
@@ -56,8 +56,33 @@ Create the name of the service account to use
*/
}
}
{{- define "influxdb.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "influxdb.fullname" .) .Values.serviceAccount.name }}
{{ default (include "influxdb.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
{
{
/*
Define
ports
for
kubernetes
.
*/
}
}
{{- define "influxdb.rpcPortNumber" -}}
{{ default 8088 (regexReplaceAll ":([0-9]+)" (index .Values "config" "rpc" "bind-address") "$
{
1
}
") }}
{{- end -}}
{{- define "influxdb.metaPortNumber" -}}
{{ default 8091 (regexReplaceAll ":([0-9]+)" (index .Values "config" "meta" "bind-address") "$
{
1
}
") }}
{{- end -}}
{{- define "influxdb.httpPortNumber" -}}
{{ default 8086 (regexReplaceAll ":([0-9]+)" (index .Values "config" "http" "bind-address") "$
{
1
}
") }}
{{- end -}}
{{- define "influxdb.graphitePortNumber" -}}
{{ default 2003 (regexReplaceAll ":([0-9]+)" (index .Values "config" "graphite" "bind-address") "$
{
1
}
") }}
{{- end -}}
{{- define "influxdb.collectdPortNumber" -}}
{{ default 25826 (regexReplaceAll ":([0-9]+)" (index .Values "config" "collectd" "bind-address") "$
{
1
}
") }}
{{- end -}}
{{- define "influxdb.opentsdbPortNumber" -}}
{{ default 4242 (regexReplaceAll ":([0-9]+)" (index .Values "config" "opentsdb" "bind-address") "$
{
1
}
") }}
{{- end -}}
{{- define "influxdb.udpPortNumber" -}}
{{ default 8089 (regexReplaceAll ":([0-9]+)" (index .Values "config" "udp" "bind-address") "$
{
1
}
") }}
{{- end -}}
charts/influxdb/templates/backup-cronjob.yaml
View file @
5151027d
...
...
@@ -67,7 +67,7 @@ spec:
-
'
-c'
-
|
influxd backup \
-host {{ include "influxdb.fullname" . }}.{{ .Release.Namespace }}.svc:{{
.Values.config.rpc.bind_address | default 8088
}} \
-host {{ include "influxdb.fullname" . }}.{{ .Release.Namespace }}.svc:{{
include "influxdb.rpcPortNumber" .
}} \
-portable /backup/"$(date +%Y%m%d%H%M%S)"
resources
:
{{
- toYaml .Values.backup.resources | nindent 14
}}
...
...
charts/influxdb/templates/configmap.yaml
View file @
5151027d
...
...
@@ -6,8 +6,8 @@ metadata:
{{
- include "influxdb.labels" . | nindent 4
}}
data
:
influxdb.conf
:
|+
reporting-disabled = {{ .Values.config.reporting_disabled
| default false
}}
bind-address = "
:{{ .Values.config.rpc.bind_address | default 8088
}}"
reporting-disabled = {{ .Values.config.reporting_disabled }}
bind-address = "
{{ index .Values "config" "rpc" "bind-address"| default (printf ":%s" (include "influxdb.rpcPortNumber" . ))
}}"
[meta]
dir = "/var/lib/influxdb/meta"
...
...
charts/influxdb/templates/ingress.yaml
View file @
5151027d
{{
- if .Values.ingress.enabled -
}}
{{
- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress"
}}
{{
- if .Values.ingress.enabled
}}
apiVersion
:
networking.k8s.io/v1
{{
- else
}}
apiVersion
:
networking.k8s.io/v1beta1
{{
- end
}}
kind
:
Ingress
metadata
:
name
:
{{
include "influxdb.fullname" .
}}
labels
:
{{
- include "influxdb.labels" . | nindent 4
}}
{{
- if .Values.ingress.annotations
}}
annotations
:
{{
toYaml .Values.ingress.annotations | indent 4
}}
{{
toYaml .Values.ingress.annotations | indent 4
}}
{{
- end
}}
spec
:
{{
- if .Values.ingress.tls
}}
tls
:
-
hosts
:
-
{{
.Values.ingress.hostname | quote
}}
-
{{
.Values.ingress.hostname | quote
}}
secretName
:
{{
.Values.ingress.secretName
}}
{{
- end
}}
{{
- if .Values.ingress.className
}}
ingressClassName
:
{{
.Values.ingress.className
}}
{{
- end
}}
rules
:
-
host
:
{{
.Values.ingress.hostname
}}
http
:
paths
:
-
path
:
{{
.Values.ingress.path
}}
{{
- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress"
}}
pathType
:
Prefix
{{
- end
}}
backend
:
{{
- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress"
}}
service
:
name
:
{{
include "influxdb.fullname" .
}}
port
:
number
:
8086
{{
- else
}}
serviceName
:
{{
include "influxdb.fullname" .
}}
servicePort
:
8086
{{
- end
}}
{{
- end -
}}
{{
- if .Values.ingress.hostname
}}
-
host
:
{{
.Values.ingress.hostname
}}
http
:
{{
- else
}}
-
http
:
{{
- end
}}
paths
:
-
path
:
{{
.Values.ingress.path
}}
pathType
:
Prefix
backend
:
service
:
name
:
{{
include "influxdb.fullname" .
}}
port
:
number
:
{{
include "influxdb.httpPortNumber" .
}}
{{
- end
}}
charts/influxdb/templates/meta-configmap.yaml
View file @
5151027d
...
...
@@ -8,8 +8,8 @@ metadata:
app.kubernetes.io/component
:
meta
data
:
influxdb-meta.conf
:
|+
reporting-disabled = {{ .Values.config.reporting_disabled
| default false
}}
bind-address = "
:{{ .Values.config.meta.bind_address | default 8091
}}"
reporting-disabled = {{ .Values.config.reporting_disabled }}
bind-address = "
{{ index .Values "config" "meta" "bind-address" | default (printf ":%s" (include "influxdb.metaPortNumber" .))
}}"
[enterprise]
license-key = {{ .Values.enterprise.licensekey | quote }}
...
...
charts/influxdb/templates/meta-service.yaml
View file @
5151027d
...
...
@@ -17,7 +17,7 @@ spec:
publishNotReadyAddresses
:
true
ports
:
-
name
:
meta
port
:
{{
.Values.config.meta.bind_address | default 8091
}}
port
:
{{
include "influxdb.metaPortNumber" .
}}
targetPort
:
meta
selector
:
{{
- include "influxdb.selectorLabels" . | nindent 4
}}
...
...
charts/influxdb/templates/meta-statefulset.yaml
View file @
5151027d
...
...
@@ -38,11 +38,11 @@ spec:
{{
toYaml .Values.enterprise.meta.resources | indent 10
}}
ports
:
-
name
:
udp
containerPort
:
{{
.Values.config.udp.bind_address | default 8089
}}
containerPort
:
{{
include "influxdb.udpPortNumber" .
}}
-
name
:
rpc
containerPort
:
{{
.Values.config.rpc.bind_address | default 8088
}}
containerPort
:
{{
include "influxdb.rpcPortNumber" .
}}
-
name
:
meta
containerPort
:
{{
.Values.config.meta.bind_address | default 8091
}}
containerPort
:
{{
include "influxdb.metaPortNumber" .
}}
{{
- if .Values.env
}}
env
:
{{
toYaml .Values.env | indent 10
}}
...
...
charts/influxdb/templates/service.yaml
View file @
5151027d
...
...
@@ -12,34 +12,34 @@ spec:
type
:
{{
.Values.service.type
}}
ports
:
-
name
:
api
port
:
{{
.Values.config.http.bind_address | default 8086
}}
port
:
{{
include "influxdb.httpPortNumber" .
}}
targetPort
:
api
{{
- if (and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.http)))
}}
nodePort
:
{{
.Values.service.nodePorts.http | int
}}
{{
- end
}}
-
name
:
rpc
port
:
{{
.Values.config.rpc.bind_address | default 8088
}}
port
:
{{
include "influxdb.rpcPortNumber" .
}}
targetPort
:
rpc
{{
- if .Values.config.graphite.enabled
}}
-
name
:
graphite
port
:
{{
.Values.config.graphite.bind_address | default 2003
}}
port
:
{{
include "influxdb.graphitePortNumber" .
}}
targetPort
:
graphite
{{
- end
}}
{{
- if .Values.config.collectd.enabled
}}
-
name
:
collectd
port
:
{{
.Values.config.collectd.bind_address | default 25826
}}
port
:
{{
include "influxdb.collectdPortNumber" .
}}
protocol
:
UDP
targetPort
:
collectd
{{
- end
}}
{{
- if .Values.config.udp.enabled
}}
-
name
:
udp
port
:
{{
.Values.config.udp.bind_address | default 8089
}}
port
:
{{
include "influxdb.udpPortNumber" .
}}
protocol
:
UDP
targetPort
:
udp
{{
- end
}}
{{
- if .Values.config.opentsdb.enabled
}}
-
name
:
opentsdb
port
:
{{
.Values.config.opentsdb.bind_address | default 4242
}}
port
:
{{
include "influxdb.opentsdbPortNumber" .
}}
targetPort
:
opentsdb
{{
- end
}}
selector
:
...
...
charts/influxdb/templates/statefulset.yaml
View file @
5151027d
...
...
@@ -62,30 +62,30 @@ spec:
{{
- end
}}
ports
:
-
name
:
api
containerPort
:
{{
.Values.config.http.bind_address | default 8086
}}
containerPort
:
{{
include "influxdb.httpPortNumber" .
}}
{{
- if .Values.config.graphite.enabled
}}
-
name
:
graphite
containerPort
:
{{
.Values.config.graphite.bind_address | default 2003
}}
containerPort
:
{{
include "influxdb.graphitePortNumber" .
}}
{{
- end
}}
{{
- if .Values.config.collectd.enabled
}}
-
name
:
collectd
containerPort
:
{{
.Values.config.collectd.bind_address | default 25826
}}
containerPort
:
{{
include "influxdb.collectdPortNumber" .
}}
protocol
:
UDP
{{
- end
}}
{{
- if .Values.config.udp.enabled
}}
-
name
:
udp
containerPort
:
{{
.Values.config.udp.bind_address | default 8089
}}
containerPort
:
{{
include "influxdb.udpPortNumber" .
}}
protocol
:
UDP
{{
- end
}}
{{
- if .Values.config.opentsdb.enabled
}}
-
name
:
opentsdb
containerPort
:
{{
.Values.config.opentsdb.bind_address | default 4242
}}
containerPort
:
{{
include "influxdb.opentsdbPortNumber" .
}}
{{
- end
}}
-
name
:
rpc
containerPort
:
{{
.Values.config.rpc.bind_address | default 8088
}}
containerPort
:
{{
include "influxdb.rpcPortNumber" .
}}
{{
- if .Values.enterprise.enabled
}}
-
name
:
meta
containerPort
:
{{
.Values.config.meta.bind_address | default 8091
}}
containerPort
:
{{
include "influxdb.metaPortNumber" .
}}
{{
- end
}}
{{
- if or .Values.env .Values.setDefaultUser.enabled
}}
env
:
...
...
@@ -187,10 +187,12 @@ spec:
volumeClaimTemplates
:
-
metadata
:
name
:
{{
include "influxdb.fullname" .
}}
-data
{{
- if .Values.persistence.annotations
}}
annotations
:
{{
- range $key
,
$value
:
= .Values.persistence.annotations
}}
{{
$key
}}:
"
{{
$value
}}"
{{
- end
}}
{{
- end
}}
spec
:
accessModes
:
-
{{
.Values.persistence.accessMode | quote
}}
...
...
charts/influxdb/values.yaml
View file @
5151027d
...
...
@@ -71,7 +71,7 @@ persistence:
## GKE, AWS & OpenStack)
##
# storageClass: "-"
annotations
:
annotations
:
{}
accessMode
:
ReadWriteOnce
size
:
8Gi
...
...
@@ -140,11 +140,10 @@ ingress:
enabled
:
false
tls
:
false
# secretName: my-tls-cert # only needed if tls above is true
hostname
:
influxdb.foobar.com
className
:
n
ull
hostname
:
"
"
className
:
n
ginx
annotations
:
{}
# kubernetes.io/ingress.class: "nginx"
# kubernetes.io/tls-acme: "true"
# nginx.ingress.kubernetes.io/rewrite-target: $1
path
:
/
...
...
@@ -204,14 +203,18 @@ envFromSecret: {}
## ref: https://docs.influxdata.com/influxdb/v1.8/administration/config
config
:
reporting_disabled
:
false
rpc
:
{}
rpc
:
bind-address
:
"
:8088"
meta
:
{}
data
:
{}
coordinator
:
{}
retention
:
{}
shard_precreation
:
{}
monitor
:
{}
http
:
{}
http
:
enabled
:
true
bind-address
:
"
:8086"
flux-enabled
:
true
logging
:
{}
subscriber
:
{}
graphite
:
{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment