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

Remove support for IngressRoute and Routes #123

Merged
merged 11 commits into from
Nov 26, 2024
3 changes: 1 addition & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ For fast feedback, please @-mention maintainers that are listed in the Chart.yam
#### Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
- [ ] [DCO](https://github.com/zabbix-community/helm-zabbix/blob/master/CONTRIBUTING.md) signed
- [ ] Chart Version bumped
- [ ] Variables are documented in the README.md
- [ ] Variables are documented in values.yaml with [Helm-Docs](https://github.com/norwoodj/helm-docs) comments, as we build README.md using this utility
129 changes: 107 additions & 22 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
# Contributing

* Configure authentication on your Github account to use the SSH protocol instead of HTTP. Watch this tutorial to learn how to set up: https://help.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account
* Have the ``make`` and ``docker`` commands installed on your system. With this, you don't need the below mentioned ``helm`` and ``helm-docs`` and use containers for the needed steps instead. See this [tutorial](charts/zabbix/docs/requirements.md).

* Have the ``make`` and ``docker`` commands installed on your system. With this, you don't need the below mentioned ``helm`` and use containers for the needed steps instead. See this [tutorial](charts/zabbix/docs/requirements.md).
* Create a fork this repository.
* Clone the forked repository to your local system:

Expand Down Expand Up @@ -38,11 +37,13 @@ git branch
```

* Make your changes and tests to the new branch.
* Keep the ``charts/zabbix/values.yaml`` file updated with working default values ​​in case any variables are referenced in the helm chart template files.
* Change the ``version`` and ``appVersion`` parameters (helm chart and Zabbix version respectively) in ``charts/zabbix/Chart.yaml`` and ``charts/zabbix/artifacthub-pkg.yml`` files.
* Verify your changed do not introduce syntactical/semantic errors:
* Keep the ``charts/zabbix/values.yaml`` file updated with working default values ​​in case any variables are referenced in the helm chart template files
* Change the ``appVersion`` parameter in ``charts/zabbix/Chart.yaml`` in case you have updated the ``zabbixImageTag`` in ``charts/zabbix/values.yaml`` (upgrade to a newer version released by Zabbix)
* Verify your changes do not introduce syntactical/semantic errors:
* Do NOT change ``version`` in ``charts/zabbix/chart.yaml`` nor in ``charts/zabbix/artifacthub-pkg.yml``, as this is now part of the release process issued by the code owners
* Make any changes you want in ``charts/zabbix/README.md`` in ``charts/zabbix/README.md.gotmpl``, out of which ``charts/zabbix/README.md`` will be generated using ``helm-docs`` during the version release process by the code owners

Method using make and docker:
Method to check for syntactical/semantic errors using ``make`` and ``docker``:

```bash
cd charts/zabbix
Expand All @@ -56,22 +57,6 @@ cd charts/zabbix
helm lint .
```

* Run command ``helm-docs`` to update content of ``README.md`` file using the ``README.md.gotmpl`` template. More info about [helm-docs](https://github.com/norwoodj/helm-docs).

Method using make and docker:

```bash
cd charts/zabbix
make gen-docs
```

Method using locally installed ``helm-docs`` command:

```bash
cd charts/zabbix
helm-docs
```

* Commit the changes to the branch.
* Push files to repository remote with command:

Expand Down Expand Up @@ -119,6 +104,106 @@ git push origin master --tags
Reference:
* https://blog.scottlowe.org/2015/01/27/using-fork-branch-git-workflow/


## For code mainteners only

To generate a new release of the helm chart, follow these instructions:

* Review and merge the opened PRs
* Run local tests
* Create a branch. Example:

```
git checkout -b BRANCH_NAME
```

Make sure you are on the correct branch using the following command. The branch in use will show with a '*' before the name.

```
git branch
```

* Make your changes and tests to the new branch
* Verify the syntax errors using the follow commands:

```
cd charts/zabbix
make lint
```

* Analyse the changes of the PRs merged and set a new release using the follow approach:

A **major** version" should be the "dot-release". Example: *6.0.2* -> *6.1.0* is be a **major release update**. Users have to check whether they have to modify their values.yaml, and we need to write a short explanation of what has changed in the ``chart/zabbix/README.md.gotmpl``.

A **minor** is the "dot-dot" release. Example: *6.0.2* -> *6.0.3* is **minor upgrade**, no changes in any APIs, interfaces etc. should be necessary.

* Change the ``version`` and ``appVersion`` parameters (helm chart and Zabbix version, respectively) in ``charts/zabbix/Chart.yaml`` and ``charts/zabbix/artifacthub-pkg.yml`` files.
* Run the following commands to update the documentation of the helm chart.

```
cd charts/zabbix
make gen-docs
```

* Commit the changes to the branch.
* Push files to repository remote with command:

```
git push --set-upstream origin BRANCH_NAME
```

* Create Pull Request (PR) to the master branch. See this [tutorial](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork)
* Update the content with the suggestions of the reviewer (if necessary).
* After your pull request is merged to the master branch, update your local clone:

```
git checkout master
git pull upstream master
```

* Clean up after your pull request is merged with command:

```
git branch -d BRANCH_NAME
```

Then you can update the master branch in your forked repository.

```
git push origin master
```

And push the deletion of the feature branch to your GitHub repository with command:

```
git push --delete origin BRANCH_NAME
```

* Create a new tag to generate a new release of the helm chart using the following commands:

```
git tag -a 6.1.0 -m "New release" #example
git push upstream --tags
```

* The before commands will start the pipeline and will generate a new release and tag in standad ``zabbix-6.0.0``.
* To keep your fork in sync with the original repository, use these commands:

```
git pull upstream master
git pull upstream master --tags

git push origin master
git push origin master --tags
```

* After this, edit and adjust the text generated automatically for new release and adjust the release notes follow the examples the other releases published in https://github.com/zabbix-community/helm-zabbix/releases

# Reference:

* https://blog.scottlowe.org/2015/01/27/using-fork-branch-git-workflow/


# About Visual Code (VSCode)

Use a IDE (Integrated Development Environment) or text editor of your choice. By default, the use of VSCode is recommended.
Expand Down
4 changes: 2 additions & 2 deletions charts/zabbix/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ maintainers:
email: [email protected]
url: https://github.com/aeciopires
- name: Christian Anton
email: christian.anton@secadm.de
url: https://secadm.de
email: christian.anton@inqbeo.de
url: https://inqbeo.de
5 changes: 5 additions & 0 deletions charts/zabbix/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ helm uninstall zabbix -n monitoring

# Breaking changes of this helm chart

## Version 6.1.0
* Removing support for non-default Kubernetes features and Custom Resource objects: `IngressRoute`, `Route`, more info: #123
* Removing support for [karpenter](https://karpenter.sh) due to the more generalistic approach: #121
* Adding support to deploy any arbitrary manifests together with this Helm Chart by embedding them in the `.Values.extraManifests` list (#121)

fibbs marked this conversation as resolved.
Show resolved Hide resolved
## Version 6.0.0

* New implementation of native Zabbix Server High Availability (see [Support of native Zabbix Server High Availability](#support-of-native-zabbix-server-high-availability) section)
Expand Down
18 changes: 4 additions & 14 deletions charts/zabbix/docs/example/kind/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ ingress:
# Ingress extra labels
extraLabels: {}
hosts:
- host: zabbix.local
paths:
- path: /
pathType: Prefix
- host: zabbix.local
paths:
- path: /
pathType: Prefix
tls: []
# - secretName: chart-example-tls
# hosts:
Expand All @@ -183,13 +183,3 @@ ingress:
ingressClassName: nginx
# pathType is only for k8s >= 1.1=
pathType: Prefix

karpenter:
# Enables support provisioner of Karpenter. Reference: https://karpenter.sh/. Tested only using EKS cluster 1.23 in AWS with Karpenter 0.19.2.
enabled: false
clusterName: "CLUSTER_NAME"
tag: "karpenter.sh/discovery/CLUSTER_NAME: CLUSTER_NAME"
limits:
resources:
cpu: "20"
memory: 100Gi
7 changes: 0 additions & 7 deletions charts/zabbix/templates/cronjob-hanodes-autoclean.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,10 @@ 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.tolerations }}
tolerations:
{{- toYaml . | nindent 12 }}
Expand Down
7 changes: 0 additions & 7 deletions charts/zabbix/templates/daemonset-zabbix-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,10 @@ spec:
{{- with .Values.zabbixAgent.extraPodSpecs }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if .Values.karpenter.enabled }}
{{- with .Values.karpenter.labels }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- else }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
Expand Down
7 changes: 0 additions & 7 deletions charts/zabbix/templates/deployment-zabbix-java-gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,10 @@ spec:
{{- with .Values.zabbixJavaGateway.extraPodSpecs }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if .Values.karpenter.enabled }}
{{- with .Values.karpenter.labels }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- else }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if gt (len .Values.affinity) 0 }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
Expand Down
7 changes: 0 additions & 7 deletions charts/zabbix/templates/deployment-zabbix-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,10 @@ spec:
{{- with .Values.zabbixServer.extraPodSpecs }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if .Values.karpenter.enabled }}
{{- with .Values.karpenter.labels }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- else }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if gt (len .Values.affinity) 0 }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
Expand Down
7 changes: 0 additions & 7 deletions charts/zabbix/templates/deployment-zabbix-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,10 @@ spec:
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.karpenter.enabled }}
{{- with .Values.karpenter.labels }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- else }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if gt (len .Values.affinity) 0 }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
Expand Down
7 changes: 0 additions & 7 deletions charts/zabbix/templates/deployment-zabbix-webservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,10 @@ spec:
{{- with .Values.zabbixWebService.extraPodSpecs }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if .Values.karpenter.enabled }}
{{- with .Values.karpenter.labels }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- else }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if gt (len .Values.affinity) 0 }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
Expand Down
32 changes: 0 additions & 32 deletions charts/zabbix/templates/ingressroute.yml

This file was deleted.

7 changes: 0 additions & 7 deletions charts/zabbix/templates/job-create-upgrade-db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,10 @@ spec:
{{- with .Values.zabbixServer.zabbixServerHA.dbCreateUpgradeJob.extraPodSpecs }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if .Values.karpenter.enabled }}
{{- with .Values.karpenter.labels }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- else }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.zabbixServer.zabbixServerHA.dbCreateUpgradeJob.extraInitContainers }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
Loading