mirror of
https://github.com/rancher/types.git
synced 2025-09-22 10:27:53 +00:00
GenerateKubeconfig action on cluster
This commit is contained in:
committed by
Darren Shepherd
parent
3edfdf9ae3
commit
410af5d656
@@ -220,3 +220,7 @@ type ClusterRegistrationTokenStatus struct {
|
||||
ManifestURL string `json:"manifestUrl"`
|
||||
Token string `json:"token"`
|
||||
}
|
||||
|
||||
type GenerateKubeConfigOutput struct {
|
||||
Config string `json:"config"`
|
||||
}
|
||||
|
@@ -133,6 +133,7 @@ func clusterTypes(schemas *types.Schemas) *types.Schemas {
|
||||
MustImport(&Version, v3.Cluster{}).
|
||||
MustImport(&Version, v3.ClusterEvent{}).
|
||||
MustImport(&Version, v3.ClusterRegistrationToken{}).
|
||||
MustImport(&Version, v3.GenerateKubeConfigOutput{}).
|
||||
MustImportAndCustomize(&Version, v3.Cluster{}, func(schema *types.Schema) {
|
||||
schema.MustCustomizeField("name", func(field types.Field) types.Field {
|
||||
field.Type = "dnsLabel"
|
||||
@@ -140,6 +141,9 @@ func clusterTypes(schemas *types.Schemas) *types.Schemas {
|
||||
field.Required = false
|
||||
return field
|
||||
})
|
||||
schema.ResourceActions["generateKubeconfig"] = types.Action{
|
||||
Output: "generateKubeConfigOutput",
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user