mirror of
https://github.com/rancher/types.git
synced 2025-07-13 05:14:01 +00:00
SaveAsTemplate action on cluster
This commit is contained in:
parent
b4d1cf2048
commit
81ad21d908
@ -31,6 +31,7 @@ const (
|
||||
ClusterActionRestoreFromEtcdBackup = "restoreFromEtcdBackup"
|
||||
ClusterActionRotateCertificates = "rotateCertificates"
|
||||
ClusterActionRunCISScan = "runSecurityScan"
|
||||
ClusterActionSaveAsTemplate = "saveAsTemplate"
|
||||
|
||||
// ClusterConditionReady Cluster ready to serve API (healthy when true, unhealthy when false)
|
||||
ClusterConditionReady condition.Cond = "Ready"
|
||||
@ -289,3 +290,8 @@ type LocalClusterAuthEndpoint struct {
|
||||
type CertExpiration struct {
|
||||
ExpirationDate string `json:"expirationDate,omitempty"`
|
||||
}
|
||||
|
||||
type SaveAsTemplateInput struct {
|
||||
ClusterTemplateName string `json:"clusterTemplateName,omitempty"`
|
||||
ClusterTemplateRevisionName string `json:"clusterTemplateRevisionName,omitempty"`
|
||||
}
|
||||
|
@ -215,6 +215,7 @@ func clusterTypes(schemas *types.Schemas) *types.Schemas {
|
||||
MustImport(&Version, v3.MonitoringInput{}).
|
||||
MustImport(&Version, v3.MonitoringOutput{}).
|
||||
MustImport(&Version, v3.RestoreFromEtcdBackupInput{}).
|
||||
MustImport(&Version, v3.SaveAsTemplateInput{}).
|
||||
MustImportAndCustomize(&Version, v3.ETCDService{}, func(schema *types.Schema) {
|
||||
schema.MustCustomizeField("extraArgs", func(field types.Field) types.Field {
|
||||
field.Default = map[string]interface{}{
|
||||
@ -259,6 +260,9 @@ func clusterTypes(schemas *types.Schemas) *types.Schemas {
|
||||
Output: "rotateCertificateOutput",
|
||||
}
|
||||
schema.ResourceActions[v3.ClusterActionRunCISScan] = types.Action{}
|
||||
schema.ResourceActions[v3.ClusterActionSaveAsTemplate] = types.Action{
|
||||
Input: "saveAsTemplateInput",
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user