Skip to content

Commit

Permalink
Add labels/annotations (#10)
Browse files Browse the repository at this point in the history
* Add labels/annotations

* Fix label selectors

* Add some comments to common labels to explain their purposes
  • Loading branch information
highb authored May 2, 2023
1 parent a4d79dd commit db45e92
Showing 1 changed file with 59 additions and 3 deletions.
62 changes: 59 additions & 3 deletions resources/workload/deployment/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,73 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: UNDEFINED
# Namespaces Guide: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
namespace: UNDEFINED
# Annotations Guide: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
annotations: {}
# Annotate for clear ownership over the resources within your organization.
# opengov.com/team: UNDEFINED
# opengov.com/environment: UNDEFINED
# opengov.com/customer: UNDEFINED
# opengov.com/service: UNDEFINED
# opengov.com/suite: UNDEFINED
# opengov.com/department: UNDEFINED
# opengov.com/criticality: UNDEFINED
# opengov.com/data-sensitivity: UNDEFINED

# Annotating Kubernetes Services for Humans
# https://ambassadorlabs.github.io/k8s-for-humans/
# a8r.io/description: Unstructured text description of the service for humans.
# a8r.io/owner: GitHub or equivalent username, email address, or unstructured owner description.
# a8r.io/chat: Slack channel, or link to other external chat system.
# a8r.io/bugs: Link to external bug tracker.
# a8r.io/logs: Link to external log viewer.
# a8r.io/documentation: Link to external project documentation.
# a8r.io/repository: Link to external VCS repository.
# a8r.io/support: Link to external support center.
# a8r.io/runbook: Link to external project runbook.
# a8r.io/incidents: Link to external incident dashboard.
# a8r.io/uptime: Link to external uptime dashboard.
# a8r.io/performance: Link to external performance dashboard.
# a8r.io/dependencies: Unstructured text description of the service dependencies for humans.
# Labels Guide: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
labels:
app: UNDEFINED
# Common k8s Labels that should be defined in all resources
# k8s Reference: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/
# The name of the application
app.kubernetes.io/name: UNDEFINED
# A unique name identifying the instance of an application
app.kubernetes.io/instance: UNDEFINED
# The current version of the application e.g., a SemVer 1.0, revision hash, etc. (generally managed by CI/CD)
app.kubernetes.io/version: UNDEFINED
# The component within the architecture
app.kubernetes.io/component: UNDEFINED
# The name of a higher level application this one is part of
app.kubernetes.io/part-of: UNDEFINED
# The tool being used to manage the operation of an application (generally managed by CI/CD)
app.kubernetes.io/managed-by: UNDEFINED
spec:
selector:
matchLabels:
name: UNDEFINED
# Common k8s Labels that should be defined in all resources
# k8s Reference: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/
app.kubernetes.io/name: UNDEFINED
app.kubernetes.io/instance: UNDEFINED
app.kubernetes.io/version: UNDEFINED
app.kubernetes.io/component: UNDEFINED
app.kubernetes.io/part-of: UNDEFINED
app.kubernetes.io/managed-by: UNDEFINED
template:
metadata:
labels:
name: UNDEFINED
# Common k8s Labels that should be defined in all resources
# k8s Reference: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/
app.kubernetes.io/name: UNDEFINED
app.kubernetes.io/instance: UNDEFINED
app.kubernetes.io/version: UNDEFINED
app.kubernetes.io/component: UNDEFINED
app.kubernetes.io/part-of: UNDEFINED
app.kubernetes.io/managed-by: UNDEFINED
spec:
# Service account ‘automountServiceAccountToken’ should be set to ‘false’
# unless the workload needs to communicate via a ServiceAccount
Expand Down

0 comments on commit db45e92

Please sign in to comment.