Define/attach Persistence Volume claim in application.properties - kubernetes

I would like to define or more "attach" a persistance volume claim (which is already present in K8s and named "pvc-vol-divacms-epass") and all I can see in the documentation is that there is a property "quarkus.kubernetes.pvc-volumes" for which the type is defined as "Map<String, PersistentVolumeClaimVolume>".
2 questions:
is that the right property to use
if no, which one should I use and how do I use it; if yes, how do I enter values for "Map<String, PersistentVolumeClaimVolume>" in the application.properties file?
My K8s portion in the file looks like this
quarkus.container-image.group=dwamara
quarkus.container-image.name=${quarkus.application.name}
quarkus.container-image.tag=version_tag
quarkus.kubernetes.namespace=divacms-dev
quarkus.kubernetes.ingress.expose=true
quarkus.kubernetes.ingress.host=gateway.divacms.${application.host}

Just add something like:
quarkus.kubernetes.pvc-volumes.epass.claim-name=pvc-vol-divacms-epass
quarkus.kubernetes.pvc-volumes.db.readonly=false
to application.properties.

Thanks, you saved my life :-) I've added
quarkus.kubernetes.mounts.epass.path=${qrcode.folder}
quarkus.kubernetes.pvc-volumes.epass.claim-name=pvc-vol-divacms-epass
quarkus.kubernetes.pvc-volumes.db.readonly=false
and it did the trick.
Thanks,
D.

Related

vscode - Is there a way to create an instance of `vscode.TextEditor`?

vscode - Is there a way to create an instance of `vscode.TextDocument`?
The question above except instead of textdocument I want for texteditor given the filepath.
Thanks in advance
No, there is not.
You can only show a TextDocument, using vscode.window.showTextDocument(someTextDocument, ...), where someTextDocument refers to some TextDocument instance, previously opened.
Hope this helps

SCOM Service UniMonitor with Dynamic AlertSeverity

I have defined a UnitMonitor of type CheckNTServiceStateMonitorType. The AlertSeverity of this Monitor depends on an attribute of the class being monitored, so it is dynamically specified.
However, I I could find no way to set the AlertSeverity dynamically. For instances:
<AlertSettings>
<AlertSeverity>
$Target/Property[MyMonitoredClass]/AlertSeverity$
<AlertSeverity>
</AlertSettings>
Is there any way to accomplish this?
You cannot do it for a Unit Monitor. Such feature is only available for Rules.
Cheers
Max

Re-add value into EXTRA_OECONF_<name> after it was removed by EXTRA_OECONF_remove_<name>

To configure a component I need to add --enable-feature into EXTRA_OECONF_somename
So I tried to do:
EXTRA_OECONF_append_somename = --enable-feature
But it did not help. After investigation it was found that the one of the third-party recipe contains the following line:
EXTRA_OECONF_remove_somename = --enable-feature
I can't modify the third-party recipe.
Is there a way to add --enable-feature into EXTRA_OECONF_somename
Thank you.
I'm afraid not. The _remove operations are always applied last so there is no way to undo them. I would say that the original recipe shouldn't be using it - _remove is intended for distro policy where you want to say "I don't care how this item got in the value, just remove it".
For preference the original recipe should instead it should be using PACKAGECONFIG to control addition (or not) of this feature.

How to map urls?

I would like to map pages such domain/content/myProject/home.html to domain/home.html. /content/myProject/ is not needed. I have the following code:
String newpath = getResourceResolver().map(page.getPath());
this does not change anything. newpath is stay page.getPath()
how to solve this issue?
Answering as this question as it remains unanswered. Here is an example of how the etc mappings should look like:
Trick is you add 2 entries to sling:internalRedirect as / and /content/example/
AEM first tries to resolve resources with first entry '/'. So non page URLs like /etc/designs, /content/dam etc will be addressed by the first entry. If it is unable to resolve using the first one, it uses the second entry to resolve the page.
This is also the adobe recommended way for URL shortening compared to other techniques like apache redirect.
You need to create map in etc.Then Resource Resolver will take care of trimming the path .
CREATING MAPPING DEFINITIONS IN AEM
In a standard installation of AEM you can find the folder:
/etc/map/http
This is the structure used when defining mappings for the HTTP protocol. Other folders (sling:Folder) can be created under /etc/map for any other protocols that you want to map.
Configuring an Internal Redirect to /content
To create the mapping that prefixes any request to http://localhost:4503/ with /content:
Using CRXDE navigate to /etc/map/http.
Create a new node:
Type sling:Mapping
This node type is intended for such mappings, though its use is not mandatory.
Name localhost_any
Click Save All.
Add the following properties to this node:
Name sling:match
Type String
Value localhost.4503/
Name sling:internalRedirect
Type String
Value /content/
Click Save All.
This will handle a request such as:
localhost:4503/geometrixx/en/products.html
as if:
localhost:4503/content/geometrixx/en/products.html
had been requested.
You can refer here for further documentation http://docs.adobe.com/docs/en/cq/5-6-1/deploying/resource_mapping.html

How pass the variable form config file form one plugin to another in Symfony?

I am new to Symfony 1.4
And I have a project in which I have 2 plugins. In first plugin named myPlugin1 I have the config folder and in him the app.yml file, in which I have set a predefined "variable" like that:
all:
carriage:
cost:
prepaid: 10
What I need is to pass this "variable" in a class from my other plugin, myPlugin2, which actually handle the payments costs.
How can I pass this "variable" to my class?
UPDATE:
Can I do this like that? Or this can be used only in current plugin?
sfConfig::get('all_carriage_cost_prepaid')
the actual call must be:
sfConfig::get('app_carriage_cost_prepaid')
The starting prefix is related to the configuration file name. Source here.
Regards.
I have found finally how to do it. Is like that:
$myarray = sfConfig::get('all_carriage_cost');
$thevalue = $myarray['cost'];
Here is the source.