Skip to content

Commit b57f993

Browse files
committed
Feat: Add StatefulSet and Deployments to the job list
1 parent 96e5e33 commit b57f993

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

internal/jobs/job_list.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,24 @@ func K8sJobList() []Job {
3737
return jsonPods
3838
},
3939
},
40+
{
41+
Name: "deployment-list",
42+
OutputFile: "/list/deployments.json",
43+
RetrieveFunction: func(c *kubernetes.Clientset, ctx context.Context) []byte {
44+
leases, _ := c.AppsV1().Deployments("").List(ctx, v1.ListOptions{})
45+
jsonLeases, _ := json.MarshalIndent(leases, "", " ")
46+
return jsonLeases
47+
},
48+
},
49+
{
50+
Name: "statefulset-list",
51+
OutputFile: "/list/StatefulSets.json",
52+
RetrieveFunction: func(c *kubernetes.Clientset, ctx context.Context) []byte {
53+
leases, _ := c.AppsV1().StatefulSets("").List(ctx, v1.ListOptions{})
54+
jsonLeases, _ := json.MarshalIndent(leases, "", " ")
55+
return jsonLeases
56+
},
57+
},
4058
{
4159
Name: "server-version",
4260
OutputFile: "/k8s/server_version.json",

0 commit comments

Comments
 (0)