From 3ed97eb14c112fabd3d56c93e1e2f738efec8dc6 Mon Sep 17 00:00:00 2001 From: derailed Date: Tue, 29 Jun 2021 23:30:51 -0600 Subject: [PATCH] fix cron triggers again... --- .gitignore | 1 + internal/dao/registry.go | 2 +- internal/view/registrar.go | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2614fe70..0fc43836 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ faas .settings/* demos /code +kind \ No newline at end of file diff --git a/internal/dao/registry.go b/internal/dao/registry.go index 6092c785..7add4c11 100644 --- a/internal/dao/registry.go +++ b/internal/dao/registry.go @@ -43,8 +43,8 @@ func AccessorFor(f Factory, gvr client.GVR) (Accessor, error) { client.NewGVR("v1/nodes"): &Node{}, client.NewGVR("apps/v1/deployments"): &Deployment{}, client.NewGVR("apps/v1/daemonsets"): &DaemonSet{}, - client.NewGVR("apps/v1/daemonsets"): &DaemonSet{}, client.NewGVR("apps/v1/statefulsets"): &StatefulSet{}, + client.NewGVR("batch/v1/cronjobs"): &CronJob{}, client.NewGVR("batch/v1beta1/cronjobs"): &CronJob{}, client.NewGVR("batch/v1/jobs"): &Job{}, client.NewGVR("openfaas"): &OpenFaas{}, diff --git a/internal/view/registrar.go b/internal/view/registrar.go index 7c006f3a..11b99017 100644 --- a/internal/view/registrar.go +++ b/internal/view/registrar.go @@ -135,6 +135,9 @@ func rbacViewers(vv MetaViewers) { } func batchViewers(vv MetaViewers) { + vv[client.NewGVR("batch/v1/cronjobs")] = MetaViewer{ + viewerFn: NewCronJob, + } vv[client.NewGVR("batch/v1beta1/cronjobs")] = MetaViewer{ viewerFn: NewCronJob, }