1
0
mirror of https://github.com/rancher/types.git synced 2025-08-01 04:57:05 +00:00

RBAC for multiclusterapp and globalDNS

This commit is contained in:
rajashree 2019-01-10 21:08:50 +05:30 committed by Alena Prokharchyk
parent ccaf175432
commit 93dc9ff0d6
3 changed files with 11 additions and 0 deletions

View File

@ -22,6 +22,7 @@ type GlobalDNSSpec struct {
ProjectNames []string `json:"projectNames" norman:"type=array[reference[project]]"`
MultiClusterAppName string `json:"multiClusterAppName,omitempty" norman:"type=reference[multiClusterApp]"`
ProviderName string `json:"providerName,omitempty" norman:"type=reference[globalDnsProvider]"`
Members []Member `json:"members,omitempty"`
}
type GlobalDNSStatus struct {

View File

@ -22,6 +22,7 @@ type MultiClusterAppSpec struct {
TemplateVersionName string `json:"templateVersionName,omitempty" norman:"type=reference[templateVersion],required"`
Answers []Answer `json:"answers,omitempty"`
Targets []Target `json:"targets,omitempty" norman:"required"`
Members []Member `json:"members,omitempty"`
}
type MultiClusterAppStatus struct {
@ -39,3 +40,11 @@ type Answer struct {
ClusterName string `json:"clusterName,omitempty" norman:"type=reference[cluster]"`
Values map[string]string `json:"values,omitempty" norman:"required"`
}
type Member struct {
UserName string `json:"userName,omitempty" norman:"type=reference[user]"`
UserPrincipalName string `json:"userPrincipalName,omitempty" norman:"type=reference[principal]"`
DisplayName string `json:"displayName,omitempty"`
GroupPrincipalName string `json:"groupPrincipalName,omitempty" norman:"type=reference[principal]"`
AccessType string `json:"accessType,omitempty" norman:"type=enum,options=all|readonly|update"`
}

View File

@ -620,6 +620,7 @@ func clusterCatalogTypes(schemas *types.Schemas) *types.Schemas {
func multiClusterAppTypes(schemas *types.Schemas) *types.Schemas {
return schemas.
AddMapperForType(&Version, v3.MultiClusterApp{}, m.Drop{Field: "namespaceId"}).
AddMapperForType(&Version, v3.Member{}, m.Drop{Field: "userName"}, m.Drop{Field: "displayName"}).
MustImport(&Version, v3.MultiClusterApp{}).
MustImport(&Version, v3.Target{})
}