Skip to content

Commit

Permalink
open nodePort on host with port 10050/10051 (#18)
Browse files Browse the repository at this point in the history
* add hostport on StatefulSet

* add docu, bump chart version, make nodePort configurable

Signed-off-by: Thomas Grünert <public@gruenert.de>

* adapt circle ci (WIP)

* fix pr according to comments

Co-authored-by: Thomas Grünert <public@gruenert.de>
  • Loading branch information
tgruenert and Thomas Grünert authored Feb 19, 2021
1 parent 28d172b commit 77e5de2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The server performs the polling and trapping of data, it calculates triggers, se

**Zabbix web** interface is a part of Zabbix software. It is used to manage resources under monitoring and view monitoring statistics.

## Zabbix Proxy
## Zabbix Proxy

> **Zabbix proxy** is not functional in this helm chart, yet.
Expand Down Expand Up @@ -121,7 +121,7 @@ helm delete zabbix -n monitoring

# How to access Zabbix

After deploying the chart in your cluster, you can use the following command to access the zabbix frontend service:
After deploying the chart in your cluster, you can use the following command to access the zabbix frontend service:

View informations of ``zabbix`` services.

Expand Down Expand Up @@ -176,6 +176,8 @@ The following tables lists the configurable parameters of the chart and their de
| zabbixServer.POSTGRES_DB | string | `"zabbix"` | Name of database |
| zabbixServer.POSTGRES_PASSWORD | string | `"zabbix_pwd"` | Password of database |
| zabbixServer.POSTGRES_USER | string | `"zabbix"` | User of database |
| zabbixServer.hostIP | string | `"0.0.0.0"` | optional set hostIP different from 0.0.0.0 to open port only on this IP |
| zabbixServer.hostPort | bool | `false` | optional set true open a port direct on node where zabbix server runs |
| zabbixServer.image.pullPolicy | string | `"IfNotPresent"` | Pull policy of Docker image |
| zabbixServer.image.pullSecrets | list | `[]` | List of dockerconfig secrets names to use when pulling images |
| zabbixServer.image.repository | string | `"zabbix/zabbix-server-pgsql"` | Zabbix server Docker image name |
Expand Down
12 changes: 12 additions & 0 deletions templates/StatefulSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,20 @@ spec:
ports:
- containerPort: 10051
name: zabbix-trapper
{{- if (default false .Values.zabbixServer.hostPort) }}
hostPort: 10051
{{- end }}
{{- if ne "0.0.0.0" .Values.zabbixServer.hostIP }}
hostIP: {{ .Values.zabbixServer.hostIP }}
{{- end}}
- containerPort: 10052
name: zabbix-jmx
{{- if (default false .Values.zabbixServer.hostPort) }}
hostPort: 10052
{{- end }}
{{- if ne "0.0.0.0" .Values.zabbixServer.hostIP }}
hostIP: {{ .Values.zabbixServer.hostIP }}
{{- end}}
env:
- name: DB_SERVER_HOST
value: {{ .Values.zabbixServer.DB_SERVER_HOST }}
Expand Down
4 changes: 4 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
zabbixServer:
# -- Number of replicas of ``zabbixServer`` module
replicaCount: 1
# zabbixServer.hostPort -- optional set true open a port direct on node where zabbix server runs
hostPort: false
# zabbixServer.hostIP -- optional set hostIP different from 0.0.0.0 to open port only on this IP
hostIP: 0.0.0.0
image:
# -- Zabbix server Docker image name
repository: zabbix/zabbix-server-pgsql
Expand Down

0 comments on commit 77e5de2

Please sign in to comment.