From 97b687e106cccd132f4da7326da4d4d7247ab9f7 Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Wed, 31 Jul 2024 12:29:58 -0600 Subject: [PATCH] chore: move health check into package itself (#183) ## Description This moves the health check waits into the package itself to avoid race conditions with other components that may want to talk to GitLab (i.e. GitLab Runner) ## Related Issue Fixes #N/A ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [X] 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 --- .images/made-for-uds.svg | 225 --------------------------------------- README.md | 2 +- common/zarf.yaml | 64 +++++++++++ tasks/test.yaml | 76 ------------- 4 files changed, 65 insertions(+), 302 deletions(-) delete mode 100644 .images/made-for-uds.svg diff --git a/.images/made-for-uds.svg b/.images/made-for-uds.svg deleted file mode 100644 index 36b3524c..00000000 --- a/.images/made-for-uds.svg +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/README.md b/README.md index 78a431dd..0f8f0186 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 🏭 UDS GitLab Zarf Package -[Made for UDS](https://github.com/defenseunicorns/uds-core) +[Made for UDS](https://github.com/defenseunicorns/uds-core) [![Latest Release](https://img.shields.io/github/v/release/defenseunicorns/uds-package-gitlab)](https://github.com/defenseunicorns/uds-package-gitlab/releases) [![Build Status](https://img.shields.io/github/actions/workflow/status/defenseunicorns/uds-package-gitlab/tag-and-release.yaml)](https://github.com/defenseunicorns/uds-package-gitlab/actions/workflows/tag-and-release.yaml) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/defenseunicorns/uds-package-gitlab/badge)](https://api.securityscorecards.dev/projects/github.com/defenseunicorns/uds-package-gitlab) diff --git a/common/zarf.yaml b/common/zarf.yaml index 7e9c2aef..b9b4dbbf 100644 --- a/common/zarf.yaml +++ b/common/zarf.yaml @@ -30,3 +30,67 @@ components: name: gitlab namespace: gitlab condition: "'{.status.phase}'=Ready" + - description: GitLab Exporter to be Healthy + wait: + cluster: + kind: Deployment + name: gitlab-gitlab-exporter + namespace: gitlab + condition: Available + - description: GitLab Registry to be Healthy + wait: + cluster: + kind: Deployment + name: gitlab-registry + namespace: gitlab + condition: Available + - description: GitLab Shell to be Healthy + wait: + cluster: + kind: Deployment + name: gitlab-gitlab-shell + namespace: gitlab + condition: Available + - description: GitLab Toolbox to be Healthy + wait: + cluster: + kind: Deployment + name: gitlab-toolbox + namespace: gitlab + condition: Available + - description: GitLab Sidekiq to be Healthy + wait: + cluster: + kind: Deployment + name: gitlab-sidekiq-all-in-1-v2 + namespace: gitlab + condition: Available + - description: GitLab Webservice to be Healthy + wait: + cluster: + kind: Deployment + name: gitlab-webservice-default + namespace: gitlab + condition: Available + - description: GitLab Pages to be Healthy + wait: + cluster: + kind: Deployment + name: gitlab-gitlab-pages + namespace: gitlab + condition: Available + # StatefulSets don't show conditions themselves so we look for an underlying Pod + - description: GitLab Gitaly to be Healthy + wait: + cluster: + kind: Pod + name: app=gitaly + namespace: gitlab + condition: Ready + - description: GitLab Migrations to be Healthy + wait: + cluster: + kind: Job + name: app=migrations + namespace: gitlab + condition: Complete diff --git a/tasks/test.yaml b/tasks/test.yaml index c27d7e0d..38d8f37d 100644 --- a/tasks/test.yaml +++ b/tasks/test.yaml @@ -5,86 +5,10 @@ variables: tasks: - name: all actions: - - task: test:health-check - task: test:ingress - task: test:ui - task: test:git - - name: health-check - actions: - - description: GitLab Exporter Health Check - wait: - cluster: - kind: Deployment - name: gitlab-gitlab-exporter - namespace: gitlab - condition: Available - - - description: GitLab Registry Health Check - wait: - cluster: - kind: Deployment - name: gitlab-registry - namespace: gitlab - condition: Available - - - description: GitLab Shell Health Check - wait: - cluster: - kind: Deployment - name: gitlab-gitlab-shell - namespace: gitlab - condition: Available - - - description: GitLab Toolbox Health Check - wait: - cluster: - kind: Deployment - name: gitlab-toolbox - namespace: gitlab - condition: Available - - - description: GitLab Sidekiq Health Check - wait: - cluster: - kind: Deployment - name: gitlab-sidekiq-all-in-1-v2 - namespace: gitlab - condition: Available - - - description: GitLab Webservice Health Check - wait: - cluster: - kind: Deployment - name: gitlab-webservice-default - namespace: gitlab - condition: Available - - - description: GitLab Pages Health Check - wait: - cluster: - kind: Deployment - name: gitlab-gitlab-pages - namespace: gitlab - condition: Available - - # StatefulSets don't show conditions themselves so we look for an underlying Pod - - description: GitLab Gitaly Health Check - wait: - cluster: - kind: Pod - name: app=gitaly - namespace: gitlab - condition: Ready - - - description: GitLab Migrations Health Check - wait: - cluster: - kind: Job - name: app=migrations - namespace: gitlab - condition: Complete - - name: ingress actions: # `/-/readiness` endpoint returns 503 if any checks fail.