Skip to content

Commit

Permalink
feat: add configurable overrides for GitLab resource limits (#34)
Browse files Browse the repository at this point in the history
fix: add missing gitlab redis istio injection

* Add overrides for GitLab resource limits

* Update uds-config/uds-core-swf/dev-cluster/uds-config.yaml

* Update uds-config/uds-core-swf/test-cluster/uds-config.yaml

---------

Co-authored-by: Opnauticus <[email protected]>
  • Loading branch information
jacobbmay and blancharda authored Mar 7, 2024
1 parent af3dd7b commit 790194e
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 6 deletions.
31 changes: 31 additions & 0 deletions bundles/uds-core-swf/uds-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,37 @@ packages:
- name: gitlab
repository: ghcr.io/defenseunicorns/packages/uds/gitlab
ref: 16.8.1-uds.2-registry1
overrides:
gitlab:
gitlab:
variables:
- name: MIGRATIONS_RESOURCES
description: "Gitlab Migrations Resources"
path: "gitlab.migrations.resources"
- name: WEBSERVICE_REPLICAS
description: "Gitlab Webservice Min Replicas"
path: "gitlab.webservice.minReplicas"
- name: WEBSERVICE_RESOURCES
description: "Gitlab Webservice Resources"
path: "gitlab.webservice.resources"
- name: WORKHORSE_RESOURCES
description: "Gitlab Workhorse Resources"
path: "gitlab.workhorse.resources"
- name: SIDEKIQ_REPLICAS
description: "Gitlab Sidekiq Min Replicas"
path: "gitlab.sidekiq.minReplicas"
- name: SIDEKIQ_RESOURCES
description: "Gitlab Sidekiq Resources"
path: "gitlab.sidekiq.resources"
- name: GITALY_RESOURCES
description: "Gitlab Gitaly Resources"
path: "gitlab.gitaly.resources"
- name: REGISTRY_REPLICAS
description: "Gitlab Registry Min Replicas"
path: "registry.hpa.minReplicas"
- name: SHELL_REPLICAS
description: "Gitlab Shell Min Replicas"
path: "gitlab.gitlab-shell.minReplicas"

# Gitlab Runner
- name: gitlab-runner
Expand Down
5 changes: 1 addition & 4 deletions packages/namespaces/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ namespaces:
- name: gitlab
labels:
istio-injection: enabled
- name: gitlab-redis
labels:
istio-injection: enabled
- name: gitlab-minio
- name: dev-redis
labels:
istio-injection: enabled
- name: gitlab-runner-sandbox
Expand Down
4 changes: 2 additions & 2 deletions tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ tasks:
################
- name: deploy-bundle-to-dev
actions:
- task: deploy:uds-core-bundle-to-dev
- task: deploy:bundle-to-dev

- name: deploy-bundle-to-test
actions:
- task: deploy:uds-core-bundle-test
- task: deploy:bundle-to-test

#### Clean ####
- name: clean
Expand Down
33 changes: 33 additions & 0 deletions uds-config/uds-core-swf/dev-cluster/uds-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,39 @@ variables:
GITLAB_BACKUP_EXTRA_ARGS: "--skip artifiacts,registry"
BUCKET_SUFFIX: "-dev"
GITLAB_REDIS_ENDPOINT: "redis-master.dev-redis.svc.cluster.local"
WEBSERVICE_REPLICAS: 2
WEBSERVICE_RESOURCES:
limits:
cpu: 8000m
memory: 8G
requests:
cpu: 8000m
memory: 8G
MIGRATIONS_RESOURCES:
limits:
cpu: 500m
memory: 4G
WORKHORSE_RESOURCES:
limits:
memory: 100M
requests:
cpu: 10m
memory: 10M
SIDEKIQ_REPLICAS: 1
SIDEKIQ_RESOURCES:
limits:
cpu: 4000m
memory: 15G
requests:
cpu: 4000m
memory: 15G
GITALY_RESOURCES:
limits:
cpu: 4000m
memory: 15G
requests:
cpu: 4000m
memory: 15G
sonarqube-database-secret:
SONARQUBE_DB_PASSWORD: "replace-me-db-passwords"
sonarqube:
Expand Down
33 changes: 33 additions & 0 deletions uds-config/uds-core-swf/test-cluster/uds-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,39 @@ variables:
GITLAB_BACKUP_EXTRA_ARGS: "--skip artifiacts,registry"
BUCKET_SUFFIX: "-test"
GITLAB_REDIS_ENDPOINT: "redis-master.dev-redis.svc.cluster.local"
WEBSERVICE_REPLICAS: 2
WEBSERVICE_RESOURCES:
limits:
cpu: 8000m
memory: 8G
requests:
cpu: 8000m
memory: 8G
MIGRATIONS_RESOURCES:
limits:
cpu: 500m
memory: 4G
WORKHORSE_RESOURCES:
limits:
memory: 100M
requests:
cpu: 10m
memory: 10M
SIDEKIQ_REPLICAS: 1
SIDEKIQ_RESOURCES:
limits:
cpu: 4000m
memory: 15G
requests:
cpu: 4000m
memory: 15G
GITALY_RESOURCES:
limits:
cpu: 4000m
memory: 15G
requests:
cpu: 4000m
memory: 15G
sonarqube-database-secret:
SONARQUBE_DB_PASSWORD: "replace-me-db-passwords"
sonarqube:
Expand Down

0 comments on commit 790194e

Please sign in to comment.