Skip to content

Commit 5c5a0b0

Browse files
authored
chore: add fixtures for job and pod (#29)
* chore: add fixtures for job and pod * chore: create more queues * chore: fix region arg in tests * fix: parse metadata correctly * chore: fix job fixture name * chore: fix job metadata retention
1 parent 33cb92e commit 5c5a0b0

11 files changed

Lines changed: 187 additions & 9701 deletions

File tree

.github/workflows/test.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,3 @@ jobs:
6060
6161
- name: Run Tests
6262
run: make test
63-
#env:
64-
#AWS_ACCESS_KEY_ID: "test"
65-
#AWS_SECRET_ACCESS_KEY: "test"
66-
#AWS_DEFAULT_REGION: "us-east-1"

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,8 @@ manifests: controller-gen
108108
$(CONTROLLER_GEN) object paths="./pkg/apis/..."
109109
$(CONTROLLER_GEN) crd paths="./pkg/apis/..." output:crd:artifacts:config=chart/crds
110110
yq -i 'del(.. | .description? | select(.))' chart/crds/batch.flanksource.com_batchtriggers.yaml
111+
# IMPORTANT: This is to preserve metadata for pod and job spec, without it metadata does not get parsed from batch trigger spec
112+
yq -i '(.spec.versions[].schema.openAPIV3Schema.properties.spec.properties.pod.properties.metadata.x-kubernetes-preserve-unknown-fields) = true' chart/crds/batch.flanksource.com_batchtriggers.yaml
113+
yq -i '(.spec.versions[].schema.openAPIV3Schema.properties.spec.properties.job.properties.metadata.x-kubernetes-preserve-unknown-fields) = true' chart/crds/batch.flanksource.com_batchtriggers.yaml
114+
yq -i '(.spec.versions[].schema.openAPIV3Schema.properties.spec.properties.job.properties.spec.properties.template.properties.metadata.x-kubernetes-preserve-unknown-fields) = true' chart/crds/batch.flanksource.com_batchtriggers.yaml
111115

chart/crds/batch.flanksource.com_batchtriggers.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,7 @@ spec:
828828
type: string
829829
metadata:
830830
type: object
831+
x-kubernetes-preserve-unknown-fields: true
831832
spec:
832833
properties:
833834
activeDeadlineSeconds:
@@ -948,6 +949,7 @@ spec:
948949
properties:
949950
metadata:
950951
type: object
952+
x-kubernetes-preserve-unknown-fields: true
951953
spec:
952954
properties:
953955
activeDeadlineSeconds:
@@ -4833,6 +4835,7 @@ spec:
48334835
type: string
48344836
metadata:
48354837
type: object
4838+
x-kubernetes-preserve-unknown-fields: true
48364839
spec:
48374840
properties:
48384841
activeDeadlineSeconds:

0 commit comments

Comments
 (0)