Compare commits

..

3 Commits

Author SHA1 Message Date
Daniel Gerber
dcddc73785 docs(getting-started.md): Update section "DNS" 2025-12-08 11:45:11 +01:00
Daniel Gerber
8867d1b204 docs(getting-started.md): AAAA record on base domain is optional 2025-12-03 15:44:05 +00:00
Lilly Sell
cca755d4af docs(monitoring.md): Correct references and wordings in monitoring documentation 2025-12-03 15:56:36 +01:00
3 changed files with 66 additions and 72 deletions

View File

@@ -1,14 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# SPDX-FileCopyrightText: 2024 Zentrum für Digitale Souveränität der Öffentlichen Verwaltung (ZenDiS) GmbH # SPDX-FileCopyrightText: 2024 Zentrum für Digitale Souveränität der Öffentlichen Verwaltung (ZenDiS) GmbH
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "configargparse",
# "gitpython",
# "pyyaml",
# ]
# ///
import os.path import os.path
import logging import logging
@@ -21,6 +13,40 @@ import configargparse
from pathlib import Path from pathlib import Path
from git import Repo from git import Repo
p = configargparse.ArgParser()
p.add('--branch', env_var='CHART_DEV_BRANCH', help='The branch you want to work with. Will be created by the script if it does not exist yet.')
p.add('--git_hostname', env_var='GIT_HOSTNAME', default='git@gitlab.opencode.de', help='Set the hostname for the chart git checkouts.')
p.add('--revert', default=False, action='store_true', help='Set this parameter if you want to revert the referencing of the local helm chart checkout paths in the helmfiles.')
p.add('--match', default='', help="Clone/pull only charts that contain the given string in their name.")
p.add('--loglevel', env_var='LOGLEVEL', default='DEBUG', help='Set the loglevel: DEBUG, INFO, WARNING, ERROR, CRITICAL-')
options = p.parse_args()
script_path = os.path.dirname(os.path.realpath(__file__))
# some static definitions
log_path = script_path+'/../logs'
charts_yaml = script_path+'/../helmfile/environments/default/charts.yaml.gotmpl'
base_repo_path = script_path+'/..'
base_helmfile = base_repo_path+'/helmfile_generic.yaml.gotmpl'
helmfile_backup_extension = '.bak'
Path(log_path).mkdir(parents=True, exist_ok=True)
logFormatter = logging.Formatter("%(asctime)s %(levelname)-5.5s %(message)s")
rootLogger = logging.getLogger()
rootLogger.setLevel(options.loglevel)
fileHandler = logging.FileHandler("{0}/{1}.log".format(log_path, os.path.basename(__file__)))
fileHandler.setFormatter(logFormatter)
rootLogger.addHandler(fileHandler)
consoleHandler = logging.StreamHandler()
consoleHandler.setFormatter(logFormatter)
rootLogger.addHandler(consoleHandler)
logging.debug(f"Working with relative paths from script location: {script_path}")
logging.debug(f"Log directory: {log_path}")
logging.debug(f"charts.yaml.gotmpl: {charts_yaml}")
def create_or_switch_branch_base_repo(): def create_or_switch_branch_base_repo():
base_repo = Repo(path=base_repo_path) base_repo = Repo(path=base_repo_path)
@@ -162,45 +188,6 @@ def revert_the_helmfiles():
## ##
## Main program ## Main program
## ##
if __name__ == "__main__":
p = configargparse.ArgParser()
p.add('--branch', env_var='CHART_DEV_BRANCH',
help='The branch you want to work with. Will be created by the script if it does not exist yet.')
p.add('--git_hostname', env_var='GIT_HOSTNAME', default='git@gitlab.opencode.de',
help='Set the hostname for the chart git checkouts.')
p.add('--revert', default=False, action='store_true',
help='Set this parameter if you want to revert the referencing of the local helm chart checkout paths in the helmfiles.')
p.add('--match', default='', help="Clone/pull only charts that contain the given string in their name.")
p.add('--loglevel', env_var='LOGLEVEL', default='DEBUG',
help='Set the loglevel: DEBUG, INFO, WARNING, ERROR, CRITICAL-')
options = p.parse_args()
script_path = os.path.dirname(os.path.realpath(__file__))
# some static definitions
log_path = script_path + '/../logs'
charts_yaml = script_path + '/../helmfile/environments/default/charts.yaml.gotmpl'
base_repo_path = script_path + '/..'
base_helmfile = base_repo_path + '/helmfile_generic.yaml.gotmpl'
helmfile_backup_extension = '.bak'
Path(log_path).mkdir(parents=True, exist_ok=True)
logFormatter = logging.Formatter("%(asctime)s %(levelname)-5.5s %(message)s")
rootLogger = logging.getLogger()
rootLogger.setLevel(options.loglevel)
fileHandler = logging.FileHandler("{0}/{1}.log".format(log_path, os.path.basename(__file__)))
fileHandler.setFormatter(logFormatter)
rootLogger.addHandler(fileHandler)
consoleHandler = logging.StreamHandler()
consoleHandler.setFormatter(logFormatter)
rootLogger.addHandler(consoleHandler)
logging.debug(f"Working with relative paths from script location: {script_path}")
logging.debug(f"Log directory: {log_path}")
logging.debug(f"charts.yaml.gotmpl: {charts_yaml}")
if options.revert: if options.revert:
revert_the_helmfiles() revert_the_helmfiles()
else: else:

View File

@@ -60,12 +60,14 @@ For the following guide, we will use `dev` as environment where variables can be
## DNS ## DNS
The deployment is designed to deploy each application/service under a dedicated subdomain. The deployment is designed to deploy each application/service under a dedicated subdomain.
For your convenience, we recommend creating a `*.domain.tld` A-Record for your cluster Ingress Controller; otherwise, you must create an A-Record for each subdomain. For your convenience, we recommend creating a `*.domain.tld` A/AAAA-Record for your cluster Ingress Controller; otherwise, you must create an A/AAAA-Record for each subdomain.
| Record name | Type | Value | Additional information | | Record name | Type | Value | Additional information |
|-------------------------------|------|----------------------------------------------------|-------------------------------------------------------------------| |-------------------------------|------|----------------------------------------------------|-------------------------------------------------------------------|
| domain.tld | A | IPv4 address of your Ingress Controller | |
| domain.tld | AAAA | IPv6 address of your Ingress Controller | Optional |
| *.domain.tld | A | IPv4 address of your Ingress Controller | | | *.domain.tld | A | IPv4 address of your Ingress Controller | |
| *.domain.tld | AAAA | IPv6 address of your Ingress Controller | | | *.domain.tld | AAAA | IPv6 address of your Ingress Controller | Optional |
| mail.domain.tld | A | IPv4 address of your postfix NodePort/LoadBalancer | Optional, mail should directly be delivered to openDesk's Postfix | | mail.domain.tld | A | IPv4 address of your postfix NodePort/LoadBalancer | Optional, mail should directly be delivered to openDesk's Postfix |
| mail.domain.tld | AAAA | IPv6 address of your postfix NodePort/LoadBalancer | Optional, mail should directly be delivered to openDesk's Postfix | | mail.domain.tld | AAAA | IPv6 address of your postfix NodePort/LoadBalancer | Optional, mail should directly be delivered to openDesk's Postfix |
| domain.tld | MX | `10 mail.domain.tld` | | | domain.tld | MX | `10 mail.domain.tld` | |

View File

@@ -23,8 +23,7 @@ openDesk includes integration with Prometheus-based monitoring.
Together with [kube-prometheus-stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack), you can easily leverage the full potential of the open-source cloud-native observability stack. Together with [kube-prometheus-stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack), you can easily leverage the full potential of the open-source cloud-native observability stack.
Before enabling the following options, you need to install the respective custom resource definitions (CRDs) from the kube-prometheus-stack Before enabling the following options, you need to install the respective custom resource definitions (CRDs) from the kube-prometheus-stack repository which should at least include the Prometheus Operator.
repository or Prometheus operator.
# Defaults # Defaults
@@ -33,15 +32,17 @@ All configurable options and their defaults can be found in
# Metrics # Metrics
To deploy `podMonitor` and `serviceMonitor` custom resources, enable it by: To deploy `podMonitor` and `serviceMonitor` custom resources, enable them by:
```yaml ```yaml
monitoring:
prometheus: prometheus:
serviceMonitors: serviceMonitors:
enabled: true enabled: true
podMonitors: podMonitors:
enabled: true enabled: true
``` ```
```
# Alerts # Alerts
@@ -51,6 +52,7 @@ Some of these are created by our partners while others are defined in [opendesk-
All alert rules are deployed as [PrometheusRule](https://prometheus-operator.dev/docs/api-reference/api/#monitoring.coreos.com/v1.PrometheusRule) and can be enabled like this: All alert rules are deployed as [PrometheusRule](https://prometheus-operator.dev/docs/api-reference/api/#monitoring.coreos.com/v1.PrometheusRule) and can be enabled like this:
```yaml ```yaml
monitoring:
prometheus: prometheus:
prometheusRules: prometheusRules:
enabled: true enabled: true
@@ -58,9 +60,12 @@ prometheus:
# Dashboards for Grafana # Dashboards for Grafana
To deploy optional Grafana dashboards with ConfigMaps, enable the functionality with: If your Grafana instance is deployed via kube-prometheus-stack, or you have deployed the [Sidecar for datasources](https://github.com/grafana/helm-charts/blob/main/charts/grafana/README.md#sidecar-for-datasources), openDesk can make dashboards available via ConfigMap resources.
Enable the functionality with the following snippet:
```yaml ```yaml
monitoring:
grafana: grafana:
dashboards: dashboards:
enabled: true enabled: true