Repository: kubernetes/kubernetes
File: test/integration/etcd/data.go (Go)

Code before:
		},
		// --

		// k8s.io/kubernetes/pkg/apis/networking/v1beta1
		gvr("networking.k8s.io", "v1beta1", "servicecidrs"): {
			Stub:             `{"metadata": {"name": "range-b1"}, "spec": {"cidrs": ["192.168.0.0/16","fd00:1::/120"]}}`,
			ExpectedEtcdPath: "/registry/servicecidrs/range-b1",
		},
		// --

		// k8s.io/kubernetes/pkg/apis/policy/v1
		gvr("policy", "v1", "poddisruptionbudgets"): {
			Stub:             `{"metadata": {"name": "pdbv1"}, "spec": {"selector": {"matchLabels": {"anokkey": "anokvalue"}}}}`,
			ExpectedEtcdPath: "/registry/poddisruptionbudgets/" + namespace + "/pdbv1",
		},
		// --

		// k8s.io/kubernetes/pkg/apis/storagemigration/v1alpha1
		gvr("storagemigration.k8s.io", "v1alpha1", "storageversionmigrations"): {
			Stub:             `{"metadata": {"name": "test-migration"}, "spec":{"resource": {"group": "test-group", "resource": "test-resource", "version": "test-version"}}}`,
			ExpectedEtcdPath: "/registry/storageversionmigrations/test-migration",
		},
		// --

		// k8s.io/kubernetes/pkg/apis/flowcontrol/v1beta3
		// gvr("flowcontrol.apiserver.k8s.io", "v1beta3", "flowschemas"): {
		// 	Stub:             `{"metadata": {"name": "fs-2"}, "spec": {"priorityLevelConfiguration": {"name": "name1"}}}`,
		// 	ExpectedEtcdPath: "/registry/flowschemas/fs-2",
		// 	ExpectedGVK:      gvkP("flowcontrol.apiserver.k8s.io", "v1", "FlowSchema"),
		// },
		// --

		// k8s.io/kubernetes/pkg/apis/flowcontrol/v1beta3
		// gvr("flowcontrol.apiserver.k8s.io", "v1beta3", "prioritylevelconfigurations"): {
		// 	Stub:             `{"metadata": {"name": "conf4"}, "spec": {"type": "Limited", "limited": {"nominalConcurrencyShares":3, "limitResponse": {"type": "Reject"}}}}`,
		// 	ExpectedEtcdPath: "/registry/prioritylevelconfigurations/conf4",
		// 	ExpectedGVK:      gvkP("flowcontrol.apiserver.k8s.io", "v1", "PriorityLevelConfiguration"),
		// },
		// --

		// k8s.io/kubernetes/pkg/apis/flowcontrol/v1
		gvr("flowcontrol.apiserver.k8s.io", "v1", "flowschemas"): {
			Stub:             `{"metadata": {"name": "fs-3"}, "spec": {"priorityLevelConfiguration": {"name": "name1"}}}`,
			ExpectedEtcdPath: "/registry/flowschemas/fs-3",
		},
		// --

		// k8s.io/kubernetes/pkg/apis/flowcontrol/v1
		gvr("flowcontrol.apiserver.k8s.io", "v1", "prioritylevelconfigurations"): {
			Stub:             `{"metadata": {"name": "conf5"}, "spec": {"type": "Limited", "limited": {"nominalConcurrencyShares":3, "limitResponse": {"type": "Reject"}}}}`,
			ExpectedEtcdPath: "/registry/prioritylevelconfigurations/conf5",

Review comment (suggestion):
Normally we can just remove these, but with emulated version we need to test the existence of these gvs on previous emulated versions. I don't have a good solution at the moment, but I think we need to version these fixtures to indicate the release they were added/removed similar to feature gates.

Code after:

		// k8s.io/kubernetes/pkg/apis/events/v1
		gvr("events.k8s.io", "v1", "events"): {
			Stub:             `{"metadata": {"name": "event3"}, "regarding": {"namespace": "` + namespace + `"}, "note": "some data here", "eventTime": "2017-08-09T15:04:05.000000Z", "reportingInstance": "node-xyz", "reportingController": "k8s.io/my-controller", "action": "DidNothing", "reason": "Laziness", "type": "Normal"}`,
			ExpectedEtcdPath: "/registry/events/" + namespace + "/event3",
			ExpectedGVK:      gvkP("", "v1", "Event"),
		},
		// --

		// k8s.io/kubernetes/pkg/apis/networking/v1
		gvr("networking.k8s.io", "v1", "ingresses"): {
			Stub:             `{"metadata": {"name": "ingress3"}, "spec": {"defaultBackend": {"service":{"name":"service", "port":{"number": 5000}}}}}`,
			ExpectedEtcdPath: "/registry/ingress/" + namespace + "/ingress3",
		},
		gvr("networking.k8s.io", "v1", "ingressclasses"): {
			Stub:             `{"metadata": {"name": "ingressclass3"}, "spec": {"controller": "example.com/controller"}}`,
			ExpectedEtcdPath: "/registry/ingressclasses/ingressclass3",
		},
		gvr("networking.k8s.io", "v1", "networkpolicies"): {
			Stub:             `{"metadata": {"name": "np2"}, "spec": {"podSelector": {"matchLabels": {"e": "f"}}}}`,
			ExpectedEtcdPath: "/registry/networkpolicies/" + namespace + "/np2",
		},
		// --

		// k8s.io/kubernetes/pkg/apis/networking/v1beta1
		gvr("networking.k8s.io", "v1beta1", "ipaddresses"): {
			Stub:             `{"metadata": {"name": "192.168.1.3"}, "spec": {"parentRef": {"resource": "services","name": "test", "namespace": "ns"}}}`,
			ExpectedEtcdPath: "/registry/ipaddresses/192.168.1.3",
		},
		// --

		// k8s.io/kubernetes/pkg/apis/networking/v1beta1
		gvr("networking.k8s.io", "v1beta1", "servicecidrs"): {
			Stub:             `{"metadata": {"name": "range-b1"}, "spec": {"cidrs": ["192.168.0.0/16","fd00:1::/120"]}}`,
			ExpectedEtcdPath: "/registry/servicecidrs/range-b1",
		},
		// --

		// k8s.io/kubernetes/pkg/apis/policy/v1
		gvr("policy", "v1", "poddisruptionbudgets"): {
			Stub:             `{"metadata": {"name": "pdbv1"}, "spec": {"selector": {"matchLabels": {"anokkey": "anokvalue"}}}}`,
			ExpectedEtcdPath: "/registry/poddisruptionbudgets/" + namespace + "/pdbv1",
		},
		// --

		// k8s.io/kubernetes/pkg/apis/storagemigration/v1alpha1
		gvr("storagemigration.k8s.io", "v1alpha1", "storageversionmigrations"): {
			Stub:             `{"metadata": {"name": "test-migration"}, "spec":{"resource": {"group": "test-group", "resource": "test-resource", "version": "test-version"}}}`,
			ExpectedEtcdPath: "/registry/storageversionmigrations/test-migration",
		},
		// --