Skip to content

Commit

Permalink
SQLite backed cache: indexed fields round #4 (#430)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
moio authored Dec 19, 2024
1 parent 58f2264 commit 5e15f22
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions pkg/stores/sqlproxy/proxy_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ var (
{"spec", "nodeName"}},
gvkKey("", "v1", "Service"): {
{"spec", "targetPort"},
{"spec", "selector"},
{"spec", "type"},
},
gvkKey("networking.k8s.io", "v1", "Ingress"): {
Expand All @@ -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"},
Expand All @@ -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"}},
Expand All @@ -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{
Expand Down

0 comments on commit 5e15f22

Please sign in to comment.