Skip to content

Commit 15488a0

Browse files
committed
Merge branch 'main' into graphql-schema-v1
2 parents 69f4dd8 + 290e2c1 commit 15488a0

37 files changed

+6632
-1422
lines changed

.configs/mockery.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ packages:
1313
github.com/nais/api/internal/resourceusage:
1414
interfaces:
1515
Client:
16-
github.com/nais/api/internal/thirdparty/dependencytrack:
16+
github.com/nais/api/internal/vulnerabilities:
1717
interfaces:
1818
InternalClient:
19+
Prometheus:
1920
github.com/nais/api/internal/database:
2021
interfaces:
2122
Database:

cmd/setup_local/main.go

-8
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,10 @@ type seedConfig struct {
3737
NumTeams *int
3838
NumOwnersPerTeam *int
3939
NumMembersPerTeam *int
40-
VulnSeed *VulnSeed
4140
ForceSeed *bool
4241
ProvisionPubSub *bool
4342
}
4443

45-
type VulnSeed struct {
46-
NumVulnAppsForTeam *int
47-
NumVulnPerApp *int
48-
}
49-
5044
func newSeedConfig(ctx context.Context) (*seedConfig, error) {
5145
cfg := &seedConfig{}
5246
err := envconfig.Process(ctx, cfg)
@@ -60,8 +54,6 @@ func newSeedConfig(ctx context.Context) (*seedConfig, error) {
6054
cfg.NumMembersPerTeam = flag.Int("members", 10, "number of members per team")
6155
cfg.ForceSeed = flag.Bool("force", false, "seed regardless of existing database content")
6256
cfg.ProvisionPubSub = flag.Bool("provision_pub_sub", true, "set up pubsub credentials")
63-
cfg.VulnSeed.NumVulnAppsForTeam = flag.Int("vuln-apps", 5, "number of vulnerable apps per team")
64-
cfg.VulnSeed.NumVulnPerApp = flag.Int("vuln-per-app", 10, "number of vulnerabilities per app")
6557
flag.Parse()
6658

6759
return cfg, nil

data/k8s/dev/devteam/deploy-canary.yaml

+10-10
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ spec:
2323
env:
2424
- name: DEPLOY_START
2525
value: "1704981602000000000"
26-
image: ghcr.io/nais/testapp/testapp:2020-02-25-f61e7b7
26+
image: ghcr.io/nais/nais-deploy-canary-1:1
2727
liveness:
2828
path: /ping
2929
port: 8080
@@ -104,7 +104,7 @@ spec:
104104
env:
105105
- name: DEPLOY_START
106106
value: "1704981602000000000"
107-
image: ghcr.io/nais/testapp/testapp:2020-02-25-f61e7b7
107+
image: ghcr.io/nais/testapp:1
108108
liveness:
109109
path: /ping
110110
port: 8080
@@ -194,7 +194,7 @@ spec:
194194
env:
195195
- name: DEPLOY_START
196196
value: "1704981602000000000"
197-
image: ghcr.io/nais/testapp/testapp:2020-02-25-f61e7b7
197+
image: ghcr.io/nais/nais-deploy-chicken-1:1
198198
liveness:
199199
path: /ping
200200
port: 8080
@@ -264,7 +264,7 @@ spec:
264264
env:
265265
- name: DEPLOY_START
266266
value: "1704981602000000000"
267-
image: ghcr.io/nais/testapp/testapp:2020-02-25-f61e7b7
267+
image: ghcr.io/nais/nais-deploy-chicken-2:1
268268
liveness:
269269
path: /ping
270270
port: 8080
@@ -334,7 +334,7 @@ spec:
334334
env:
335335
- name: DEPLOY_START
336336
value: "1704981602000000000"
337-
image: ghcr.io/nais/testapp/testapp:2020-02-25-f61e7b7
337+
image: ghcr.io/nais/nais-deploy-chicken-3:1
338338
liveness:
339339
path: /ping
340340
port: 8080
@@ -473,7 +473,7 @@ spec:
473473
env:
474474
- name: DEPLOY_START
475475
value: "1704981602000000000"
476-
image: ghcr.io/nais/testapp/testapp:2020-02-25-f61e7b7
476+
image: ghcr.io/nais/nais-deploy-chicken-4:1
477477
liveness:
478478
path: /ping
479479
port: 8080
@@ -543,7 +543,7 @@ spec:
543543
env:
544544
- name: DEPLOY_START
545545
value: "1704981602000000000"
546-
image: ghcr.io/nais/testapp/testapp:2020-02-25-f61e7b7
546+
image: ghcr.io/nais/nais-deploy-chicken-5:1
547547
liveness:
548548
path: /ping
549549
port: 8080
@@ -613,7 +613,7 @@ spec:
613613
env:
614614
- name: DEPLOY_START
615615
value: "1704981602000000000"
616-
image: ghcr.io/nais/testapp/testapp:2020-02-25-f61e7b7
616+
image: ghcr.io/nais/nais-deploy-chicken-6:1
617617
liveness:
618618
path: /ping
619619
port: 8080
@@ -683,7 +683,7 @@ spec:
683683
env:
684684
- name: DEPLOY_START
685685
value: "1704981602000000000"
686-
image: ghcr.io/nais/testapp/testapp:2020-02-25-f61e7b7
686+
image: ghcr.io/nais/nais-deploy-chicken-7:1
687687
liveness:
688688
path: /ping
689689
port: 8080
@@ -753,7 +753,7 @@ spec:
753753
env:
754754
- name: DEPLOY_START
755755
value: "1704981602000000000"
756-
image: ghcr.io/nais/testapp/testapp:2020-02-25-f61e7b7
756+
image: ghcr.io/nais/nais-deploy-chicken-8:1
757757
liveness:
758758
path: /ping
759759
port: 8080

data/k8s/dev/devteam/naisjob.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ spec:
2626
gcp:
2727
buckets:
2828
- name: dataproduct-apps-topics2
29-
image: europe-north1-docker.pkg.dev/nais-io/nais/images/console-frontend:2024-06-06-144439-4d5bb22
29+
image: ghcr.io/nais/dataproduct-apps-topics:v1
3030
liveness:
3131
path: /isHealthy
3232
readiness:
@@ -94,7 +94,7 @@ spec:
9494
gcp:
9595
buckets:
9696
- name: dataproduct-apps-topics2
97-
image: europe-north1-docker.pkg.dev/nais-io/nais/images/dataproduct-apps:20240105223344-c0b3968
97+
image: ghcr.io/nais/dataproduct-naisjobs-topics:v1
9898
liveness:
9999
path: /isHealthy
100100
readiness:

data/k8s/superprod/devteam/deploy-canary.yaml

+21-11
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ spec:
2323
env:
2424
- name: DEPLOY_START
2525
value: "1704981602000000000"
26-
image: ghcr.io/nais/testapp/testapp:2020-02-25-f61e7b7
26+
image: ghcr.io/nais/nais-deploy-canary-1:1
2727
liveness:
2828
path: /ping
2929
port: 8080
@@ -33,8 +33,15 @@ spec:
3333
readiness:
3434
path: /ping
3535
replicas:
36-
max: 1
36+
max: 69
3737
min: 1
38+
scalingStrategy:
39+
cpu:
40+
thresholdPercentage: 50
41+
kafka:
42+
topic: "bjørntore"
43+
consumerGroup: "kalleper"
44+
threshold: 80
3845
resources:
3946
limits:
4047
cpu: 250m
@@ -43,6 +50,9 @@ spec:
4350
cpu: 100m
4451
memory: 128Mi
4552
skipCaBundle: true
53+
redis:
54+
- instance: contests
55+
access: readwrite
4656
status:
4757
conditions:
4858
- lastTransitionTime: "2024-01-11T14:00:04Z"
@@ -94,7 +104,7 @@ spec:
94104
env:
95105
- name: DEPLOY_START
96106
value: "1704981602000000000"
97-
image: ghcr.io/nais/testapp/testapp:2020-02-25-f61e7b7
107+
image: ghcr.io/nais/nais-deploy-chicken:1
98108
liveness:
99109
path: /ping
100110
port: 8080
@@ -184,7 +194,7 @@ spec:
184194
env:
185195
- name: DEPLOY_START
186196
value: "1704981602000000000"
187-
image: ghcr.io/nais/testapp/testapp:2020-02-25-f61e7b7
197+
image: ghcr.io/nais/nais-deploy-chicken-1:1
188198
liveness:
189199
path: /ping
190200
port: 8080
@@ -254,7 +264,7 @@ spec:
254264
env:
255265
- name: DEPLOY_START
256266
value: "1704981602000000000"
257-
image: ghcr.io/nais/testapp/testapp:2020-02-25-f61e7b7
267+
image: ghcr.io/nais/nais-deploy-chicken-2:1
258268
liveness:
259269
path: /ping
260270
port: 8080
@@ -324,7 +334,7 @@ spec:
324334
env:
325335
- name: DEPLOY_START
326336
value: "1704981602000000000"
327-
image: ghcr.io/nais/testapp/testapp:2020-02-25-f61e7b7
337+
image: ghcr.io/nais/nais-deploy-chicken-3:1
328338
liveness:
329339
path: /ping
330340
port: 8080
@@ -463,7 +473,7 @@ spec:
463473
env:
464474
- name: DEPLOY_START
465475
value: "1704981602000000000"
466-
image: ghcr.io/nais/testapp/testapp:2020-02-25-f61e7b7
476+
image: ghcr.io/nais/nais-deploy-chicken-4:1
467477
liveness:
468478
path: /ping
469479
port: 8080
@@ -533,7 +543,7 @@ spec:
533543
env:
534544
- name: DEPLOY_START
535545
value: "1704981602000000000"
536-
image: ghcr.io/nais/testapp/testapp:2020-02-25-f61e7b7
546+
image: ghcr.io/nais/nais-deploy-chicken-5:1
537547
liveness:
538548
path: /ping
539549
port: 8080
@@ -603,7 +613,7 @@ spec:
603613
env:
604614
- name: DEPLOY_START
605615
value: "1704981602000000000"
606-
image: ghcr.io/nais/testapp/testapp:2020-02-25-f61e7b7
616+
image: ghcr.io/nais/nais-deploy-chicken-6:1
607617
liveness:
608618
path: /ping
609619
port: 8080
@@ -673,7 +683,7 @@ spec:
673683
env:
674684
- name: DEPLOY_START
675685
value: "1704981602000000000"
676-
image: ghcr.io/nais/testapp/testapp:2020-02-25-f61e7b7
686+
image: ghcr.io/nais/nais-deploy-chicken-7:1
677687
liveness:
678688
path: /ping
679689
port: 8080
@@ -743,7 +753,7 @@ spec:
743753
env:
744754
- name: DEPLOY_START
745755
value: "1704981602000000000"
746-
image: ghcr.io/nais/testapp/testapp:2020-02-25-f61e7b7
756+
image: ghcr.io/nais/nais-deploy-chicken-8:1
747757
liveness:
748758
path: /ping
749759
port: 8080
+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
---
2+
apiVersion: nais.io/v1
3+
kind: Naisjob
4+
metadata:
5+
annotations:
6+
deploy.nais.io/client-version: 2023-12-19-bbbb39b
7+
deploy.nais.io/github-actor: jhrv
8+
deploy.nais.io/github-sha: c0b39684d253c19e39fd0afeecf203aef943fe7b
9+
deploy.nais.io/github-workflow-run-url: https://github.com/nais/dataproduct-apps/actions/runs/7427397068
10+
kubernetes.io/change-cause: "nais deploy: commit c0b39684d253c19e39fd0afeecf203aef943fe7b:
11+
https://github.com/nais/dataproduct-apps/actions/runs/7427397068"
12+
nais.io/deploymentCorrelationID: 54c600b1-c2a6-4018-9fb3-649df7a8920d
13+
creationTimestamp: "2022-07-06T09:45:17Z"
14+
finalizers:
15+
- naiserator.nais.io/finalizer
16+
generation: 243
17+
name: dataproduct-apps-topics
18+
resourceVersion: "4085586970"
19+
uid: 3152cb5a-95f5-4418-8bd2-13b6d9f6058f
20+
spec:
21+
command:
22+
- dataproduct-apps-topics
23+
gcp:
24+
buckets:
25+
- name: dataproduct-apps-topics2
26+
image: ghcr.io/nais/dataproduct-apps-topics:v1
27+
liveness:
28+
path: /isHealthy
29+
readiness:
30+
path: /isReady
31+
schedule: 45 3 * * *
32+
envFrom:
33+
- secret: my-secret
34+
- secret: my-other-secret
35+
filesFrom:
36+
- mountPath: /var/run/secrets
37+
secret: my-secret
38+
status:
39+
conditions:
40+
- lastTransitionTime: "2024-01-05T22:35:39Z"
41+
message: complete
42+
reason: RolloutComplete
43+
status: "True"
44+
type: Ready
45+
- lastTransitionTime: "2024-01-05T22:35:39Z"
46+
message: complete
47+
reason: RolloutComplete
48+
status: "False"
49+
type: Stalled
50+
- lastTransitionTime: "2024-01-05T22:35:39Z"
51+
message: complete
52+
reason: RolloutComplete
53+
status: "False"
54+
type: Reconciling
55+
correlationID: 54c600b1-c2a6-4018-9fb3-649df7a8920d
56+
deploymentRolloutStatus: complete
57+
rolloutCompleteTime: 1704838357272567094
58+
synchronizationHash: 6e0cb332b94540ec
59+
synchronizationState: RolloutComplete
60+
synchronizationTime: 1704838351872468010
61+
---
62+
apiVersion: nais.io/v1
63+
kind: Naisjob
64+
metadata:
65+
annotations:
66+
deploy.nais.io/client-version: 2023-12-19-bbbb39b
67+
deploy.nais.io/github-actor: jhrv
68+
deploy.nais.io/github-sha: c0b39684d253c19e39fd0afeecf203aef943fe7b
69+
deploy.nais.io/github-workflow-run-url: https://github.com/nais/dataproduct-apps/actions/runs/7427397068
70+
kubernetes.io/change-cause: "nais deploy: commit c0b39684d253c19e39fd0afeecf203aef943fe7b:
71+
https://github.com/nais/dataproduct-apps/actions/runs/7427397068"
72+
nais.io/deploymentCorrelationID: 54c600b1-c2a6-4018-9fb3-649df7a8920d
73+
creationTimestamp: "2022-07-06T09:45:17Z"
74+
finalizers:
75+
- naiserator.nais.io/finalizer
76+
generation: 243
77+
name: dataproduct-naisjobs-topics
78+
resourceVersion: "4085586970"
79+
uid: 3152cb5a-95f5-4418-8bd2-13b6d9f6058f
80+
spec:
81+
command:
82+
- dataproduct-apps-topics
83+
gcp:
84+
buckets:
85+
- name: dataproduct-apps-topics2
86+
image: ghcr.io/nais/dataproduct-naisjobs-topics:v1
87+
liveness:
88+
path: /isHealthy
89+
readiness:
90+
path: /isReady
91+
schedule: 45 3 * * *
92+
envFrom:
93+
- secret: other-secret
94+
status:
95+
conditions:
96+
- lastTransitionTime: "2024-01-05T22:35:39Z"
97+
message: complete
98+
reason: RolloutComplete
99+
status: "True"
100+
type: Ready
101+
- lastTransitionTime: "2024-01-05T22:35:39Z"
102+
message: complete
103+
reason: RolloutComplete
104+
status: "False"
105+
type: Stalled
106+
- lastTransitionTime: "2024-01-05T22:35:39Z"
107+
message: complete
108+
reason: RolloutComplete
109+
status: "False"
110+
type: Reconciling
111+
correlationID: 54c600b1-c2a6-4018-9fb3-649df7a8920d
112+
deploymentRolloutStatus: complete
113+
rolloutCompleteTime: 1704838357272567094
114+
synchronizationHash: 6e0cb332b94540ec
115+
synchronizationState: RolloutComplete
116+
synchronizationTime: 1704838351872468010

0 commit comments

Comments
 (0)