Skip to content

[Feature]: Use Recommended Labels in K8s generator #122

@svrnm

Description

@svrnm

Problem Statement

The generated k8s manfiests use labels like service and app, they seem to be commonly used, but not official. Also the current setup creates a view in cilium hubble like this:

Screenshot 2025-01-13 at 10 06 14

Proposed Solution

K8s has a set of "recommended labels" which are also supported by a variety of tools (e.g. cilium), we should use them instead of app or service.

The recommended labels are listed here: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/

So we could do something like the following defaults

metadata:
  labels:
    app.kubernetes.io/name: <name of the service, database, loader>
    app.kubernetes.io/instance: <name of the service, database, loader>-<randomly generated id>
    app.kubernetes.io/version: <version of the used image>
    app.kubernetes.io/component: <service or database or loader>
    app.kubernetes.io/part-of: <default to ApplicationSimulator>

Additionally we allow them to be overwritten by the user.

Alternatives Considered

No response

Additional Context

No response

Checklist

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions