Skip to content

Commit

Permalink
doc (jkube-kit/doc) : Documentation for WellKnownLabelsEnricher
Browse files Browse the repository at this point in the history
Add documentation for WellKnownLabelsEnricher

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
  • Loading branch information
rohanKanojia authored and manusa committed Jan 18, 2024
1 parent 5799f89 commit 9fe321e
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 1 deletion.
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ Usage:
./scripts/extract-changelog-for-version.sh 1.3.37 5
```
### 1.16-SNAPSHOT
* Fix #2257: Provide guidance when the final project packaged file is not found in Quarkus projeicts
* Fix #1690: Base images based on ubi9
* Fix #1700: Add [Kubernetes Well Known labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/) to generated resources
* Fix #2257: Provide guidance when the final project packaged file is not found in Quarkus projeicts
* Fix #2070: build goals/tasks log warning if user forgets to run package/build goal/task
* Fix #2314: Add chart name validation before doing Helm OCI push
* Fix #2381: Container Images based on Java 21 (Java-exec, Tomcat, Jetty, Karaf)
Expand All @@ -38,6 +39,20 @@ Usage:
* Fix #2503: Container Images Jolokia agent bumped to 2.0.0
* Fix #2532: Bump version.kubernetes-client from 6.9.2 to 6.10.0

_**Note**_:
Kubernetes manifests generated by JKube would now contain the following labels by default:
- `app.kubernetes.io/component`
- `app.kubernetes.io/managed-by`
- `app.kubernetes.io/name`
- `app.kubernetes.io/part-of`
- `app.kubernetes.io/version`

These are added in favor of deprecating and removing the current project labels in future releases:
- `app`
- `group`
- `provider`
- `version`

### 1.15.0 (2023-11-10)
* Fix #2138: Support for Spring Boot Native Image
* Fix #2186: Reuse ` io.fabric8.kubernetes.client.utils.KubernetesResourceUtil` ConfigMap utils methods
Expand Down
4 changes: 4 additions & 0 deletions jkube-kit/doc/src/main/asciidoc/inc/_enricher.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ ifeval::["{plugin-type}" == "maven"]

endif::[]

| <<jkube-well-known-labels>>
| Add https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels[Kubernetes Recommended Well Known labels].
|===

[[enrichers-generic]]
Expand Down Expand Up @@ -224,6 +226,8 @@ include::enricher/triggers-annotation/_jkube_triggers_annotation.adoc[]

include::enricher/volume-permission/_jkube_volume_permission.adoc[]

include::enricher/well-known-labels/_jkube_well_known_labels.adoc[]

// TODO: At the moment only enrichers listed above have been tested and documented with gradle plugins. Adding the
// rest of enrichers only in case of maven. We can slowly refactor these to support both maven and gradle configurations.
ifeval::["{plugin-type}" == "maven"]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@

[[jkube-well-known-labels]]
==== jkube-well-known-labels

Enricher that adds https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels[Well Known Labels] recommended by Kubernetes.

The `jkube-well-known-labels` enricher supports the following configuration options:

[cols="1,6,1"]
|===
| Option | Description | Property

|
| Add Kubernetes Well Known labels to generated resources.

Defaults to `true`
| `jkube.kubernetes.well-known-labels`

| *enabled*
| Enable this flag to turn on addition of Kubernetes Well Known labels.

Defaults to `true`.
| `jkube.enricher.jkube-well-known-labels.enabled`

| *name*
| The name of the application (`app.kubernetes.io/name`).

ifeval::["{plugin-type}" == "maven"]
Defaults to the Maven `project.artifactId` property.
endif::[]
ifeval::["{plugin-type}" == "gradle"]
Defaults to the Gradle Project `name` property.
endif::[]
| `jkube.enricher.jkube-well-known-labels.name`

| *version*
| The current version of the application (`app.kubernetes.io/version`).

ifeval::["{plugin-type}" == "maven"]
Defaults to the Maven `project.version` property.
endif::[]
ifeval::["{plugin-type}" == "gradle"]
Defaults to the Gradle Project `version` property.
endif::[]
| `jkube.enricher.jkube-well-known-labels.version`

| *component*
| The component within the architecture (`app.kubernetes.io/component`).
| `jkube.enricher.jkube-well-known-labels.component`

| *partOf*
| The name of a higher level application this one is part of (`app.kubernetes.io/part-of`).

ifeval::["{plugin-type}" == "maven"]
Defaults to the Maven `project.groupId` property.
endif::[]
ifeval::["{plugin-type}" == "gradle"]
Defaults to the Gradle Project `group` property.
endif::[]
| `jkube.enricher.jkube-well-known-labels.partOf`

| *managedBy*
| The tool being used to manage the operation of an application (`app.kubernetes.io/managed-by`).

Defaults to `jkube`
| `jkube.enricher.jkube-well-known-labels.managedBy`
|===

The Well Known Labels which are already specified in the input fragments are not overridden by the enricher.

0 comments on commit 9fe321e

Please sign in to comment.