func addClusterPolicy(policies map[string]map[string]authorizationapi.ClusterPolicy, policy authorizationapi.ClusterPolicy) { resourceVersion += 1 policy.ResourceVersion = fmt.Sprintf("%d", resourceVersion) namespacedClusterPolicies, ok := policies[policy.Namespace] if !ok { namespacedClusterPolicies = make(map[string]authorizationapi.ClusterPolicy) policies[policy.Namespace] = namespacedClusterPolicies } namespacedClusterPolicies[policy.Name] = policy }
// and now the globals func convert_v1beta3_ClusterPolicy_To_api_ClusterPolicy(in *ClusterPolicy, out *newer.ClusterPolicy, s conversion.Scope) error { out.LastModified = in.LastModified out.Roles = make(map[string]*newer.ClusterRole) return s.DefaultConvert(in, out, conversion.IgnoreMissingFields) }