mirror of https://github.com/linkerd/linkerd2.git
Add podLabels and podAnnotations to Values struct (#5056)
PR https://github.com/linkerd/linkerd2/pull/5027 added `podLabels` and `podAnnotations` to `values.yaml` to allow setting labels and annotations on pods in the Helm template. However, these fields were not added to the `Values` struct in `Values.go`. This means that these fields were not serialized out to the `linkerd-config` or to the `linkerd-config-overrides`. Furthermore, in PR #5005 which moves to using the `Values` struct more authoritatively, the `podLabels` and `podAnnotations` fields would not take effect at all. Add these fields to the `Values` struct and update all test fixtures accordingly. Signed-off-by: Alex Leong <alex@buoyant.io>
This commit is contained in:
parent
5f694513bd
commit
530d8beccc
|
@ -91,6 +91,8 @@ func TestRender(t *testing.T) {
|
|||
CNIEnabled: false,
|
||||
IdentityTrustDomain: defaultValues.Global.IdentityTrustDomain,
|
||||
IdentityTrustAnchorsPEM: defaultValues.Global.IdentityTrustAnchorsPEM,
|
||||
PodAnnotations: map[string]string{},
|
||||
PodLabels: map[string]string{},
|
||||
Proxy: &charts.Proxy{
|
||||
DestinationGetNetworks: "DestinationGetNetworks",
|
||||
Image: &charts.Image{
|
||||
|
|
|
@ -65,6 +65,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: dev-undefined
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
|
|
@ -65,6 +65,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: dev-undefined
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
|
|
@ -853,6 +853,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: dev-undefined
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
|
|
@ -853,6 +853,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: dev-undefined
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
|
|
@ -853,6 +853,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: dev-undefined
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
|
|
@ -853,6 +853,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: dev-undefined
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
|
|
@ -850,6 +850,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: dev-undefined
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
|
|
@ -859,6 +859,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: dev-undefined
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
|
|
@ -859,6 +859,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: dev-undefined
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
|
|
@ -809,6 +809,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: dev-undefined
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
|
|
@ -929,6 +929,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: linkerd-version
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
@ -1014,6 +1016,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: linkerd-version
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
@ -1100,6 +1104,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: linkerd-version
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
@ -1211,6 +1217,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: linkerd-version
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
@ -1300,6 +1308,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: linkerd-version
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
|
|
@ -929,6 +929,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: linkerd-version
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
@ -1014,6 +1016,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: linkerd-version
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
@ -1100,6 +1104,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: linkerd-version
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
@ -1211,6 +1217,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: linkerd-version
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
@ -1300,6 +1308,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: linkerd-version
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
@ -1406,6 +1416,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: linkerd-version
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
@ -1492,6 +1504,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: linkerd-version
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
|
|
@ -935,6 +935,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: linkerd-version
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
@ -1019,6 +1021,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: linkerd-version
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
@ -1104,6 +1108,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: linkerd-version
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
@ -1233,6 +1239,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: linkerd-version
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
@ -1321,6 +1329,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: linkerd-version
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
|
|
@ -850,6 +850,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: dev-undefined
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
|
|
@ -853,6 +853,8 @@ data:
|
|||
linkerdNamespaceLabel: LinkerdNamespaceLabel
|
||||
linkerdVersion: ""
|
||||
namespace: Namespace
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
|
|
@ -853,6 +853,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: dev-undefined
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
|
|
@ -853,6 +853,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: dev-undefined
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
|
|
@ -785,6 +785,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: dev-undefined
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
|
|
@ -853,6 +853,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: dev-undefined
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
|
|
@ -853,6 +853,8 @@ data:
|
|||
linkerdNamespaceLabel: linkerd.io/is-control-plane
|
||||
linkerdVersion: dev-undefined
|
||||
namespace: linkerd
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
prometheusUrl: ""
|
||||
proxy:
|
||||
capabilities: null
|
||||
|
|
|
@ -94,6 +94,9 @@ type (
|
|||
ImagePullSecrets []map[string]string `json:"imagePullSecrets"`
|
||||
LinkerdVersion string `json:"linkerdVersion"`
|
||||
|
||||
PodAnnotations map[string]string `json:"podAnnotations"`
|
||||
PodLabels map[string]string `json:"podLabels"`
|
||||
|
||||
Proxy *Proxy `json:"proxy"`
|
||||
ProxyInit *ProxyInit `json:"proxyInit"`
|
||||
}
|
||||
|
|
|
@ -52,6 +52,8 @@ func TestNewValues(t *testing.T) {
|
|||
ControlPlaneTracing: false,
|
||||
HighAvailability: false,
|
||||
IdentityTrustDomain: "cluster.local",
|
||||
PodAnnotations: map[string]string{},
|
||||
PodLabels: map[string]string{},
|
||||
Proxy: &Proxy{
|
||||
EnableExternalProfiles: false,
|
||||
Image: &Image{
|
||||
|
|
Loading…
Reference in New Issue