Skip to content

Commit

Permalink
ScaledJob: support metadata labels in Job template (#1686)
Browse files Browse the repository at this point in the history
  • Loading branch information
zroubalik authored Mar 18, 2021
1 parent 991323a commit 66c29f8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
- Add `publishRate` trigger to RabbitMQ scaler ([#1653](https://github.com/kedacore/keda/pull/1653))
- AWS SQS Scaler: Add Visible + NotVisible messages for scaling considerations ([#1664](https://github.com/kedacore/keda/pull/1664))
- Fixing behavior on ScaledJob with incorrect External Scaler ([#1672](https://github.com/kedacore/keda/pull/1672))
- ScaledJob: support metadata labels in Job template ([#1686](https://github.com/kedacore/keda/pull/1686))

### Breaking Changes

Expand Down
3 changes: 1 addition & 2 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ resources:
- bases/keda.sh_clustertriggerauthentications.yaml
# +kubebuilder:scaffold:crdkustomizeresource

## ScaledJob CRD needs to be patched because of an issue with required properties
## https://github.com/kedacore/keda/issues/927
## ScaledJob CRD needs to be patched because for some usecases (details in the patch file)
patchesJson6902:
- target:
version: v1
Expand Down
8 changes: 8 additions & 0 deletions config/crd/patches/scaledjob_patch.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
## needs to be patched because of an issue with required properties in order to be able to deploy on k8s 1.18+
## https://github.com/kedacore/keda/issues/927
- op: add
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/jobTargetRef/properties/template/properties/spec/properties/containers/items/properties/ports/items/required/-
value: protocol
Expand All @@ -10,3 +12,9 @@
- op: add
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/jobTargetRef/properties/template/properties/spec/properties/initContainers/items/properties/ports/items/required/-
value: protocol

## needs to be patched because of an issue with controller-gen, which is not including anything in metadata from nested contructs
## https://github.com/kedacore/keda/issues/1311
- op: add
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/jobTargetRef/properties/template/properties/metadata/x-kubernetes-preserve-unknown-fields
value: true

0 comments on commit 66c29f8

Please sign in to comment.