I have an issues with few latest version of Intellij with kubernetes plugin.
I am using helm, so typically my chart looks like below:
helm
templates
deployment.yaml
...
Chart.yaml
values.yaml
I installed kubernetes plugin, go template as required, added File pattern *.yaml to fily type - helm.
When I am opening deployment.yaml I have there references like
{{.Values.strategy.type}}
or
{{.Values.strategy.rollingUpdate.maxSurge}}
However, I see that those references are marked as 'Unknown identifier' and I can not go to that actual value by clicking ctrl+click as it was few versions ago. So it does not recognize the values by references.
I used to see in deployment that Intellij shows me value as a hint instead of pure reference and it was pretty nice to see.
Could someone help me with this? What I am missing.
Go Template plugin: 213.5744.190
Kubernetes plugin: 213.6461.19
IntelliJ: 2021.3.1
Related
Have been using the JKube maven plugin for a while and wanted to see if I could also make a Gradle based version.
I have created a ConfigMap using the DSL, but can't seem to find a way to configure it within the Deployment. So opted for a "deployment.yml" resource fragment.
So how do I inject dynamic data in this resource fragment using the gradle version?
In the maven version I would do something like:
metadata:
annotations:
configmap.jkube.io/update-on-change: ${service.name}
name: ${service.name}
This to dynamically insert the service name (injected and runtime and therefore dynamic based on branchname, version etc.).
So how can I do this with gradle? The same notation isn't working, so it would seem that the vars isn't replaced...
/Tue
I'm trying to deploy a Liferay rest-builder project. These are the steps I follow to do it:
I create a rest-builder project with Liferay Developer Studio wizard.
I edit the *-impl/rest-openapi.yaml file
I launch the buildREST Gradle task
BuildREST task ends successfully
I launch the deploy Gradle task
Deploy task ends successfully
When JAR tries to deploy, it lets this message in log:
Unable to start bundle: file:/C:/devs/testlr73/bundles/osgi/modules/com.liferay.training.service.rest.impl.jar
org.osgi.framework.BundleException: Could not resolve module: com.liferay.training.service.rest.impl [1368]_ Unresolved requirement: Import-Package: com.liferay.portal.vulcan.pagination; version="[1.4.0,2.0.0)"
I tried this operation with versions 7.1, 7.2, 7.3 and 7.4.
Only 7.4 deploys without a problem (after fix the version in the javax.xml.bind dependency).
I was trying found where is set the Import-Package to fix it but I can't found it.
There are two general approaches to fix your problem.
Initialize a new project based on your exact version of Liferay (and copy your code into the created projects)
Try to fix all dependencies manually
I would suggest to go with 1. as this seems the "cleaner" approach to me. But I will try to explain both ways here as much in detail as I can.
FIRST APPROACH: Initialize a new project
When creating a project with blade, you can give it 2 additional / optional parameters:
--product (dxp | portal - for the community version)
-v (version - like 7.2, 7.3,...)
The whole command for a DXP 7.3 would look like this:
blade create --product dxp -v 7.3 -t rest-builder automapper-service
As for the wizard in Dev Studio, you should be able to select the Liferay Version and the Flavor as well for your project - if you use a Liferay Workspace usually you select it once for the workspace.
DevStudio writes this information in your gradle.build of the workspace, so you can change it afterwards, its the liferay.workspace.product and liferay.workspace.target.platform.version variables.
Please have a look here for an exact walkthrough for creating a project in dev studio.
SECOND APPROACH: Manually updating the dependencies
Your package needs the Vulcan API as dependency. And as the deployment in 7.4 works, you seem to compile it for the 7.4 version.
So I would do following approach:
1 Check which version of Vulcan API Liferay is running in your desired Liferay
Startup a Liferay server.
Goto its Gogo Shell and execute:
lb vulcan
You should get some entries back, the correct one is the "Liferay Portal Vulcan API", in my case (DXP 7.3 SP3) it has the version 7.19.2
So you should remember / note that version.
2 Replace all occurences of that dependency in your gradle files
Liferay has an article here which explains more in detail on how to resolve bundle dependencies
Search in Dev Studio via Search -> File for com.liferay.portal.vulcan.api
For example in your build.gradle you will have something like this
compileOnly group: "com.liferay", name: "com.liferay.portal.vulcan.api", version: "9.3.1"
Update the version to your target version and save the file, so in my case it would look like:
compileOnly group: "com.liferay", name: "com.liferay.portal.vulcan.api", version: "7.19.2"
One note of warning for this approach: There might be further issues with other dependencies as well. You will have to resolve all of them to successfully deploy to your desired Liferay version. Good thing though, you can do it the same way I described above.
Wanted to take a look at developing an Eclipse plugin. Installed the Plugin Development Environment and created a new plugin project from the "Hello World" plugin template.
Initially I got an error that there was no API Baseline defined. So, I went in to Preferences | Plug-in Development | API Baselines and defined one (based on the installation directory for my Eclipse, which is version 2020-06 so I called it "2020-06"). This is defined and is the default.
Now, the error has changed to
There is a possible API baseline mismatch since none of the workspace
projects is in the baseline.
I've googled and I can find many answers telling me how to turn the error off (or downgrade it to a warning). But I can't find anything that says how I actually fix it. How do I define the baseline for the project? (I've close all other projects in my workspace and this is anyway my only plugin project)
It's currently an untouched "Hello World" plugin template so I assume it doesn't use APIs later that 2020-06 but if it is an actual problem, how do O find out what calls are causing it? The message reads like a config missing on the project - if the code included an API call that breaks the baseline I'd expect a more specific error.
Starting the activator with activator new you get a list of project seeds and you also can get templates. Is it possible to have one's own source/repository of seeds and templates or is there a possibility to configure to not use the typesafe ones?
I want to achieve something like this:
$~- activator new
Fetching the latest list of templates...
Browse the list of templates: http://my-templates
Choose from these featured templates or enter a template name:
1) My-Own-Seed
2) CompanyConfiguration
(hit tab to see a list of all templates)
I know of g8 but I don't want to use it because I like the tight integration with sbt of activator.
EDIT:
I found documentation at https://typesafe.com/activator/template/contribute but I'm not sure if I can achieve that the seeds are just usable within an enclosed environment.
I have to design a service builder in Liferay which retrieve data for the look and feel. Then this service have to deploy before deploying look and feel. I don't know how to deploy this service. Actually, I obtain an exception of type "no bean named...is defined".
Thank you in advance,
Best regards.
You can declare dependencies in WEB-INF/liferay-plugin-package.properties. The easiest way to do it is to look it up in other plugins or use Liferay IDE or Developer Studio to edit the file as it comes with a form-based editor, recognizing the file content.
This dependency will make sure that the plugin containing your service will deploy before everything else that depends on it. Dependent plugins will not be deployed until their dependencies are satisfied.
From the sample file here:
#
# Specify other plugins that depend on deployment of this plugin. Some
# plugins require this in order to rely on services and features provided by
# other plugins.
#
#required-deployment-contexts=
#required-deployment-contexts=\
# chat-portlet,\
# flash-portlet,\
# sample-service-builder-portlet