Skip to content

Commit

Permalink
fix: add working podmonitor for sidekiq (#169)
Browse files Browse the repository at this point in the history
## Description

- add working podmonitor for sidekiq

## Related Issue

Fixes #
#165

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] 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 Jul 23, 2024
1 parent 9c805ff commit 5ff550a
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 12 deletions.
20 changes: 20 additions & 0 deletions chart/templates/sidekiq-pod-monitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{- if .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" }}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: gitlab-sidekiq-metrics
namespace: {{ .Release.Namespace }}
spec:
scrapeClass: istio-certs
namespaceSelector:
matchNames:
- gitlab
podMetricsEndpoints:
- path: /metrics
port: http-metrics
scheme: https
enableHttp2: false
selector:
matchLabels:
app: sidekiq
{{- end }}
9 changes: 9 additions & 0 deletions chart/templates/uds-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,15 @@ spec:
port: 9235
description: "Pages Service Monitor"

- direction: Ingress
remoteNamespace: monitoring
remoteSelector:
app: prometheus
selector:
app: sidekiq
port: 3807
description: "Sidekiq Pod Monitor"

- direction: Egress
selector:
app: registry
Expand Down
10 changes: 5 additions & 5 deletions tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ includes:
- cleanup: ./tasks/cleanup.yaml
- dependencies: ./tasks/dependencies.yaml
- test: ./tasks/test.yaml
- create: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.8.0/tasks/create.yaml
- lint: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.8.0/tasks/lint.yaml
- pull: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.8.0/tasks/pull.yaml
- deploy: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.8.0/tasks/deploy.yaml
- setup: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.8.0/tasks/setup.yaml
- create: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.9.0/tasks/create.yaml
- lint: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.9.0/tasks/lint.yaml
- pull: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.9.0/tasks/pull.yaml
- deploy: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.9.0/tasks/deploy.yaml
- setup: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.9.0/tasks/setup.yaml

tasks:
- name: default
Expand Down
8 changes: 4 additions & 4 deletions tasks/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
includes:
- dependencies: ./dependencies.yaml
- test: ./test.yaml
- create: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.8.0/tasks/create.yaml
- deploy: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.8.0/tasks/deploy.yaml
- publish: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.8.0/tasks/publish.yaml
- setup: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.8.0/tasks/setup.yaml
- create: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.9.0/tasks/create.yaml
- deploy: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.9.0/tasks/deploy.yaml
- publish: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.9.0/tasks/publish.yaml
- setup: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.9.0/tasks/setup.yaml

tasks:
- name: build-package
Expand Down
2 changes: 1 addition & 1 deletion tests/auth.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ setup('authenticate', async ({ page, context }) => {
await page.goto('/dashboard/projects');

await page.getByLabel('Username or email').fill('doug');
await page.getByLabel('Password').fill('unicorn123!@#');
await page.getByLabel('Password').fill('unicorn123!@#UN');
await page.getByRole('button', { name: "Log In" }).click();

await page.waitForURL('/dashboard/projects'); // successful redirect
Expand Down
4 changes: 2 additions & 2 deletions values/common-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ gitlab:
sidekiq:
metrics:
enabled: true
serviceMonitor:
enabled: true
podMonitor:
enabled: false

webservice:
ingress:
Expand Down

0 comments on commit 5ff550a

Please sign in to comment.