-
Notifications
You must be signed in to change notification settings - Fork 243
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
Add support for parsing multiple k8s definition in a single Devfile K8s component #6372
Add support for parsing multiple k8s definition in a single Devfile K8s component #6372
Conversation
✅ Deploy Preview for odo-docusaurus-preview canceled.
|
847f18e
to
eec32f0
Compare
/retest |
if err != nil { | ||
continue | ||
} | ||
// We default to the first object in the list because as far as ServiceBinding is concerned, | ||
// we assume that only one resource will be defined for the Devfile K8s component; which is true | ||
unstructuredObj := unstructuredObjs[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check that len(unstructuredObjs) > 0 before, or this will panic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's unlikely that the list will ever be empty. I've tried to run the remove binding command on non-existent bindings and it's never panicked. But you're right, I'll add the check to be on the safe side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One should never under-estimate the imagination of users ...
…ariablesSubstituted
…ests in a single k8s component Signed-off-by: Parthvi Vala <pvala@redhat.com>
…component/adapter.go
…tK8sComponentAsUnstructured
…ed for the component
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
eec32f0
to
c332ad5
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
What type of PR is this:
/kind feature
What does this PR do / why we need it:
This PR adds support for parsing multiple k8s resources defined inside a single yaml against a Devfile K8s component.
Which issue(s) this PR fixes:
Fixes #6275
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer: