1
0
mirror of https://github.com/rancher/steve.git synced 2025-06-28 15:57:24 +00:00

SQLite backed cache: indexed fields round #4 (#430)

* Change indexed fields according to https://github.com/rancher/rancher/issues/48256wq

Signed-off-by: Silvio Moioli <silvio@moioli.net>

* Fix typo

---------

Signed-off-by: Silvio Moioli <silvio@moioli.net>
This commit is contained in:
Silvio Moioli 2024-12-19 17:01:09 +01:00 committed by GitHub
parent 58f2264f16
commit 5e15f22b0d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -76,7 +76,6 @@ var (
{"spec", "nodeName"}},
gvkKey("", "v1", "Service"): {
{"spec", "targetPort"},
{"spec", "selector"},
{"spec", "type"},
},
gvkKey("networking.k8s.io", "v1", "Ingress"): {
@ -97,10 +96,28 @@ var (
{"spec", "maxReplicas"},
{"spec", "currentReplicas"},
},
gvkKey("apps", "v1", "DaemonSet"): {
{"metadata", "annotations[field.cattle.io/publicEndpoints]"},
},
gvkKey("apps", "v1", "Deployment"): {
{"metadata", "annotations[field.cattle.io/publicEndpoints]"},
},
gvkKey("apps", "v1", "StatefulSet"): {
{"metadata", "annotations[field.cattle.io/publicEndpoints]"},
},
gvkKey("batch", "v1", "CronJob"): {
{"metadata", "annotations[field.cattle.io/publicEndpoints]"},
},
gvkKey("batch", "v1", "Job"): {
{"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"): {
{"spec", "chart", "metadata", "name"},
},
gvkKey("catalog.cattle.io", "v1", "ClusterRepo"): {
{"metadata", "annotations[clusterrepo.cattle.io/hidden]"},
{"spec", "gitBranch"},
@ -114,8 +131,10 @@ var (
gvkKey("cluster.x-k8s.io", "v1beta1", "Machine"): {
{"spec", "clusterName"}},
gvkKey("management.cattle.io", "v3", "Cluster"): {
{"metadata", "labels[provider.cattle.io]"},
{"spec", "internal"},
{"spec", "displayName"},
{"status", "provider"},
},
gvkKey("management.cattle.io", "v3", "Node"): {
{"status", "nodeName"}},
@ -127,9 +146,6 @@ var (
{"metadata", "labels[provider.cattle.io]"},
{"status", "clusterName"},
{"status", "provider"},
{"status", "allocatable", "cpu"},
{"status", "allocatable", "memory"},
{"status", "allocatable", "pods"},
},
}
commonIndexFields = [][]string{