-
Notifications
You must be signed in to change notification settings - Fork 772
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
Investigate a preference file #39
Comments
@ngtuna What will be group in preference file used for? We don't need to add command line flags to chose between group, do we? |
@Gnouc yes we don't need flags in preference file. Let's go first with provider and default objects to be generated. Then we can discuss what should be added more. |
@ngtuna i would like to work on this issue! Some questions regarding this, with prefernce file are we gonna have alternative to all the command line flags(not in the immediate PR but in the long run)? |
@surajssd the original idea was to use this to create some profiles that would define defaults behavior. kind of like for example
then maybe calling things like --f, --q, --stdout,--y etc...don't need to change. They could be set in the context to shorten the kompose command but right now, I don't see it as necessary. The big feature is to be able to switch provider but keep the |
@surajssd great to know you're stepping forward with this. I don't think we are gonna have alternative to all flags. Basically preference file is a kind of
Look at the example file I put above. Right now we are relying on kubectl configuration at ~/.kube/config. I'm not really sure but somehow IMO we should put API endpoint and authentication info into preference file as well. |
@ngtuna sure that example file is a great reference, on which I can base my work on! We can add more things going forward! |
@ngtuna about file format why can't the file format be This will also need more feedback from all the folks. |
+1 for yml. If not for other reasons that at least so we don't introduce new file format. |
Just a brain dump: right from the start of this file format creation we define a schema for it, and |
yaml or .ini file... |
cool i will start working with |
how complicated does the config file need to be? might be easier on user if it is ini file.. if we think it will get complicated over time then yaml is best. |
I think that at begging it might be fairly easy and simple, but will grow in the future. For example ini mentioned in #39 (comment) could look in yaml like this: oc:
provider: openshit
resource: replicationcontrollers
sebgoa:
provider: kubernetes
resource: deployments |
ok |
About this one more question,
|
I think it should be right next to docker-compose.yaml file, in the same directory. You will have separate preference files for each project. |
Do we really need profiles? What would be use case for having multiple profiles? If user requires to have multiple configuration he could just have multiple preference files, and we can have option to chose which file to use, similar to how it is done with |
I could see myself having a k8s cluster and an oc endpoint, then wanting to switch between them. But you are right I think, in any case we would need to pass an arg to specify which profile to use. I have a preference to keep a single configuration file need more thinking on this, we need to have a good feel for the UX. |
is it possible that we could add "profile" information to the |
It depends what will be in that file. I was imagining that there might be some project specific stuff, like discussed in #154 , than it wouldn't make much sense to have one global file.
This is probably just a matter of taste :-). For me it is just more clear to switch between files that are kept with project, than to have everything in one file with multiple sections. |
Since we had a discussion also about having registry info in your pref file, it makes sense to have single global file, with URL to registry, auth info, etc. Because a user will not like having to copy things around? |
sone of that information can be in docker-compose.yml like url to registry. |
We should probably agree what this preference file should be for. I see it as configuration for how kompose does conversion and deploy for given project. If I understand it correctly than @sebgoa sees it as global config file for |
This is starting to block us a little bit. I'm still convinced that this should be file in project directory (next to docker-compose.yml). |
While the location of pref file still in conversation, I am not sure if everybody agrees with me that keep the |
Ah... we still have #154 for the labels... |
now user can provider a prefernce file where s(he) can mention what controllers to generate and what provider to default to. Fixes kubernetes#39
now user can provider a prefernce file where s(he) can mention what controllers to generate and what provider to default to. Fixes kubernetes#39
now user can provider a prefernce file where s(he) can mention what controllers to generate and what provider to default to. Fixes kubernetes#39
now user can provider a prefernce file where s(he) can mention what controllers to generate and what provider to default to. Fixes kubernetes#39
now user can provider a prefernce file where s(he) can mention what controllers to generate and what provider to default to. Fixes kubernetes#39
now user can provider a prefernce file where s(he) can mention what controllers to generate and what provider to default to. Fixes kubernetes#39
now user can provider a prefernce file where s(he) can mention what controllers to generate and what provider to default to. Fixes kubernetes#39
now user can provider a prefernce file where s(he) can mention what controllers to generate and what provider to default to. Fixes kubernetes#39
now user can provider a prefernce file where s(he) can mention what controllers to generate and what provider to default to. Fixes kubernetes#39
I'm still not sure what benefit this brings to users. 😕 For me it just adds unnecessary complexity. When will user need multiple profiles with different settings (like different controller object or different provider)? Is there a real use-case for it? I can think only one case and profiles is overkill for it: I don't think that we need complicate this with multiple profiles. |
@kadel Yes I agree the preference file is now a bit of overcomplicating. The idea of this file originally happened during summer when @sebgoa would like to see a good way to switch between providers and default objects. But now kompose has changed a lot. So now we should again investigate the advantages and disadvantages of having a preference file and probably define an alternative solution.
I'd like to take a look at the case user want to deploy composed-app to multiple k8s environments. Kompose is relying on kube config, that means he need to switch context first (by kubectl) prior to run kompose up. So, probably switching context would be a setting. |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
I think this can be closed and need not be open anymore! |
@surajssd agreed. |
for example
The text was updated successfully, but these errors were encountered: