code: func RoleForCertAuthority(ca CertAuthority) Role {
  	return &RoleV3{
  		Kind:    KindRole,
  		Version: V3,
  		Metadata: Metadata{
  			Name:      RoleNameForCertAuthority(ca.GetClusterName()),
  			Namespace: defaults.Namespace,
  		},
  		Spec: RoleSpecV3{
  			Options: RoleOptions{
  				MaxSessionTTL: NewDuration(defaults.MaxCertDuration),
  			},
  			Allow: RoleConditions{
  				Namespaces: []string{defaults.Namespace},
  				NodeLabels: Labels{Wildcard: []string{Wildcard}},
  				Rules:      CopyRulesSlice(DefaultCertAuthorityRules),
  			},
  		},
  	}
  }
docs: // RoleForCertauthority creates role using services.CertAuthority.