本文整理汇总了Golang中k8s/io/kubernetes/pkg/apis/rbac.Subject.Name方法的典型用法代码示例。如果您正苦于以下问题:Golang Subject.Name方法的具体用法?Golang Subject.Name怎么用?Golang Subject.Name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类k8s/io/kubernetes/pkg/apis/rbac.Subject
的用法示例。
在下文中一共展示了Subject.Name方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: autoConvert_v1alpha1_Subject_To_rbac_Subject
func autoConvert_v1alpha1_Subject_To_rbac_Subject(in *Subject, out *rbac.Subject, s conversion.Scope) error {
out.Kind = in.Kind
out.APIVersion = in.APIVersion
out.Name = in.Name
out.Namespace = in.Namespace
return nil
}
示例2: Convert_v1alpha1_Subject_To_rbac_Subject
func Convert_v1alpha1_Subject_To_rbac_Subject(in *Subject, out *api.Subject, s conversion.Scope) error {
if err := autoConvert_v1alpha1_Subject_To_rbac_Subject(in, out, s); err != nil {
return err
}
// User * in v1alpha1 will only match all authenticated users
// This is only for compatibility with old RBAC bindings
// Special treatment for * should not be included in v1beta1
if out.Kind == UserKind && out.Name == "*" {
out.Kind = GroupKind
out.Name = allAuthenticated
}
return nil
}