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

feat: suport annotations in the adapter override spec #1395

Merged
merged 4 commits into from
Apr 21, 2023
Merged

feat: suport annotations in the adapter override spec #1395

merged 4 commits into from
Apr 21, 2023

Conversation

knechtionscoding
Copy link
Contributor

Allows support for Annotations in the adapterOverride spec

closes #1394

@knechtionscoding
Copy link
Contributor Author

I didn't see any specific tests for these files (but I'm happy to add them if they are just structured differently).

@tzununbekov
Copy link
Member

Hey @knechtionscoding, thanks for the contribution!
You need to update CRDs to make new attributes available in the components' specifications. We have a Python script to propagate these changes automatically, all you have to do is update hack/crd-update/crd-update.py:

diff --git a/hack/crd-update/crd-update.py b/hack/crd-update/crd-update.py
index 6f78d5a4..855dc14b 100755
--- a/hack/crd-update/crd-update.py
+++ b/hack/crd-update/crd-update.py
@@ -17,6 +17,11 @@ try:
           description: Kubernetes object parameters to apply on top of default adapter values.
           type: object
           properties:
+            annotations:
+              description: Adapter annotations.
+              type: object
+              additionalProperties:
+                type: string
             labels:
               description: Adapter labels.
               type: object

then run ./hack/crd-update/update-all-crds.sh and commit all changes after the script finishes its job.

Regarding the tests. There is a totally outdated and inefficient TestAdapterOverrideOptions, and we need to make it relevant someday, meanwhile, the easy path is to add (Pod)Annotation objectOption in deployment_test.go and knservice_test.go to validate its effect on the adapter.

@knechtionscoding
Copy link
Contributor Author

@tzununbekov I think I've got all of that done, let me know if there's anything left!

@tzununbekov
Copy link
Member

Yes, perfect! I forgot about the codegen update, so I took care of it to get this PR merged today. Thanks!

@tzununbekov tzununbekov merged commit 617c8a2 into triggermesh:main Apr 21, 2023
11 checks passed
@knechtionscoding knechtionscoding deleted the feat/support-annotations-adapteroverride branch April 21, 2023 10:25
@knechtionscoding
Copy link
Contributor Author

Appreciate the help to get it over the finish line @tzununbekov !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AdapterOverrides should support Annotations alongside Labels
2 participants