Skip to content

Commit

Permalink
feat: configure monitoring (#117)
Browse files Browse the repository at this point in the history
## Description
Enabled service and pod monitors in gitlab. For running on k3d-slim-dev
in ci/local we dont have to update anything as the gitlab chart checks
for the monitoring capabilities presence to deploy the service monitor
templates.

Depends on uds-core
[0.21.0](https://github.com/defenseunicorns/uds-core/releases/tag/v0.21.0).

Note: the pepr capability to mutate the service monitors but not pod
monitors so we will need to request that feature or PR uds-core to add
it. Adding the config for the pod monitor does no break anything.

As this wont get tested in CI in this repo (we should consider the
"on-release" test that will exist soon to deploy a full cluster) I will
provide visual proof in the comments. This requires no changes to the
end user to enable.

## Related Issue

Fixes #
[116](#116)
Relates to #

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Checklist before merging

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor Guide
Steps](https://github.com/defenseunicorns/uds-package-gitlab/blob/main/CONTRIBUTING.md#developer-workflow)
followed
  • Loading branch information
zachariahmiller authored May 3, 2024
1 parent 3a3a56b commit 423687d
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 7 deletions.
54 changes: 54 additions & 0 deletions chart/templates/uds-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,60 @@ spec:
port: 9168
description: "Monitoring Exporter"

- direction: Ingress
remoteNamespace: monitoring
remoteSelector:
app: prometheus
selector:
app: gitaly
port: 9236
description: "Gitaly Service Monitor"

- direction: Ingress
remoteNamespace: monitoring
remoteSelector:
app: prometheus
selector:
app: gitlab-shell
port: 9122
description: "Gitlab Shell Service Monitor"

- direction: Ingress
remoteNamespace: monitoring
remoteSelector:
app: prometheus
selector:
app: registry
port: 5001
description: "Registry Service Monitor"

- direction: Ingress
remoteNamespace: monitoring
remoteSelector:
app: prometheus
selector:
app: webservice
port: 8083
description: "Webservice Service Monitor"

- direction: Ingress
remoteNamespace: monitoring
remoteSelector:
app: prometheus
selector:
app: webservice
port: 9229
description: "Workhorse Service Monitor"

- direction: Ingress
remoteNamespace: monitoring
remoteSelector:
app: prometheus
selector:
app: gitlab-pages
port: 9235
description: "Pages Service Monitor"

- direction: Egress
selector:
app: registry
Expand Down
44 changes: 37 additions & 7 deletions values/common-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ global:
enabled: false
credentials:
{}
# secret:


appConfig:
object_store:
Expand Down Expand Up @@ -97,8 +97,6 @@ global:
enabled: true
create: true
annotations: {}
## Name to be used for serviceAccount, otherwise defaults to chart fullname
# name:

postgresql:
install: false
Expand All @@ -112,7 +110,7 @@ registry:
key: registry
metrics:
enabled: true
serviceMonitor: # TODO configure for Prometheus
serviceMonitor:
enabled: true

gitlab:
Expand All @@ -124,25 +122,57 @@ gitlab:

gitlab-exporter:
enabled: true
metrics: # TODO add Prometheus
metrics:
enabled: true
serviceMonitor:
enabled: true

migrations:
resources:
limits:
cpu: 500m
memory: 4G

sidekiq:
metrics:
enabled: true
serviceMonitor:
enabled: true

webservice:
ingress:
enabled: false # Local setting in subchart must be overridden
metrics: # TODO add Prometheus
enabled: false
metrics:
enabled: true
port: 8083
serviceMonitor:
enabled: true
workhorse:
metrics:
enabled: true
serviceMonitor:
enabled: true

gitlab-pages:
metrics:
enabled: true
serviceMonitor:
enabled: true

gitaly:
metrics:
enabled: true
serviceMonitor:
enabled: true

# override to enable ssh
gitlab-shell:
enabled: true
sshDaemon: gitlab-sshd
metrics:
enabled: true
serviceMonitor:
enabled: true

certmanager:
install: false
Expand Down

0 comments on commit 423687d

Please sign in to comment.