|
2 | 2 | inputs,
|
3 | 3 | cell,
|
4 | 4 | }: let
|
5 |
| - inherit (inputs) bitte-cells; |
| 5 | + inherit (inputs) bitte-cells cells; |
6 | 6 | in {
|
7 | 7 | # Bitte Hydrate Module
|
8 | 8 | # -----------------------------------------------------------------------
|
|
15 | 15 | imports = [
|
16 | 16 | (bitte-cells.patroni.hydrationProfiles.hydrate-cluster ["prod"])
|
17 | 17 | (bitte-cells.tempo.hydrationProfiles.hydrate-cluster ["prod"])
|
| 18 | + (cells.perf.hydrationProfile.workload-policies-postgrest) |
18 | 19 | ];
|
19 | 20 |
|
20 | 21 | # NixOS-level hydration
|
|
37 | 38 | nomad.namespaces = {
|
38 | 39 | prod = {description = "CI Prod";};
|
39 | 40 | baremetal = {description = "CI Baremetal Builders";};
|
| 41 | + perf = {description = "CI Performance Benchmarking";}; |
40 | 42 | };
|
41 | 43 | };
|
42 | 44 |
|
|
55 | 57 | policies = ["cicero"];
|
56 | 58 | };
|
57 | 59 |
|
| 60 | + resource.vault_github_team.performance-tracing = { |
| 61 | + backend = "\${vault_github_auth_backend.employee.path}"; |
| 62 | + team = "performance-tracing"; |
| 63 | + policies = ["perf"]; |
| 64 | + }; |
| 65 | + |
58 | 66 | locals.policies = {
|
59 | 67 | consul.developer.servicePrefix."marlowe-" = {
|
60 | 68 | policy = "write";
|
@@ -119,6 +127,20 @@ in {
|
119 | 127 | "pki/roles/client" = [r];
|
120 | 128 | "sys/capabilities-self" = [u];
|
121 | 129 | };
|
| 130 | + |
| 131 | + perf.path = caps { |
| 132 | + "auth/token/lookup" = [u]; |
| 133 | + "auth/token/lookup-self" = [r]; |
| 134 | + "auth/token/renew-self" = [u]; |
| 135 | + "sys/capabilities-self" = [u]; |
| 136 | + "kv/data/perf/*" = [r l]; |
| 137 | + "kv/metadata/perf/*" = [r l]; |
| 138 | + "nomad/creds/perf" = [r u]; |
| 139 | + "consul/creds/developer" = [r u]; |
| 140 | + "sops/keys/dev" = [r l]; |
| 141 | + "sops/decrypt/dev" = [r u l]; |
| 142 | + "sops/encrypt/dev" = [r u l]; |
| 143 | + }; |
122 | 144 | };
|
123 | 145 |
|
124 | 146 | nomad = {
|
@@ -204,6 +226,31 @@ in {
|
204 | 226 | };
|
205 | 227 | host_volume."marlowe".policy = "write";
|
206 | 228 | };
|
| 229 | + |
| 230 | + perf = { |
| 231 | + description = "Performance tracing and benchmarking policies"; |
| 232 | + |
| 233 | + namespace."*".policy = "deny"; |
| 234 | + |
| 235 | + namespace."perf" = { |
| 236 | + policy = "write"; |
| 237 | + capabilities = [ |
| 238 | + "alloc-exec" |
| 239 | + "alloc-lifecycle" |
| 240 | + "dispatch-job" |
| 241 | + "list-jobs" |
| 242 | + "list-scaling-policies" |
| 243 | + "read-fs" |
| 244 | + "read-job" |
| 245 | + "read-job-scaling" |
| 246 | + "read-logs" |
| 247 | + "read-scaling-policy" |
| 248 | + "scale-job" |
| 249 | + "submit-job" |
| 250 | + ]; |
| 251 | + }; |
| 252 | + node.policy = "read"; |
| 253 | + }; |
207 | 254 | };
|
208 | 255 | };
|
209 | 256 | };
|
|
0 commit comments