Skip to content

Commit 775a0a2

Browse files
authored
[Refactor] DCR Monitor Refactoring (2/N) (#19)
2/N PR for a major refactoring of DCR Monitor. See #15. 1/N: #16 # Changes * Remove "UpdateJobStatus" endpoint from the API. Everything must be handled in the reconciler instead. * Added `imagebuilder` interface, which currently has one image builder implementation which is Kaniko * Moved `RunJob` logic into the reconciler. Now TEE is launched by the reconciler via `LaunchInstance` method in `TEEProvider`. * Removed bunch of shallow interfaces from `Config`. Removed bunch of unnecessary global configs, and made them local. * Completely removed KMS logic. We don't need user keys and stage1/stage2 keys in the open source version * Completely removed `PrepareResourcesForUser`. Any logic needed for TEE should go to `TEEProvider`. * Removed `project_number` from config, because it is not needed anymore. * Removed logic for creating/updating workload identity pool provider. It's not used any longer so let's revisit later when we implement data confidentiality. # Caveat * This still doesn't support getting attestation report. # Testing Added unit tests, and also did manual end-to-end testing.
1 parent 5f7bfba commit 775a0a2

File tree

33 files changed

+488
-2069
lines changed

33 files changed

+488
-2069
lines changed

.env.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ env=""
22
mysql_username=""
33
mysql_password=""
44
project_id=""
5-
project_number=""
65
region=""
76
zone=""

BUILD

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ load(
44
"//:config.bzl",
55
"deploy_env",
66
"gcp_project_id",
7-
"gcp_project_number",
87
"gcp_region",
98
"gcp_zone",
109
"registry_api_image",
@@ -20,7 +19,6 @@ sh_binary(
2019
srcs = [":generate_app_config_file.sh"],
2120
args = [
2221
gcp_project_id,
23-
gcp_project_number,
2422
deploy_env,
2523
gcp_region,
2624
gcp_zone,
@@ -31,9 +29,8 @@ genrule(
3129
name = "generate_app_config",
3230
srcs = [],
3331
outs = ["config.yaml"],
34-
cmd = "$(location :generate_app_config_sh) {} {} {} {} {} > $(OUTS)".format(
32+
cmd = "$(location :generate_app_config_sh) {} {} {} {} > $(OUTS)".format(
3533
gcp_project_id,
36-
gcp_project_number,
3734
deploy_env,
3835
gcp_region,
3936
gcp_zone,

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ env="dev" # the deployment environment
8888
mysql_username="mockname" # mysql database username
8989
mysql_password="mockpwd" # mysql database password
9090
project_id="you project id" # gcp project id
91-
project_number="1310xxxx092" # gcp project number
9291
region="" # the region that the resources created in
9392
zone="" # the zone that the resources created in
9493
```

app/dcr_api/biz/handler/job/job_handler.go

Lines changed: 0 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)