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

fix: add working podmonitor for sidekiq #169

Merged
merged 9 commits into from
Jul 23, 2024
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
15 changes: 9 additions & 6 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 Expand Up @@ -51,7 +51,10 @@ tasks:
description: Test the GitLab package from the current branch
actions:
- task: create-gl-test-bundle
- task: setup:k3d-test-cluster
- task: setup:k3d-full-cluster
# - cmd: ./uds zarf package deploy oci://defenseunicorns/uds-k3d:0.7.0 --set=K3D_IMAGE="rancher/k3s:v1.29.5-k3s1" --confirm --no-progress
# - cmd: ./uds zarf package deploy oci://defenseunicorns/init:v0.35.0 --confirm --no-progress
# - cmd: ./uds zarf package deploy oci://defenseunicorns/packages/private/uds/snapshots/core:latest-unicorn --confirm --no-progress
- task: deploy:test-bundle
- task: setup:create-doug-user
- task: test:all
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
Loading