-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add serviceUID/configUID labels to pods & deployments, serviceUID label to configs #10539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,6 +49,10 @@ func TestMakeRevisions(t *testing.T) { | |
| Namespace: "no", | ||
| Name: "build", | ||
| Generation: 10, | ||
| Labels: map[string]string{ | ||
| serving.ServiceUIDLabelKey: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb", | ||
| }, | ||
| UID: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", | ||
| }, | ||
| Spec: v1.ConfigurationSpec{ | ||
| Template: v1.RevisionTemplateSpec{ | ||
|
|
@@ -72,12 +76,15 @@ func TestMakeRevisions(t *testing.T) { | |
| Name: "build", | ||
| Controller: ptr.Bool(true), | ||
| BlockOwnerDeletion: ptr.Bool(true), | ||
| UID: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", | ||
| }}, | ||
| Labels: map[string]string{ | ||
| serving.RoutingStateLabelKey: "pending", | ||
| serving.ConfigurationLabelKey: "build", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you don't seem to have any positive tests here.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yep - on my todo list - wanted to get the core of this out there for review ASAP. Coming soon...
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
| serving.ConfigurationGenerationLabelKey: "10", | ||
| serving.ConfigUIDLabelKey: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", | ||
| serving.RoutingStateLabelKey: "pending", | ||
| serving.ServiceLabelKey: "", | ||
| serving.ServiceUIDLabelKey: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb", | ||
| }, | ||
| Annotations: map[string]string{ | ||
| serving.RoutingStateModifiedAnnotationKey: v1.RoutingStateModifiedString(clock), | ||
|
|
@@ -98,6 +105,10 @@ func TestMakeRevisions(t *testing.T) { | |
| Namespace: "with", | ||
| Name: "labels", | ||
| Generation: 100, | ||
| Labels: map[string]string{ | ||
| serving.ServiceUIDLabelKey: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb", | ||
| }, | ||
| UID: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", | ||
| }, | ||
| Spec: v1.ConfigurationSpec{ | ||
| Template: v1.RevisionTemplateSpec{ | ||
|
|
@@ -130,12 +141,15 @@ func TestMakeRevisions(t *testing.T) { | |
| Name: "labels", | ||
| Controller: ptr.Bool(true), | ||
| BlockOwnerDeletion: ptr.Bool(true), | ||
| UID: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", | ||
| }}, | ||
| Labels: map[string]string{ | ||
| serving.ConfigurationLabelKey: "labels", | ||
| serving.ConfigurationGenerationLabelKey: "100", | ||
| serving.ServiceLabelKey: "", | ||
| serving.ConfigUIDLabelKey: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", | ||
| serving.RoutingStateLabelKey: "pending", | ||
| serving.ServiceLabelKey: "", | ||
| serving.ServiceUIDLabelKey: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb", | ||
| "foo": "bar", | ||
| "baz": "blah", | ||
| }, | ||
|
|
@@ -155,6 +169,10 @@ func TestMakeRevisions(t *testing.T) { | |
| Namespace: "with", | ||
| Name: "annotations", | ||
| Generation: 100, | ||
| Labels: map[string]string{ | ||
| serving.ServiceUIDLabelKey: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb", | ||
| }, | ||
| UID: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", | ||
| }, | ||
| Spec: v1.ConfigurationSpec{ | ||
| Template: v1.RevisionTemplateSpec{ | ||
|
|
@@ -184,12 +202,15 @@ func TestMakeRevisions(t *testing.T) { | |
| Name: "annotations", | ||
| Controller: ptr.Bool(true), | ||
| BlockOwnerDeletion: ptr.Bool(true), | ||
| UID: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", | ||
| }}, | ||
| Labels: map[string]string{ | ||
| serving.ConfigurationLabelKey: "annotations", | ||
| serving.ConfigurationGenerationLabelKey: "100", | ||
| serving.ServiceLabelKey: "", | ||
| serving.ConfigUIDLabelKey: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", | ||
| serving.RoutingStateLabelKey: "pending", | ||
| serving.ServiceLabelKey: "", | ||
| serving.ServiceUIDLabelKey: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb", | ||
| }, | ||
| Annotations: map[string]string{ | ||
| "foo": "bar", | ||
|
|
@@ -217,7 +238,11 @@ func TestMakeRevisions(t *testing.T) { | |
| "serving.knative.dev/lastModifier": "someone", | ||
| serving.RoutesAnnotationKey: "route", | ||
| }, | ||
| Labels: map[string]string{ | ||
| serving.ServiceUIDLabelKey: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb", | ||
| }, | ||
| Generation: 10, | ||
| UID: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", | ||
| }, | ||
| Spec: v1.ConfigurationSpec{ | ||
| Template: v1.RevisionTemplateSpec{ | ||
|
|
@@ -246,12 +271,15 @@ func TestMakeRevisions(t *testing.T) { | |
| Name: "config", | ||
| Controller: ptr.Bool(true), | ||
| BlockOwnerDeletion: ptr.Bool(true), | ||
| UID: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", | ||
| }}, | ||
| Labels: map[string]string{ | ||
| serving.ConfigurationLabelKey: "config", | ||
| serving.ConfigurationGenerationLabelKey: "10", | ||
| serving.ServiceLabelKey: "", | ||
| serving.ConfigUIDLabelKey: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", | ||
| serving.RoutingStateLabelKey: "active", | ||
| serving.ServiceLabelKey: "", | ||
| serving.ServiceUIDLabelKey: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb", | ||
| }, | ||
| }, | ||
| Spec: v1.RevisionSpec{ | ||
|
|
@@ -272,7 +300,11 @@ func TestMakeRevisions(t *testing.T) { | |
| "serving.knative.dev/creator": "admin", | ||
| "serving.knative.dev/lastModifier": "someone", | ||
| }, | ||
| Labels: map[string]string{ | ||
| serving.ServiceUIDLabelKey: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb", | ||
| }, | ||
| Generation: 10, | ||
| UID: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", | ||
| }, | ||
| Spec: v1.ConfigurationSpec{ | ||
| Template: v1.RevisionTemplateSpec{ | ||
|
|
@@ -308,12 +340,15 @@ func TestMakeRevisions(t *testing.T) { | |
| Name: "config", | ||
| Controller: ptr.Bool(true), | ||
| BlockOwnerDeletion: ptr.Bool(true), | ||
| UID: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", | ||
| }}, | ||
| Labels: map[string]string{ | ||
| serving.ConfigurationLabelKey: "config", | ||
| serving.ConfigurationGenerationLabelKey: "10", | ||
| serving.ServiceLabelKey: "", | ||
| serving.ConfigUIDLabelKey: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", | ||
| serving.RoutingStateLabelKey: "pending", | ||
| serving.ServiceLabelKey: "", | ||
| serving.ServiceUIDLabelKey: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb", | ||
| }, | ||
| }, | ||
| Spec: v1.RevisionSpec{ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.