Skip to content

Commit

Permalink
feat (jkube-kit/enricher) : Add WellKnownLabelsEnricher for adding Ku…
Browse files Browse the repository at this point in the history
…bernetes Recommended Well Known Labels

+ Add WellKnownLabelEnricher that would add these labels to `.metadata`
  of all resources (also to `selector.matchLabels` in case of controller
  resources):
  - `app.kubernetes.io/component`
  - `app.kubernetes.io/managed-by`
  - `app.kubernetes.io/name`
  - `app.kubernetes.io/part-of`
  - `app.kubernetes.io/version`

Signed-off-by: Rohan Kumar <[email protected]>
  • Loading branch information
rohanKanojia committed Jan 10, 2024
1 parent 275dc11 commit 37a0e3d
Show file tree
Hide file tree
Showing 25 changed files with 851 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
expose: "true"
app: expose
provider: jkube
Expand All @@ -23,6 +26,9 @@ items:
protocol: TCP
targetPort: 21
selector:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
group: org.eclipse.jkube.integration.tests.gradle
Expand All @@ -34,6 +40,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
version: "@ignore@"
Expand All @@ -44,6 +53,9 @@ items:
revisionHistoryLimit: 2
selector:
matchLabels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
group: org.eclipse.jkube.integration.tests.gradle
Expand All @@ -54,6 +66,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
version: "@ignore@"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
expose: "true"
app: expose
provider: jkube
Expand All @@ -25,6 +28,9 @@ items:
protocol: TCP
targetPort: 21
selector:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
group: org.eclipse.jkube.integration.tests.gradle
Expand All @@ -38,6 +44,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
version: "@ignore@"
Expand All @@ -47,6 +56,9 @@ items:
replicas: 1
revisionHistoryLimit: 2
selector:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
group: org.eclipse.jkube.integration.tests.gradle
Expand All @@ -63,6 +75,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
version: "@ignore@"
Expand Down Expand Up @@ -104,6 +119,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
expose: "true"
app: expose
provider: jkube
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
expose: "true"
app: expose
provider: jkube
Expand All @@ -23,6 +26,9 @@ items:
protocol: TCP
targetPort: 21
selector:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
group: org.eclipse.jkube.integration.tests.gradle
Expand All @@ -34,6 +40,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
version: "@ignore@"
Expand All @@ -44,6 +53,9 @@ items:
revisionHistoryLimit: 2
selector:
matchLabels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
group: org.eclipse.jkube.integration.tests.gradle
Expand All @@ -54,6 +66,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
version: "@ignore@"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
expose: "true"
app: expose
provider: jkube
Expand All @@ -25,6 +28,9 @@ items:
protocol: TCP
targetPort: 21
selector:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
group: org.eclipse.jkube.integration.tests.gradle
Expand All @@ -38,6 +44,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
version: "@ignore@"
Expand All @@ -47,6 +56,9 @@ items:
replicas: 1
revisionHistoryLimit: 2
selector:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
group: org.eclipse.jkube.integration.tests.gradle
Expand All @@ -63,6 +75,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
version: "@ignore@"
Expand Down Expand Up @@ -104,6 +119,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
expose: "true"
app: expose
provider: jkube
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
version: "@ignore@"
Expand All @@ -22,6 +25,9 @@ items:
protocol: TCP
targetPort: 21
selector:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
group: org.eclipse.jkube.integration.tests.gradle
Expand All @@ -33,6 +39,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
version: "@ignore@"
Expand All @@ -43,6 +52,9 @@ items:
revisionHistoryLimit: 2
selector:
matchLabels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
group: org.eclipse.jkube.integration.tests.gradle
Expand All @@ -53,6 +65,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
version: "@ignore@"
Expand Down Expand Up @@ -86,6 +101,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
version: "@ignore@"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
version: "@ignore@"
Expand All @@ -24,6 +27,9 @@ items:
protocol: TCP
targetPort: 21
selector:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
group: org.eclipse.jkube.integration.tests.gradle
Expand All @@ -37,6 +43,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
version: "@ignore@"
Expand All @@ -46,6 +55,9 @@ items:
replicas: 1
revisionHistoryLimit: 2
selector:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
group: org.eclipse.jkube.integration.tests.gradle
Expand All @@ -62,6 +74,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
version: "@ignore@"
Expand Down Expand Up @@ -103,6 +118,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
version: "@ignore@"
Expand Down
15 changes: 15 additions & 0 deletions gradle-plugin/it/src/it/expose/expected/ftp-port/kubernetes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ items:
provider: jkube
version: "@ignore@"
group: org.eclipse.jkube.integration.tests.gradle
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
name: expose
spec:
ports:
Expand All @@ -25,6 +28,9 @@ items:
app: expose
provider: jkube
group: org.eclipse.jkube.integration.tests.gradle
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
- apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -33,6 +39,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
version: "@ignore@"
Expand All @@ -43,6 +52,9 @@ items:
revisionHistoryLimit: 2
selector:
matchLabels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
group: org.eclipse.jkube.integration.tests.gradle
Expand All @@ -53,6 +65,9 @@ items:
jkube.eclipse.org/git-commit: "@ignore@"
jkube.eclipse.org/git-branch: "@ignore@"
labels:
app.kubernetes.io/managed-by: jkube
app.kubernetes.io/name: expose
app.kubernetes.io/version: "@ignore@"
app: expose
provider: jkube
version: "@ignore@"
Expand Down
Loading

0 comments on commit 37a0e3d

Please sign in to comment.