-
Notifications
You must be signed in to change notification settings - Fork 515
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
apiVersion is ignored by resource and apply goals #2219
Comments
@tipame : Sorry, I got confused with your CustomResourceDefinition naming. Could you please share directory contents of fragment folder? I don't think you need to provide any additional configuration for CustomResources. Our E2E test with CRD seems to be passing. |
@rohanKanojia you mean to attach generated resources? |
@tipame : No, I didn't mean that. Is it possible to share a simple reproducer project? |
@tipame : I tried reproducing your issue but could not reproduce it. I copied the CustomResourceDefinition and CustomResource fragments into |
Also should mention: work fine with other CRD (with kind: Trigger for example) |
I'm not able to understand why you need to add a mapping. I tried running
|
Could your issue be due to your mapping colliding with default mapping for OpenShift |
Main bug (apply goal) seams to be fixed in 1.13.1 (my plugin version was 1.6.0). Now resource is aplied.
There is no way to set two differend mapings for this resources. |
Maybe you don't need a mapping at all. Just provide the name without the |
all files in my project have names like: xxx-yyy-$mapping.yaml |
I think CustomResource fragments need to have |
Forgot about that one :(. This is definitely something to improve. Then having |
Yep "cr" suffix works! Thank you. Have no more question. |
@tipame : Do you have some feedback on how we can improve this in documentation? |
Back agan: "cr" = ClusterRole ))) In my opinion - there was a future to auto complete XML configuration base on filenaming: |
This is definitely a bug we need to tackle ASAP. |
Hi @tipame Could you please try out the snapshot and confirm that everything is working for you as expected? |
Hello @manusa, how can i specify apiVersion in a fixed branch? |
@tipame : Marc is asking you to do this:
<pluginRepositories>
<pluginRepository>
<id>oss.sonatype.org</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
<plugin>
<groupId>org.eclipse.jkube</groupId>
<artifactId>openshift-maven-plugin</artifactId>
<version>1.14-SNAPSHOT</version>
</plugin>
|
Question about apiVersion (see isue description), not about maven.
|
This is not possible at the moment. I did see it as something that would be useful when implementing the IT tests (https://github.com/eclipse/jkube/tree/e116ca23a6526a5498e38b20c55f4c755339c055/gradle-plugin/it/src/it/fragments-custom-mapping). I think we can definitely add this since it makes much sense when working with CRs and other APIs. |
So i do not undestand what should i test? If there is still no way to specify apiVersion - conflict is still here. You just change overriding order (my custom mapping will have bigger priority then deffault)? |
From the issue description it was unclear you were actually requesting to include What's fixed right now is the possibility to use your Mappings to override the default ones (yes priority override). And the overall way resources are applied. The previous |
Hi @tipame |
Closing this issue as it should be already fixed. Please re-open or create a new one in case there are problems remaining. |
Describe the bug
Hello, in my project i have XML configuration with custom resurce:
Also i have custom mapping definition:
As you can see here - there is no way to specify apiVersion in mapping definition - so we have conflict with default Template.
Executing resource goal result to creating ***-template.yaml but not a ***-my_template.yaml (apiVersion property present in generated yaml).
Executing apply goal - ignores ***-template.yaml (no object created in kubernetes).
Executing apply with kubectl work fine (object successfully creates):
kubectl apply -f ***-template.yaml
Eclipse JKube version
1.13.1
Component
Kubernetes Maven Plugin
Apache Maven version
3.8.5
Gradle version
None
Steps to reproduce
Create CDR with kind Template (with your unique group):
Create XML configuration for custom Template:
Add custom mapping definition in pluging configuration:
k8s:resource produce my-example-template.yaml
k8s:apply ignores my-example-template.yaml (don't know is it right behavior for v1 Template)
Expected behavior
Expect plugin respect apiVersion and distinguish differend resources with same kind name.
Expect k8s:resource produce my-example-my_template.yaml
Expect k8s:apply successfuly applies my configuration my-example-my_template.yaml (object created in kubernetes).
Runtime
Kubernetes (vanilla)
Kubernetes API Server version
1.25.3
Environment
Windows
Eclipse JKube Logs
No response
Sample Reproducer Project
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: