Skip to content

Commit 0359008

Browse files
committed
Refactor backend and API to support helm deployments
The frontend has placeholders for helm apps for now. representing Squashed commit of the following: commit a84cd5a Author: Emma Zheng <zheng861@purdue.edu> Date: Thu Jan 15 14:04:16 2026 -0500 Remove commit step from workflow commit 6c2470a Merge: c53dfac 54929fc Author: zheng861 <zheng861@purdue.edu> Date: Thu Jan 15 14:01:47 2026 -0500 Merge branch 'main' into helm-backend commit c53dfac Author: zheng861 <zheng861@purdue.edu> Date: Wed Jan 14 16:09:13 2026 -0500 Update charts Move hardcoded securityContext and resources to values.yaml - Including the same key twice(once hardcoded and once conditionally from values) resulted in yaml unmarshal errors commit bd93fac Author: zheng861 <zheng861@purdue.edu> Date: Wed Jan 14 12:47:58 2026 -0500 Bug fixes in deletion and conflicts commit caabacd Author: zheng861 <zheng861@purdue.edu> Date: Wed Jan 14 12:09:26 2026 -0500 Create namespace before running helm job Otherwise, the job fails because the service user doesn't have permission to read inside a nonexistent namespace. This also adds the Rancher annotations. commit c48dbf9 Author: zheng861 <zheng861@purdue.edu> Date: Tue Jan 13 20:45:48 2026 -0500 Fix status bugs and missing projectId commit 4678fe4 Author: zheng861 <zheng861@purdue.edu> Date: Tue Jan 13 19:56:54 2026 -0500 Fix bugs in workflow run handling commit 8e5d15c Author: zheng861 <zheng861@purdue.edu> Date: Tue Jan 13 17:09:15 2026 -0500 Update commit hash and image tag on webhook event commit 997f015 Author: zheng861 <zheng861@purdue.edu> Date: Mon Jan 12 17:02:58 2026 -0500 Bug fixes Avoid cloning functions with structuredClone Omit deploymentConfigId from configs Create app group after validating apps, avoiding empty app groups when apps are invalid commit 4590499 Author: zheng861 <zheng861@purdue.edu> Date: Mon Jan 12 16:20:08 2026 -0500 Pass projectId in API call commit 5893510 Author: Emma Zheng <zheng861@purdue.edu> Date: Sun Jan 11 22:30:07 2026 -0500 Update credentials commit 75431b7 Author: zheng861 <zheng861@purdue.edu> Date: Sun Jan 11 22:22:58 2026 -0500 Restore staging build-push workflow commit e6922c1 Author: zheng861 <zheng861@purdue.edu> Date: Sun Jan 11 22:14:44 2026 -0500 Directly query OCI repository for chart info commit ac27491 Author: zheng861 <zheng861@purdue.edu> Date: Sun Jan 11 20:46:51 2026 -0500 Enable helm deployments from values.yaml commit 895361e Author: zheng861 <zheng861@purdue.edu> Date: Sun Jan 11 19:43:37 2026 -0500 Misc. fixes - Move @relation to WorkloadConfig and HelmConfig for effective cascade deletion - Remove REGISTRY_API_URL environment variable - Add create and update types to prepareMetadataForApps - Return a deployment title in getDeployment - Return non-applicable fields as null from getDeployment - Cache the result of listCharts - Create or update helm apps using a Job - Hide non-applicable tabs and fields for helm apps commit ec207db Author: FluxCapacitor2 <31071265+FluxCapacitor2@users.noreply.github.com> Date: Tue Jan 6 03:57:16 2026 -0500 Small misc. changes commit fd41baa Author: FluxCapacitor2 <31071265+FluxCapacitor2@users.noreply.github.com> Date: Tue Jan 6 02:18:13 2026 -0500 Use Promise.allSettled instead of manual try/catch + returning value or error commit de20bbe Author: FluxCapacitor2 <31071265+FluxCapacitor2@users.noreply.github.com> Date: Tue Jan 6 01:58:33 2026 -0500 Add cast methods that enforce correct config type commit 8b45bc0 Author: FluxCapacitor2 <31071265+FluxCapacitor2@users.noreply.github.com> Date: Tue Jan 6 01:22:54 2026 -0500 Reduce duplicate in preprocessing deployment configs received from database commit 6872691 Author: FluxCapacitor2 <31071265+FluxCapacitor2@users.noreply.github.com> Date: Tue Jan 6 01:03:55 2026 -0500 Add explicit `await` Not sure if this changes semantics but it matches the convention of the other functions in the file. Maybe try/catch behavior is different? commit adc6f4f Author: FluxCapacitor2 <31071265+FluxCapacitor2@users.noreply.github.com> Date: Tue Jan 6 00:36:01 2026 -0500 Add generic rethrow in createApp when calling db.app.create after ConflictError handler commit 6c88859 Author: FluxCapacitor2 <31071265+FluxCapacitor2@users.noreply.github.com> Date: Tue Jan 6 00:23:34 2026 -0500 Let Docker populate the TARGETARCH argument automatically Tested on an x86_64 system (TARGETARCH=amd64). Works with `docker build` and from Tilt. Should work on 64-bit ARM systems; won't work on 32-bit ARM since Tini's binary naming convention doesn't line up. Source: https://github.com/BretFisher/multi-platform-docker-build commit 9eebc79 Author: Emma Zheng <zheng861@purdue.edu> Date: Mon Jan 5 19:07:58 2026 -0700 Update trigger and image repository commit c82babe Merge: b15cd63 d1742d2 Author: zheng861 <zheng861@purdue.edu> Date: Fri Jan 2 16:27:27 2026 -0700 Merge branch 'main' into helm-backend commit b15cd63 Author: zheng861 <zheng861@purdue.edu> Date: Fri Jan 2 13:46:29 2026 -0700 Refactor frontend for helm and workload configs - Write types for the form states of configs of different sources - Add helper functions for form state and config generation - Move source or app type-specific code into separate components - Separate DiffInput into DiffInput and DiffSelect for speed commit 5d59f0a Author: zheng861 <zheng861@purdue.edu> Date: Fri Jan 2 12:50:24 2026 -0700 Organize config and diff components by app source commit 0b527be Author: zheng861 <zheng861@purdue.edu> Date: Fri Jan 2 12:15:10 2026 -0700 Fix updateApp, listChart, and helm upgrade commit 2f20e98 Author: zheng861 <zheng861@purdue.edu> Date: Wed Dec 31 18:36:12 2025 -0700 Fix update and deployment bugs commit d092487 Author: zheng861 <zheng861@purdue.edu> Date: Wed Dec 31 15:21:55 2025 -0700 Backend fixes - Add TARGETARCH buildarg to migration job Dockerfile for local testing - Fix workload migration to use correct appType parameter and sequence starting value - Omit id from Workload and Helm configs to avoid confusion - List all missing env vars - Fix incorrect image registry URL - Ignore not found error when deleting a namespace - Fix various API handlers - Fix async error handling during app validation - Do not await deployment process after validation and creating a Deployment - Update git version commit fb022de Author: zheng861 <zheng861@purdue.edu> Date: Fri Dec 26 16:31:18 2025 -0700 Move deployment process logic to DeploymentService commit 359b13a Author: zheng861 <zheng861@purdue.edu> Date: Wed Dec 24 20:26:54 2025 -0700 Merge branch 'main' into helm commit bea8f84 Author: zheng861 <zheng861@purdue.edu> Date: Tue Dec 23 16:40:12 2025 -0700 Write migration for splitting deployment configs by app type commit 8945122 Author: zheng861 <zheng861@purdue.edu> Date: Tue Dec 23 16:39:51 2025 -0700 Update backend with helm configs commit 2e65b5b Author: zheng861 <zheng861@purdue.edu> Date: Mon Dec 22 15:21:56 2025 -0700 Write database migration and refactor createApp/createAppGroup to deploy Helm apps commit c2d329d Author: zheng861 <zheng861@purdue.edu> Date: Sun Dec 21 23:42:32 2025 -0700 Start writing testable deployment controller to handle various app types commit afc4709 Author: zheng861 <zheng861@purdue.edu> Date: Sun Dec 21 18:37:39 2025 -0700 Add Helm config model commit f2289b6 Author: zheng861 <zheng861@purdue.edu> Date: Sat Dec 20 11:48:35 2025 -0700 Write API handler for listing custom charts commit e8c32c0 Merge: a009231 b1bd5b1 Author: zheng861 <zheng861@purdue.edu> Date: Tue Dec 16 12:20:27 2025 -0500 Merge branch 'main' into helm commit a009231 Author: zheng861 <zheng861@purdue.edu> Date: Tue Dec 9 09:12:55 2025 -0500 Move spilo chart to charts commit 9e1fc81 Merge: cac41e7 5d608ed Author: zheng861 <zheng861@purdue.edu> Date: Mon Dec 8 19:26:59 2025 -0500 Merge branch 'main' into helm commit cac41e7 Author: zheng861 <zheng861@purdue.edu> Date: Mon Dec 8 19:07:54 2025 -0500 Install from chart URL commit cfd5a8b Author: zheng861 <zheng861@purdue.edu> Date: Sun Oct 26 10:47:30 2025 -0400 Create postgres chart
1 parent 88a5994 commit 0359008

