Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

Add support for setting adapter tolerations#774

Merged
antoineco merged 1 commit into
triggermesh:mainfrom
antoineco:adapter-tolerations
Apr 22, 2022
Merged

Add support for setting adapter tolerations#774
antoineco merged 1 commit into
triggermesh:mainfrom
antoineco:adapter-tolerations

Conversation

@antoineco

@antoineco antoineco commented Apr 21, 2022

Copy link
Copy Markdown
Contributor

Addresses one of the features requested in #768.

Example:

spec:
  # ...
  adapterOverrides:
    tolerations:
    - key: example-key
      operator: Exists
      effect: NoSchedule

Result:

$ kubectl get deployment awssqssource-sample -o jsonpath='{.spec.template.spec.tolerations}'
[{"effect":"NoSchedule","key":"example-key","operator":"Exists"}]

@antoineco antoineco marked this pull request as ready for review April 21, 2022 22:38
@antoineco antoineco requested a review from tzununbekov April 21, 2022 22:38

@tzununbekov tzununbekov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, great timing for adapter overrides!
One thought that I had after adding the initial set of attributes: what do you think about making adapterOverrides object in the CRD accept arbitrary data and move the verification logic to the webhook? That would significantly reduce the number of changes required by this kind of simple update.

@antoineco

Copy link
Copy Markdown
Contributor Author

That is true, I'm just not very familiar with the webhook implementation. I guess we would just need to put the initial effort into adding _validation.go files for each type?

@tzununbekov

Copy link
Copy Markdown
Member

Yes, adding Validate methods for our resources in _validate.go and listing them in webhook's types should do the thing.

@antoineco

Copy link
Copy Markdown
Contributor Author

OK let's follow up on that.

@antoineco antoineco merged commit 1804c14 into triggermesh:main Apr 22, 2022
@antoineco antoineco deleted the adapter-tolerations branch April 22, 2022 09:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants