Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes aecio 02 13 2024 #68

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@
Thank you for contributing to this repository. Before you submit this PR we'd like to
make sure you are aware of our technical requirements and best practices:

* https://github.com/helm/charts/blob/master/CONTRIBUTING.md#technical-requirements
* https://github.com/helm/helm/tree/master/docs/chart_best_practices

For a quick overview across what we will look at reviewing your PR, please read
the review guidelines form the Helm repository:

* https://github.com/helm/charts/blob/master/REVIEW_GUIDELINES.md
* https://github.com/zabbix-community/helm-zabbix/blob/master/CONTRIBUTING.md
* https://github.com/zabbix-community/helm-zabbix/blob/master/charts/zabbix/docs/requirements.md

Following our best practices right from the start will accelerate the review process and
help get your PR merged quicker.
Expand All @@ -18,11 +13,6 @@ history. This will make it easier to identify new changes. The PR will be squash
anyways when it is merged. Thanks.

For fast feedback, please @-mention maintainers that are listed in the Chart.yaml file.

Please make sure you test your changes before you push them. Once pushed, a CircleCI
will run across your changes and do some initial checks and linting. These checks run
very quickly. Please check the results. We would like these checks to pass before we
even continue reviewing your changes.
-->

#### What this PR does / why we need it:
Expand All @@ -35,6 +25,6 @@ even continue reviewing your changes.

#### Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
- [ ] [DCO](https://github.com/helm/charts/blob/master/CONTRIBUTING.md#sign-your-work) signed
- [ ] [DCO](https://github.com/zabbix-community/helm-zabbix/blob/master/CONTRIBUTING.md) signed
- [ ] Chart Version bumped
- [ ] Variables are documented in the README.md
4 changes: 2 additions & 2 deletions charts/zabbix/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
apiVersion: v2 # Don't change this
name: zabbix
version: 4.0.3 # helm chart version
version: 4.1.0 # helm chart version
# LTS Zabbix version by default due to stability. See: https://www.zabbix.com/life_cycle_and_release_policy
appVersion: 6.0.20 # zabbix version
appVersion: 6.0.26 # zabbix version
description: Zabbix is a mature and effortless enterprise-class open source monitoring solution for network monitoring and application monitoring of millions of metrics.
keywords:
- zabbix
Expand Down
4 changes: 2 additions & 2 deletions charts/zabbix/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#---------------------------

URL=https://github.com/zabbix-community/helm-zabbix/
HELM_IMAGE=alpine/helm:3.9.0
HELM_DOCS_IMAGE=jnorwood/helm-docs:v1.11.0
HELM_IMAGE=alpine/helm:3.14.0
HELM_DOCS_IMAGE=jnorwood/helm-docs:v1.12.0
KNOWN_TARGETS=helm

#----------------------------------------------------------------------------------------------------------
Expand Down
41 changes: 34 additions & 7 deletions charts/zabbix/README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion charts/zabbix/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ helm search repo zabbix-community/zabbix -l
Set the helm chart version you want to use. Example:

```bash
export ZABBIX_CHART_VERSION='4.0.0'
export ZABBIX_CHART_VERSION='4.1.0'
```

Export default values of ``zabbix`` chart to ``$HOME/zabbix_values.yaml`` file:
Expand Down
6 changes: 3 additions & 3 deletions charts/zabbix/artifacthub-pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
# https://github.com/kedacore/external-scalers/blob/main/artifacthub/azure-cosmos-db/0.1.0/artifacthub-pkg.yml
# https://artifacthub.io/packages/keda-scaler/keda-official-external-scalers/external-scaler-azure-cosmos-db?modal=install

version: 4.0.3 # helm chart version
version: 4.1.0 # helm chart version
# LTS Zabbix version by default due to stability. See: https://www.zabbix.com/life_cycle_and_release_policy
appVersion: 6.0.20 # zabbix version
appVersion: 6.0.26 # zabbix version
name: zabbix
category: monitoring, networking, metrics
displayName: Zabbix - The Enterprise-Class Open Source Network Monitoring Solution
Expand Down Expand Up @@ -53,7 +53,7 @@ install: |
Set the helm chart version you want to use. Example:

```bash
export ZABBIX_CHART_VERSION='4.0.1'
export ZABBIX_CHART_VERSION='4.1.0'
```

Export default values of ``zabbix`` chart to ``$HOME/zabbix_values.yaml`` file:
Expand Down
2 changes: 1 addition & 1 deletion charts/zabbix/docs/example/kind/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Custom values for zabbix.

zabbixImageTag: 6.4.5-alpine
zabbixImageTag: 6.4.11-alpine

postgresAccess:
useUnifiedSecret: true
Expand Down
14 changes: 7 additions & 7 deletions charts/zabbix/docs/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ Simple shell function for Kubectl installation in Linux 64 bits. Copy and paste
```bash
sudo su

VERSION=v1.27.4
VERSION=v1.29.1
KUBECTL_BIN=kubectl

function install_kubectl {
if [ -z $(which $KUBECTL_BIN) ]; then
curl -LO https://storage.googleapis.com/kubernetes-release/release/$VERSION/bin/linux/amd64/$KUBECTL_BIN
curl -LO "https://dl.k8s.io/$VERSION/bin/linux/amd64/$KUBECTL_BIN"
chmod +x ${KUBECTL_BIN}
sudo mv ${KUBECTL_BIN} /usr/local/bin/${KUBECTL_BIN}
sudo ln -sf /usr/local/bin/${KUBECTL_BIN} /usr/bin/${KUBECTL_BIN}
Expand All @@ -75,7 +75,7 @@ install_kubectl

which kubectl

kubectl version --client
kubectl version --client=true

exit
```
Expand All @@ -85,7 +85,7 @@ Kubectl documentation:
* https://www.downloadkubernetes.com/
* https://kubernetes.io/docs/reference/kubectl/overview/

**Credits:** Juan Pablo Perez - https://www.linkedin.com/in/juanpabloperezpeelmicro/
**Credits:** Juan Pablo Perez - https://www.linkedin.com/in/juanpabloperezpeelmicro/

https://github.com/peelmicro/learn-devops-the-complete-kubernetes-course

Expand All @@ -94,8 +94,8 @@ https://github.com/peelmicro/learn-devops-the-complete-kubernetes-course
Run the following commands to install ``helm-docs``.

```bash
HELM_DOCS_VERSION=1.11.0
HELM_DOCS_PACKAGE=helm-docs_``$HELM_DOCS_VERSION``_linux_x86_64.tar.gz
HELM_DOCS_VERSION=1.12.0
HELM_DOCS_PACKAGE=helm-docs_``$HELM_DOCS_VERSION``_Linux_x86_64.tar.gz

cd /tmp

Expand All @@ -121,7 +121,7 @@ Execute these commands to install helm.
```bash
sudo su

HELM_TAR_FILE=helm-v3.12.2-linux-amd64.tar.gz
HELM_TAR_FILE=helm-v3.14.0-linux-amd64.tar.gz
HELM_URL=https://get.helm.sh
HELM_BIN=helm3

Expand Down
17 changes: 16 additions & 1 deletion charts/zabbix/templates/cronjob-hanodes-autoclean.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}-nodesclean
app.kubernetes.io/managed-by: {{ .Release.Service }}-nodesclean
spec:
schedule: {{ .Values.zabbixServer.haNodesAutoClean.schedule|quote }}
schedule: {{ .Values.zabbixServer.haNodesAutoClean.schedule | quote }}
concurrencyPolicy: {{ .Values.zabbixServer.haNodesAutoClean.concurrencyPolicy }}
jobTemplate:
spec:
Expand All @@ -24,6 +24,17 @@ spec:
{{- with .Values.zabbixServer.haNodesAutoClean.extraPodSpecs }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- if .Values.karpenter.enabled }}
{{- with .Values.karpenter.labels }}
nodeSelector:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- else }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
{{- with .Values.zabbixServer.haNodesAutoClean.extraInitContainers }}
initContainers:
{{- toYaml . | nindent 12 }}
Expand All @@ -32,6 +43,10 @@ spec:
- name: hanodes-autoclean
image: "{{ .Values.zabbixServer.haNodesAutoClean.image.repository }}:{{ .Values.zabbixServer.haNodesAutoClean.image.tag }}"
imagePullPolicy: {{ .Values.zabbixServer.haNodesAutoClean.image.pullPolicy }}
resources:
{{- toYaml .Values.zabbixServer.haNodesAutoClean.resources | nindent 14 }}
securityContext:
{{- toYaml .Values.zabbixServer.haNodesAutoClean.securityContext | nindent 14 }}
command:
- /bin/bash
- -c
Expand Down
15 changes: 8 additions & 7 deletions charts/zabbix/templates/daemonset-zabbix-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
app.kubernetes.io/managed-by: {{ .Release.Service }}-zabbix-agent
annotations:
{{- range $key,$value := .Values.zabbixAgent.daemonSetAnnotations }}
{{ $key }}: {{ $value|quote }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
selector:
Expand All @@ -21,7 +21,7 @@ spec:
metadata:
annotations:
{{- range $key,$value := .Values.zabbixAgent.containerAnnotations }}
{{ $key }}: {{ $value|quote }}
{{ $key }}: {{ $value | quote }}
{{- end }}
labels:
app: {{ template "zabbix.fullname" . }}-zabbix-agent
Expand All @@ -34,9 +34,10 @@ spec:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if .Values.karpenter.enabled }}
{{- with .Values.karpenter.labels }}
nodeSelector:
karpenter: "true"
app: zabbix
{{- toYaml . | nindent 8 }}
{{- end }}
{{- else }}
{{- with .Values.nodeSelector }}
nodeSelector:
Expand Down Expand Up @@ -83,7 +84,7 @@ spec:
periodSeconds: 10
successThreshold: 1
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{- toYaml .Values.zabbixAgent.securityContext | nindent 12 }}
env:
- name: ZBX_HOSTNAME
valueFrom:
Expand Down Expand Up @@ -150,7 +151,7 @@ spec:
hostPath:
path: /
{{- end }}
{{- with .Values.zabbixAgent.extraVolumes }}
{{- with .Values.zabbixAgent.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
27 changes: 17 additions & 10 deletions charts/zabbix/templates/deployment-zabbix-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ metadata:
app.kubernetes.io/managed-by: {{ .Release.Service }}-zabbix-server
annotations:
{{- range $key,$value := .Values.zabbixServer.deploymentAnnotations }}
{{ $key }}: {{ $value|quote }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
replicas: {{ .Values.zabbixServer.replicaCount }}
Expand All @@ -23,7 +23,7 @@ spec:
metadata:
annotations:
{{- range $key,$value := .Values.zabbixServer.containerAnnotations }}
{{ $key }}: {{ $value|quote }}
{{ $key }}: {{ $value | quote }}
{{- end }}
labels:
app: {{ template "zabbix.fullname" . }}-zabbix-server
Expand All @@ -36,9 +36,10 @@ spec:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if .Values.karpenter.enabled }}
{{- with .Values.karpenter.labels }}
nodeSelector:
karpenter: "true"
app: zabbix
{{- toYaml . | nindent 8 }}
{{- end }}
{{- else }}
{{- with .Values.nodeSelector }}
nodeSelector:
Expand Down Expand Up @@ -73,6 +74,10 @@ spec:
{{- end }}
env:
{{- include "zabbix.postgresAccess.variables" (list $ . "zabbix") | nindent 12 }}
securityContext:
{{- toYaml .Values.zabbixServer.securityContext | nindent 12 }}
resources:
{{- toYaml .Values.zabbixServer.resources | nindent 12 }}
command:
- "/bin/bash"
- "/script/wait_db_schema.sh"
Expand All @@ -86,7 +91,9 @@ spec:
containers:
- name: zabbix-server
resources:
{{- toYaml .Values.zabbixServer.resources | nindent 12 }}
{{- toYaml .Values.zabbixServer.resources | nindent 12 }}
securityContext:
{{- toYaml .Values.zabbixServer.securityContext | nindent 12 }}
{{- if .Values.zabbixServer.image.tag }}
image: "{{ .Values.zabbixServer.image.repository }}:{{ .Values.zabbixServer.image.tag }}"
{{- else }}
Expand Down Expand Up @@ -126,18 +133,18 @@ spec:
- name: ZBX_WEBSERVICEURL
value: "http://{{ template "zabbix.fullname" . }}-zabbix-webservice:{{ .Values.zabbixWebService.service.port }}/report"
- name: ZBX_STARTREPORTWRITERS
value: {{ .Values.zabbixWebService.replicaCount|quote }}
value: {{ .Values.zabbixWebService.replicaCount | quote }}
{{- end }}
{{- with .Values.zabbixServer.extraVolumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if and .Values.zabbixAgent.enabled .Values.zabbixAgent.runAsSidecar }}
- name: zabbix-agent
resources:
{{- toYaml .Values.zabbixAgent.resources | nindent 12 }}
{{- toYaml .Values.zabbixAgent.resources | nindent 12 }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{- toYaml .Values.zabbixAgent.securityContext | nindent 12 }}
{{- if .Values.zabbixAgent.image.tag }}
image: "{{ .Values.zabbixAgent.image.repository }}:{{ .Values.zabbixAgent.image.tag }}"
{{- else }}
Expand Down Expand Up @@ -195,6 +202,6 @@ spec:
name: {{ template "zabbix.fullname" . }}-waitdbschema-script
{{- end }}
{{- with .Values.zabbixServer.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
17 changes: 9 additions & 8 deletions charts/zabbix/templates/deployment-zabbix-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
app.kubernetes.io/managed-by: {{ .Release.Service }}-zabbix-web
annotations:
{{- range $key,$value := .Values.zabbixWeb.deploymentAnnotations }}
{{ $key }}: {{ $value|quote }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
replicas: {{ .Values.zabbixWeb.replicaCount }}
Expand All @@ -22,7 +22,7 @@ spec:
metadata:
annotations:
{{- range $key,$value := .Values.zabbixWeb.containerAnnotations }}
{{ $key }}: {{ $value|quote }}
{{ $key }}: {{ $value | quote }}
{{- end }}
labels:
app: {{ template "zabbix.fullname" . }}-zabbix-web
Expand All @@ -36,12 +36,13 @@ spec:
{{- end }}
{{- with .Values.zabbixWeb.extraInitContainers }}
initContainers:
{{- toYaml . | nindent 6 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.karpenter.enabled }}
{{- with .Values.karpenter.labels }}
nodeSelector:
karpenter: "true"
app: zabbix
{{- toYaml . | nindent 8 }}
{{- end }}
{{- else }}
{{- with .Values.nodeSelector }}
nodeSelector:
Expand Down Expand Up @@ -71,7 +72,7 @@ spec:
resources:
{{- toYaml .Values.zabbixWeb.resources | nindent 10 }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{- toYaml .Values.zabbixWeb.securityContext | nindent 10 }}
{{- if .Values.zabbixWeb.image.tag }}
image: "{{ .Values.zabbixWeb.image.repository }}:{{ .Values.zabbixWeb.image.tag }}"
{{- else }}
Expand All @@ -82,7 +83,7 @@ spec:
{{- include "zabbix.postgresAccess.variables" (list $ . "zabbix") | nindent 10 }}
{{- range $item := .Values.zabbixWeb.extraEnv }}
- name: {{ $item.name }}
value: {{ $item.value | quote }}
value: {{ $item.value | quote }}
{{- end }}
ports:
- name: zabbix-web
Expand Down Expand Up @@ -128,6 +129,6 @@ spec:
secretName: {{ .Values.zabbixWeb.samlCertsSecretName }}
{{- end }}
{{- with .Values.zabbixWeb.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
Loading