-
Notifications
You must be signed in to change notification settings - Fork 244
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
Use a separate files for Kubernetes resources #4886
Comments
@kadel - would you agree a consequence of refactoring into a separate yaml file, referenced by 'uri' would be that devfile variable substitution can no longer be performed ? Not sure yet what percentage of the time you'd want this, but it suggests maybe there should be an option to inline the included component in the original file? Or could there be some other mechanism to "parameterize" the database.yaml in this example with a variable value? And maybe I'm thinking about this wrong... if it's odo generating the yaml how would it know to parameterize it with a devfile variable? I probably just answered my own question but will leave the comment in case it's interesting. |
I need to verify that.
odo is not generating variables in devfile, and even with the current approach if you want to use variables in inlined Kubernetes manifest you would have to go and edit it manually. I don't expect that using variables in kubernetes resources is something that odo users would do. This will be more common for people writing stacks. If there is a need for using inlined manifest, we can introduce |
URI: https://docs.devfile.io/devfile/2.1.0/user-guide/api-reference.html Default should be URI with an option to let user specify inlined. |
/triage needs-information |
Few notes:
/triage needs-information Set triage to ready if there's nothing missing in terms of acceptance criteria. |
Why not use the existing What about tracking the file(s) via VCS? Putting it under
Would
What about What about odo service create --from-file /path/to/some-file.yaml odo should copy it over to OTOH, if a user tries to do below, what would odo do? odo service create --from-file .kubernetes/some-file.yaml
|
The files are there so other tools to use it, or for example for users to modify it. Also, the directory should not by default. The whole point of this is to make the files visible for users.
It will be up to the user whatever he/she wants to include it in
This looks ok.
odo can even try to convert it to the same name pattern as other files. It has all the necessary information.
Throw an error |
@dharmit Do we add these acceptance criteria?
|
I don't know, tbh. Do we need really this flag in odo commands? The way I understand things is if there's a devfile that has inlined k8s components, odo will create those just the way it does now. But as far as I haven't looked deep into the variable thing mentioned in #4886 (comment). But does odo support configuring variables yet? odo should. But that's a separate issue, IMO. Having @kadel wdyt?
Yes. 👍🏾 |
I think that having an Also, there is only a little extra work needed to implement this flag, we already have all the necessary functionality for this. |
The file schema of URI is not supported in the devfile api yet according to devfile/api#321 (comment) |
The scheme uses URI references and not absolute URIs. |
/kind user-story
User Story
As an odo user, I want to have Kubernetes resources in a separate file to easily review them or use 3rd party tools to deploy them.
Acceptance Criteria
odo link
should putServiceBinding
into a separate file and useuri
to reference it inkubernetes
devfile component.odo service create
should put service CR into a separate file and useuri
to reference it inkubernetes
devfile component.--inlined
implementation notes:
./kubernetes/
by default. This directory should be configurable using global odo preference.odo service list
orodo describe
needs to be able to handle a situation whenkubernetes
component is referenced usinguri
field.example
Instead of inlining Operator CR into a devfile it will create
kubernetes
directory (if it doesn't already exist) and save Operator CR tokubernetes/database.yaml
Than it will add it as a
kubernetes
component into a devfile.yaml/kind user-story
The text was updated successfully, but these errors were encountered: