Open vmarzal opened 7 months ago
Hello colleagues, Can I work on this issue?
Umm, it's not decided yet how to approach this problem. But if you want to give it a try and propose something, feel free to go ahead.
Could you please assign it to me?
@arsenalzp : Sorry, we don't have any bot running for these kind of project chores.
Thanks for showing interest in fixing this issue.
@arsenalzp : Hello, are you still working on this issue?
Hello, I have two more issues and PRs which are being reviewed right now. Let me manage with them then I proceed with this issue.
Hello, Some of my PRs were accepted so I'm ready to work for this issue!
Oh, I spent a couple of hours to troubleshoot the issue.
The main question: how should it work, what is the expectation?
Enricher creates two resources based on the given resources fragments; requestor of this particular issue used two files named identically for two different resource/profile.
Name should be different based on environment names:
common/common-route.yml
and demo/demo-route.yml
for common
and demo
environments respectively, then two different files are produced:
target/classes/META-INF/jkube/openshift/common-route.yml
:
apiVersion: v1
kind: Route
metadata:
annotations:
cert-manager.io/issuer-name: letsencrypt-prod
cert-manager.io/issuer-kind: ClusterIssuer
labels:
testProject: spring-boot-sample
app: spring-boot
provider: jkube
version: 1.17.0
group: org.eclipse.jkube.quickstarts.maven
app.kubernetes.io/part-of: org.eclipse.jkube.quickstarts.maven
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: spring-boot
app.kubernetes.io/version: 1.17.0
name: common
spec:
tls:
insecureEdgeTerminationPolicy: Redirect
termination: edge
and
target/classes/META-INF/jkube/openshift/demo-route.yml
:
apiVersion: v1
kind: Route
metadata:
labels:
testProject: spring-boot-sample
app: spring-boot
provider: jkube
version: 1.17.0
group: org.eclipse.jkube.quickstarts.maven
app.kubernetes.io/part-of: org.eclipse.jkube.quickstarts.maven
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: spring-boot
app.kubernetes.io/version: 1.17.0
name: demo
namespace: demo-namespace
spec:
host: demo-namespace.apps.ocpdes.es
Otherwise, enricher produces two files named like route.yml
and route-1.yml
withe the identical content.
Describe the bug
Problem merging a 'route.yml' common configuration with a environment one. The result is not displaying several annotations placed in the common file.
Eclipse JKube version
1.16.1
Component
OpenShift Maven Plugin
Apache Maven version
other (please specify in additional context)
Gradle version
None
Steps to reproduce
I was trying to extract a common configuration from the metadata.annotations route.yml files of two environments.
Common configuration:
With the command 'mvn oc:resource -Pdemo' I get that merged route.yml file with no trace of my custom annotations.
Expected behavior
The expected behavior is a route.yml file with the common annotations (in addition to the opinionated defaults):
Runtime
OpenShift
Kubernetes API Server version
1.22.15
Environment
Windows
Eclipse JKube Logs
No response
Sample Reproducer Project
No response
Additional context
Maven 3.9.4