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

feat: suport annotations in the adapter override spec#1395

Merged
tzununbekov merged 4 commits into
triggermesh:mainfrom
knechtionscoding:feat/support-annotations-adapteroverride
Apr 21, 2023
Merged

feat: suport annotations in the adapter override spec#1395
tzununbekov merged 4 commits into
triggermesh:mainfrom
knechtionscoding:feat/support-annotations-adapteroverride

Conversation

@knechtionscoding

Copy link
Copy Markdown
Contributor

Allows support for Annotations in the adapterOverride spec

closes #1394

@knechtionscoding

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

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

@tzununbekov

Copy link
Copy Markdown
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
@knechtionscoding knechtionscoding deleted the feat/support-annotations-adapteroverride branch April 21, 2023 10:25
@knechtionscoding

Copy link
Copy Markdown
Contributor Author

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

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.

AdapterOverrides should support Annotations alongside Labels

2 participants