Closed wstrange closed 5 years ago
Hi @wstrange thanks for reporting!
Do you have a skaffold.yaml
file in your project tree? We don't yet have support for generating the config for you, but this will come in the next release.
Once you create the skaffold.yaml config file, that dropdown box should automatically get populated for you and then you can go ahead and deploy / continuous dev.
See this simple tutorial to help get started creating the configuration (if this indeed was the issue): https://github.com/GoogleCloudPlatform/cloud-code-intellij/blob/master/kubernetes/docs/existing-k8s-projects.md
My project has it one level down, but I did try to create a new intellij project one level down (so skaffold.yaml is at the root). It has the same issue.
My skaffold.yaml files are fine (I use them in the terminal) - but I never get the prompt to enable skaffold support, and I can not add it manually
Is there some kind of module support that has to be added? This is not a java based project - just a free form intellij project that was created with "import from existing source"
Interesting.
So your project doesn't have any modules? (Note it doesn't have to be a Java project for the plugin to work; also the skaffold.yaml
doesn't have to live in the root either).
@ivanporty does something here jump out at you with the way we are discovering skaffold.yaml
files?
I'm not sure it is possible to have no modules? It is not a Java project (there is no Java code..) but it has the Module settings for the JDK, etc.
yeah I didn't think it was possible either. We are searching the project file index to locate skaffold.yaml configs in the project, so I'm wondering if it is something to do with the structure of your project causing the file not to get indexed in the way we expect.
Do you happen to have a sample project (on GitHub for example) that reproduces this behavior?
The project is here: https://github.com/ForgeRock/forgeops/ If you open up the dev/ folder as the top level project - the skaffold.yaml files are there
That's helpful.
Here's what I did:
1) git clone the project you referenced 2) Open it up in IDEA with the plugin 3) In the Event log, I see the following notification: (Note that sometimes the notification doesn't pop up if there are several other notifications, instead IDEA places them in the event log (where they always appear regardless)). 4) I accept the prompt to create the run configs 5) Inspecting the new Run Config, I see:
Which seems to correctly pick up the skaffold.yaml
from the subdirectory.
I will test out the import from existing source
workflow to see if that makes the difference.
@wstrange how did you trigger "import from existing source"? I wasn't able to do this - no matter how I open up the project, the Kubernetes notification pops up (or appears in the Event Log).
Also what version of IntelliJ are you using?
ah I see the option now. I forgot that it lives on File -> New
. Testing it now
Even when I import the project from existing source, the notification was triggered and the skaffold.yaml
file was detected:
This is what the project structure looks like after accepting all the defaults in the import wizard:
I'd be curious to see if you tried to open the project using File > Open after a fresh clone to see if you can still reproduce the issue.
I'd be curious to see if you tried to open the project using File > Open after a fresh clone to see if you can still reproduce the issue.
I just tried that - I get the same results - no ability to select skaffold. I did a git clone, followed by File -> Open, and then selected the project.
I wonder If I have some other plugin that is interfering with the cloud code one?
OK - I finally got the dialog to come up.
I think this was a conflict between this plugin and another Kubernetes plugin ("Kubernetes and OpenShift Support v0.9"). I disabled this and a couple more plugins, restarted, and now I get the skaffold dialog to come up.
I'll close this off for now. Thanks for your help!
Great thanks for the update. We’ll investigate this incompatibility. Don’t hesitate to reopen if needed or open a new issue for anything else.
@etanshaul The same issue here. Plugin disabling and restarting does not help. No new skaffold.yaml file is detected. Configuration only works when cloning a repo.
@canmanmake thanks for report, I'm reopening the issue to investigate more.
Do you have any more details about your project that may help us investigate? You mentioned that disabling the plugin and restarting does not help - do you mean disabling the "Kubernetes OpenShift plugin" (and if you not, could you try that too assuming you had it installed?)?
Also you mentioned that the configuration only works when cloning a repo. Do you mind elaborating a bit? Do you mean that when you clone the repo fresh then you can get the skaffold configuration detection notice?
Thanks again, and we'll help get to the bottom of this.
@etanshaul Thanks.
IntelliJ: Disabling the Kubernetes (v191.6183.20) and Cloud Code (v19.4.1) plugins did not help (besides, I only have GitToolbox and VueJs plugins enabled).
Exactly. The only way I could see the configuration detection message, was by setting up a "new project from version control"
@canmanmake thanks for the info. And just to get a bit more details if you don’t mind:
(note the wording that you see may differ from this - it will be updated in the upcoming release)
\ \ @GoogleCloudPlatform/cloud-tools-for-intellij anyone want to help investigate this?
@etanshaul Sure.
@canmanmake what if you right-click skaffold.yaml
and select Synchronize
action? Does this make it appear?
Or potentially do this on the whole project or a directory where Skaffold YAML is?
@ivanporty No. Both actions as well as restarting the IDE do not change anything.
One thing that came to mind. Since you say it does work when cloning the project, is there anything you can notice that is different in the structure of the project when cloning fresh vs when you can reproduce the issue with the already open project. Perhaps the module structure, or directory structure is different somehow?
@etanshaul It works now. I did de- and re-install plugins in different combinations. It seems there was a conflict with either the GitToolbox (v191.1.2) or the Vue.js (v191.6183.20) plugin. Now, as soon as "apiVersion: skaffold/v1beta9" is in the file, skaffold.yalm is detected (not directly after creating the file) and configuration detects correct file automatically.
Before, I tried with different project structure with no effect.
Thanks a lot!
Your welcome! Although I’m not sure we helped that much :)
In any case, it sounds like there are some takeaways here for us to investigate how to improve skaffold config file detection.
OK - I finally got the dialog to come up.
I think this was a conflict between this plugin and another Kubernetes plugin ("Kubernetes and OpenShift Support v0.9"). I disabled this and a couple more plugins, restarted, and now I get the skaffold dialog to come up.
I'll close this off for now. Thanks for your help!
I was running into the exact same issue as described by the OP when running latest version of Intellij and CloudCode. Disabling the other k8s plugins mentioned above resolved the issue and allowed Intellij to find the skaffold file. Thanks for the tip!
@bbhuston glad you were able to get this working, but sorry to see others running into this. We should put some effort into making sure our plugin is able to find the files it needs regardless of whether other plugins are present. I've filed https://github.com/GoogleCloudPlatform/cloud-code-intellij/issues/2603 to track this work in future.
What did you do?
Tried to add a run configuration for skaffold. Through the pull right menu (click right on the skaffold.yaml file) and also via
Edit Configurations
dialog (see screen shot)I can not select a skaffold file for running. The drop down box is empty and it wont let me type in the window.
Note that I have skaffold installed via homebrew, and my Preferences have been updated to include skaffold
This is an existing project I opened up in IntelliJ. It is all docker / K8s - no Java artifacts.
What did you expect to see?
Allow me to select a skaffold.yaml file for deployment
What did you see instead?
https://www.dropbox.com/s/kd187c7w0vdd3ne/Screenshot%202019-04-23%2012.41.45.png?dl=0