mirror of
https://github.com/rancher/steve.git
synced 2025-08-14 12:35:24 +00:00
[v2.9] sort typeSpecificIndexedFields lexicographically (#438)
This commit is contained in:
parent
b88abd9aa0
commit
6b5543e762
@ -61,6 +61,8 @@ var (
|
|||||||
paramScheme = runtime.NewScheme()
|
paramScheme = runtime.NewScheme()
|
||||||
paramCodec = runtime.NewParameterCodec(paramScheme)
|
paramCodec = runtime.NewParameterCodec(paramScheme)
|
||||||
typeSpecificIndexedFields = map[string][][]string{
|
typeSpecificIndexedFields = map[string][][]string{
|
||||||
|
gvkKey("", "v1", "ConfigMap"): {
|
||||||
|
{"metadata", "labels[harvesterhci.io/cloud-init-template]"}},
|
||||||
gvkKey("", "v1", "Event"): {
|
gvkKey("", "v1", "Event"): {
|
||||||
{"_type"},
|
{"_type"},
|
||||||
{"involvedObject", "kind"},
|
{"involvedObject", "kind"},
|
||||||
@ -72,30 +74,18 @@ var (
|
|||||||
gvkKey("", "v1", "Node"): {
|
gvkKey("", "v1", "Node"): {
|
||||||
{"status", "nodeInfo", "kubeletVersion"},
|
{"status", "nodeInfo", "kubeletVersion"},
|
||||||
{"status", "nodeInfo", "operatingSystem"}},
|
{"status", "nodeInfo", "operatingSystem"}},
|
||||||
gvkKey("", "v1", "Pod"): {
|
|
||||||
{"spec", "containers", "image"},
|
|
||||||
{"spec", "nodeName"}},
|
|
||||||
gvkKey("", "v1", "Service"): {
|
|
||||||
{"spec", "clusterIP"},
|
|
||||||
{"spec", "type"},
|
|
||||||
},
|
|
||||||
gvkKey("networking.k8s.io", "v1", "Ingress"): {
|
|
||||||
{"spec", "rules", "host"},
|
|
||||||
{"spec", "ingressClassName"},
|
|
||||||
},
|
|
||||||
gvkKey("", "v1", "ConfigMap"): {
|
|
||||||
{"metadata", "labels[harvesterhci.io/cloud-init-template]"}},
|
|
||||||
gvkKey("", "v1", "PersistentVolume"): {
|
gvkKey("", "v1", "PersistentVolume"): {
|
||||||
{"status", "reason"},
|
{"status", "reason"},
|
||||||
{"spec", "persistentVolumeReclaimPolicy"},
|
{"spec", "persistentVolumeReclaimPolicy"},
|
||||||
},
|
},
|
||||||
gvkKey("", "v1", "PersistentVolumeClaim"): {
|
gvkKey("", "v1", "PersistentVolumeClaim"): {
|
||||||
{"spec", "volumeName"}},
|
{"spec", "volumeName"}},
|
||||||
gvkKey("autoscaling", "v2", "HorizontalPodAutoscaler"): {
|
gvkKey("", "v1", "Pod"): {
|
||||||
{"spec", "scaleTargetRef", "name"},
|
{"spec", "containers", "image"},
|
||||||
{"spec", "minReplicas"},
|
{"spec", "nodeName"}},
|
||||||
{"spec", "maxReplicas"},
|
gvkKey("", "v1", "Service"): {
|
||||||
{"status", "currentReplicas"},
|
{"spec", "clusterIP"},
|
||||||
|
{"spec", "type"},
|
||||||
},
|
},
|
||||||
gvkKey("apps", "v1", "DaemonSet"): {
|
gvkKey("apps", "v1", "DaemonSet"): {
|
||||||
{"metadata", "annotations[field.cattle.io/publicEndpoints]"},
|
{"metadata", "annotations[field.cattle.io/publicEndpoints]"},
|
||||||
@ -106,16 +96,18 @@ var (
|
|||||||
gvkKey("apps", "v1", "StatefulSet"): {
|
gvkKey("apps", "v1", "StatefulSet"): {
|
||||||
{"metadata", "annotations[field.cattle.io/publicEndpoints]"},
|
{"metadata", "annotations[field.cattle.io/publicEndpoints]"},
|
||||||
},
|
},
|
||||||
|
gvkKey("autoscaling", "v2", "HorizontalPodAutoscaler"): {
|
||||||
|
{"spec", "scaleTargetRef", "name"},
|
||||||
|
{"spec", "minReplicas"},
|
||||||
|
{"spec", "maxReplicas"},
|
||||||
|
{"status", "currentReplicas"},
|
||||||
|
},
|
||||||
gvkKey("batch", "v1", "CronJob"): {
|
gvkKey("batch", "v1", "CronJob"): {
|
||||||
{"metadata", "annotations[field.cattle.io/publicEndpoints]"},
|
{"metadata", "annotations[field.cattle.io/publicEndpoints]"},
|
||||||
},
|
},
|
||||||
gvkKey("batch", "v1", "Job"): {
|
gvkKey("batch", "v1", "Job"): {
|
||||||
{"metadata", "annotations[field.cattle.io/publicEndpoints]"},
|
{"metadata", "annotations[field.cattle.io/publicEndpoints]"},
|
||||||
},
|
},
|
||||||
gvkKey("storage.k8s.io", "v1", "StorageClass"): {
|
|
||||||
{"provisioner"},
|
|
||||||
{"metadata", "annotations[storageclass.kubernetes.io/is-default-class]"},
|
|
||||||
},
|
|
||||||
gvkKey("catalog.cattle.io", "v1", "App"): {
|
gvkKey("catalog.cattle.io", "v1", "App"): {
|
||||||
{"spec", "chart", "metadata", "name"},
|
{"spec", "chart", "metadata", "name"},
|
||||||
},
|
},
|
||||||
@ -143,11 +135,19 @@ var (
|
|||||||
{"spec", "clusterName"}},
|
{"spec", "clusterName"}},
|
||||||
gvkKey("management.cattle.io", "v3", "NodeTemplate"): {
|
gvkKey("management.cattle.io", "v3", "NodeTemplate"): {
|
||||||
{"spec", "clusterName"}},
|
{"spec", "clusterName"}},
|
||||||
|
gvkKey("networking.k8s.io", "v1", "Ingress"): {
|
||||||
|
{"spec", "rules", "host"},
|
||||||
|
{"spec", "ingressClassName"},
|
||||||
|
},
|
||||||
gvkKey("provisioning.cattle.io", "v1", "Cluster"): {
|
gvkKey("provisioning.cattle.io", "v1", "Cluster"): {
|
||||||
{"metadata", "labels[provider.cattle.io]"},
|
{"metadata", "labels[provider.cattle.io]"},
|
||||||
{"status", "clusterName"},
|
{"status", "clusterName"},
|
||||||
{"status", "provider"},
|
{"status", "provider"},
|
||||||
},
|
},
|
||||||
|
gvkKey("storage.k8s.io", "v1", "StorageClass"): {
|
||||||
|
{"provisioner"},
|
||||||
|
{"metadata", "annotations[storageclass.kubernetes.io/is-default-class]"},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
commonIndexFields = [][]string{
|
commonIndexFields = [][]string{
|
||||||
{`id`},
|
{`id`},
|
||||||
|
Loading…
Reference in New Issue
Block a user