From 5e15f22b0d3ad764f3ceda88df7fdf8ee77ef14f Mon Sep 17 00:00:00 2001 From: Silvio Moioli Date: Thu, 19 Dec 2024 17:01:09 +0100 Subject: [PATCH] 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 * Fix typo --------- Signed-off-by: Silvio Moioli --- pkg/stores/sqlproxy/proxy_store.go | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/pkg/stores/sqlproxy/proxy_store.go b/pkg/stores/sqlproxy/proxy_store.go index f6b8fb98..a257a401 100644 --- a/pkg/stores/sqlproxy/proxy_store.go +++ b/pkg/stores/sqlproxy/proxy_store.go @@ -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{