-
Notifications
You must be signed in to change notification settings - Fork 480
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
Generation of Kubernetes Well-Known and Recommended labels #1700
Comments
I see a lot of labels and annotations on Well-Known Labels, Annotations and Taints page. Do we want to support all of them? I think we can move forward with adding these: Labels:
|
At first, mostly those that we can infer. i.e. those that replace the jkube/fabric8-custom labels |
Good evening @rohanKanojia and @manusa Unfortunately it seems that this change has regressed my maven jkube setup, I just noticed today after pulling the latest 1.16 snapshot. I currently have the following in my pom.xml <plugin>
<groupId>org.eclipse.jkube</groupId>
<artifactId>kubernetes-maven-plugin</artifactId>
<version>${jkube.version}</version>
<configuration>
<resources>
<labels>
<all>
<team>rfn</team>
<language>java</language>
<property>
<name>app.kubernetes.io/name</name>
<value>${project.artifactId}</value>
</property>
<property>
<name>app.kubernetes.io/version</name>
<value>${project.version}</value>
</property>
<property>
<name>app.kubernetes.io/component</name>
<value>application</value>
</property>
<property>
<name>app.kubernetes.io/managed-by</name>
<value>Helm</value>
</property>
<property>
<name>meta.helm.sh/release-name</name>
<value>${project.artifactId}</value>
</property>
</all>
</labels>
</resources>
<helm>
<parameters>
<!-- Override with helm param -->
<parameter>
<name>common.namespace</name>
<value>{{ .Release.Namespace }}</value>
</parameter>
</parameters>
</helm>
</configuration>
</plugin> Note how I override Up until a few days ago, this generated a deployment file looking like ---
apiVersion: apps/v1
kind: Deployment
spec:
selector:
matchLabels:
app: rfn-yellow-adapter-app
group: com.rakuten
provider: jkube
template:
metadata:
labels:
app: rfn-yellow-adapter-app
app.kubernetes.io/component: application
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: rfn-yellow-adapter-app
app.kubernetes.io/version: 1.1.0
group: com.rakuten
language: java
meta.helm.sh/release-name: rfn-yellow-adapter-app
provider: jkube
team: rfn
version: 1.1.0 And everything worked fine when installing the helm chart. However, with the latest snapshot I get ---
apiVersion: apps/v1
kind: Deployment
spec:
selector:
matchLabels:
app: rfn-yellow-adapter-app
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: rfn-yellow-adapter-app
app.kubernetes.io/part-of: com.rakuten
group: com.rakuten
provider: jkube
template:
metadata:
labels:
app: rfn-yellow-adapter-app
app.kubernetes.io/component: application
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: rfn-yellow-adapter-app
app.kubernetes.io/version: 1.1.0
group: com.rakuten
language: java
meta.helm.sh/release-name: rfn-yellow-adapter-app
provider: jkube
team: rfn
version: 1.1.0 And now
Because there is a mismatch: the selector tries to match My expectation would be that overriding the default value with I can comment this override for now (I am not blocked), but I would rather have my helm-managed resources be marked as being managed by helm, if that works for you. I commented directly in this closed issue because I think I tracked down the origin, but I can absolutely open a new issue if you prefer. Best regards CC @amihalfa |
Thanks for the detailed report 🙏 |
By the way, in the meantime you can revert to the previous behavior by setting the following Maven property: <jkube.enricher.jkube-well-known-labels.enabled>false</jkube.enricher.jkube-well-known-labels.enabled> |
@ajeans : Hello, we've merged a fix for the problem you were facing in #1700 (comment) Could you please give |
@rohanKanojia Hello, I can confirm this fixes my set up, my label configuration overrides correctly. Thanks for fixing this quickly. |
Component
JKube Kit
Is your enhancement related to a problem? Please describe
The generated YAML files should be (optionally) enriched with the:
Describe the solution you'd like
(High level)
Describe alternatives you've considered
Fragments
Additional context
No response
The text was updated successfully, but these errors were encountered: