Skip to content

Commit

Permalink
fix(k8s): force namespace name on cronjobs (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasduteil committed Apr 7, 2021
1 parent 4d462b1 commit 2f30b14
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .k8s/__tests__/__snapshots__/generate-dev.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,13 @@ metadata:
kapp.k14s.io/disable-default-ownership-label-rules: ''
kapp.k14s.io/disable-default-label-scoping-rules: ''
labels:
app: ingester
application: master-dev2-cdtn-admin
owner: cdtn-admin
team: cdtn-admin
cert: wildcard
app: ingester
name: ingester
namespace: cdtn-admin-85-master-dev2
spec:
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 3
Expand Down
3 changes: 2 additions & 1 deletion .k8s/__tests__/__snapshots__/generate-preprod.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,13 @@ metadata:
kapp.k14s.io/disable-default-ownership-label-rules: ''
kapp.k14s.io/disable-default-label-scoping-rules: ''
labels:
app: ingester
application: v1-2-3-cdtn-admin
owner: cdtn-admin
team: cdtn-admin
cert: wildcard
app: ingester
name: ingester
namespace: cdtn-admin-85-preprod-dev2
spec:
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 3
Expand Down
3 changes: 2 additions & 1 deletion .k8s/__tests__/__snapshots__/generate-prod.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,12 @@ metadata:
kapp.k14s.io/disable-default-ownership-label-rules: ''
kapp.k14s.io/disable-default-label-scoping-rules: ''
labels:
app: ingester
application: cdtn-admin
owner: cdtn-admin
team: cdtn-admin
app: ingester
name: ingester
namespace: cdtn-admin
spec:
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 3
Expand Down
10 changes: 4 additions & 6 deletions .k8s/components/ingester.cronjob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,11 @@ const cronJob = new CronJob({
"kapp.k14s.io/disable-default-ownership-label-rules": "",
"kapp.k14s.io/disable-default-label-scoping-rules": "",
}),
labels: merge(
{
app: name,
},
gitlabEnv.labels ?? {}
),
labels: merge(gitlabEnv.labels ?? {}, {
app: name,
}),
name,
namespace: gitlabEnv.namespace.name,
},
spec: {
concurrencyPolicy: "Forbid",
Expand Down

0 comments on commit 2f30b14

Please sign in to comment.