Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScaledJob: support metadata labels in Job template #1686

Merged
merged 2 commits into from
Mar 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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