Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

builtin/k8s: Include user defined labels on deploy and add name/version labels #1146

Merged
merged 6 commits into from
Feb 25, 2021

Conversation

briancain
Copy link
Member

@briancain briancain commented Feb 25, 2021

This pull request introduces a couple of changes and enhancements for a kubeernetes deploy:

  • Includes any user defined labels to apply to the app pod on deploy from the deploy stanza in a waypoint.hcl
  • Duplicates the label name to be app. This fits with how we label waypoint-server pod, and will fit what is expected for other services that integrate with k8s such as Istio https://istio.io/latest/docs/ops/deployment/requirements/#pod-requirements
  • Duplicates the namespaced waypoint id label as version, because version is an expected key that k8s integrations expect to have (also used by Istio).

Fixes #966

@briancain briancain added this to the 0.2.x milestone Feb 25, 2021
@briancain briancain requested a review from a team February 25, 2021 17:18
"name": name,
},
},

Template: corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: map[string]string{
"app": name,
"name": name,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure where this is happening exactly, but it seems like we use name some where for the local release URL to resolve so maybe we leave this as is and include app too?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a reasonable decision. I would add a comment to that effect for future-us.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kubernetes plugin: Support injecting data from waypoint deploy into K8s labels
2 participants