2023-04-18 20:52:24 +00:00
|
|
|
package crd
|
|
|
|
|
|
|
|
import (
|
|
|
|
v1 "github.com/k3s-io/k3s/pkg/apis/k3s.cattle.io/v1"
|
2024-05-06 16:42:27 +00:00
|
|
|
"github.com/rancher/wrangler/v3/pkg/crd"
|
2023-04-18 20:52:24 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func List() []crd.CRD {
|
2023-09-08 16:35:14 +00:00
|
|
|
addon := v1.Addon{}
|
|
|
|
etcdSnapshotFile := v1.ETCDSnapshotFile{}
|
|
|
|
return []crd.CRD{
|
|
|
|
crd.NamespacedType("Addon.k3s.cattle.io/v1").
|
|
|
|
WithSchemaFromStruct(addon).
|
|
|
|
WithColumn("Source", ".spec.source").
|
|
|
|
WithColumn("Checksum", ".spec.checksum"),
|
|
|
|
crd.NonNamespacedType("ETCDSnapshotFile.k3s.cattle.io/v1").
|
|
|
|
WithSchemaFromStruct(etcdSnapshotFile).
|
|
|
|
WithColumn("SnapshotName", ".spec.snapshotName").
|
|
|
|
WithColumn("Node", ".spec.nodeName").
|
|
|
|
WithColumn("Location", ".spec.location").
|
|
|
|
WithColumn("Size", ".status.size").
|
|
|
|
WithColumn("CreationTime", ".status.creationTime"),
|
|
|
|
}
|
2023-04-18 20:52:24 +00:00
|
|
|
}
|