111 files changed

Lines changed: 5823 additions & 4437 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-publish-anvilops.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,3 @@ jobs:
3939
- name: Log out of container registry (Geddes)
4040
if: always()
4141
run: docker logout geddes-registry.anvil.rcac.purdue.edu
42-
43-
- name: Commit changes
44-
run: |
45-
git config --global user.name "github-actions[bot]"
46-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
47-
git config pull.rebase true
48-
git add infra/anvil/values.yaml infra/geddes/values.yaml
49-
git commit -m "Update image to ${{ github.ref_name }}-${{ github.run_number }}-${{ github.sha }}" || echo "No changes to commit"
50-
git push || git pull && git push
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build and Publish Dockerfile Builder Docker image
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "builders/helm/**"
8+
- ".github/workflows/build-publish-helm-deployer.yml"
9+
workflow_dispatch:
10+
11+
jobs:
12+
push_to_registry:
13+
name: Push Helm Deployer Docker image to Harbor
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
steps:
18+
- name: Check out the repo
19+
uses: actions/checkout@v6
20+
21+
- name: Log in to container registry
22+
run: docker login -u '${{ secrets.DOCKER_USERNAME }}' -p '${{ secrets.DOCKER_PASSWORD }}' registry.anvil.rcac.purdue.edu
23+
24+
- name: Build and push Helm Deployer Docker image
25+
run: docker build --push -t registry.anvil.rcac.purdue.edu/anvilops/helm-deployer:${{ github.ref_name }}-${{ github.run_number }}-${{ github.sha }}${{ github.event_name == 'push' && ' -t registry.anvil.rcac.purdue.edu/anvilops/helm-deployer:latest' || '' }} --cache-from=type=registry,ref=registry.anvil.rcac.purdue.edu/anvilops/helm-deployer:latest --cache-to=type=inline ./builders/helm
26+
27+
- name: Log out of container registry
28+
if: always()
29+
run: docker logout registry.anvil.rcac.purdue.edu
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Build and Publish Staging Docker image
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
push_to_registry:
8+
name: Push AnvilOps Docker image to Harbor (Staging)
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
steps:
13+
- name: Check out the repo
14+
uses: actions/checkout@v6
15+
16+
- name: Log in to container registry
17+
run: docker login -u '${{ secrets.DOCKER_USERNAME_STAGING }}' -p '${{ secrets.DOCKER_PASSWORD_STAGING }}' registry.anvil.rcac.purdue.edu
18+
19+
- name: Build and push AnvilOps Docker image
20+
run: docker build --push -t registry.anvil.rcac.purdue.edu/anvilops-staging/anvilops:${{ github.run_number }}-${{ github.sha }} .
21+
22+
- name: Log out of container registry
23+
if: always()
24+
run: docker logout registry.anvil.rcac.purdue.edu

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Ignore artifacts:
22
charts/**/*.yaml
33
!charts/**/values.yaml
4+
templates/extensions/**/*.yaml
5+
!templates/extensions/**/values.yaml
46
# ^ Prettier doesn't know how to interpret Go templates so it thinks we're writing invalid YAML

backend/.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ DELETE_REPO_PASSWORD=
4141

4242
CURRENT_NAMESPACE=anvilops-dev
4343

44+
CHART_PROJECT_NAME=anvilops-chart
45+
REGISTRY_API_URL=https://registry.anvil.rcac.purdue.edu/api/v2.0
4446
REGISTRY_HOSTNAME=registry.anvil.rcac.purdue.edu
4547

4648
STORAGE_CLASS_NAME=standard

0 commit comments

Comments
 (0)