mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-08-03 16:19:58 +00:00
Add new CRD for etcd snapshots
Also adds a hack go script to print the embedded CRDs, for developer use. Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
committed by
Brad Davidson
parent
64107b54e4
commit
500744bb94
@@ -6,10 +6,19 @@ import (
|
||||
)
|
||||
|
||||
func List() []crd.CRD {
|
||||
addon := crd.NamespacedType("Addon.k3s.cattle.io/v1").
|
||||
WithSchemaFromStruct(v1.Addon{}).
|
||||
WithColumn("Source", ".spec.source").
|
||||
WithColumn("Checksum", ".spec.checksum")
|
||||
|
||||
return []crd.CRD{addon}
|
||||
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"),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user