Documentation ¶
Index ¶
- Constants
- func CalculateRoleBindings(existingRoleBindings []*cloudresourcemanager.Binding, ...) ([]*cloudresourcemanager.Binding, bool)
- func GenerateProjectID(domain, environment, teamSlug string) string
- func GetProjectDisplayName(teamSlug, environment string) string
- func New(ctx context.Context, clusters gcp.Clusters, ...) (reconcilers.Reconciler, error)
- type GcpServices
- type OptFunc
Constants ¶
View Source
const ( ManagedByLabelName = "managed-by" ManagedByLabelValue = "api-reconcilers" )
View Source
const CNRMRoleId = "CustomCNRMRole"
Variables ¶
This section is empty.
Functions ¶
func CalculateRoleBindings ¶
func CalculateRoleBindings(existingRoleBindings []*cloudresourcemanager.Binding, requiredRoleBindings map[string][]string) ([]*cloudresourcemanager.Binding, bool)
CalculateRoleBindings Given a set of role bindings, make sure the ones in requiredRoleBindings are present
func GenerateProjectID ¶
GenerateProjectID Generate a unique project ID for the team in a given environment in a deterministic fashion
func GetProjectDisplayName ¶
GetProjectDisplayName Get the display name of a project for a team in a given environment
func New ¶
func New(ctx context.Context, clusters gcp.Clusters, serviceAccountEmail, tenantDomain, tenantName, cnrmRoleName, billingAccount string, clusterAlias map[string]string, flags config.FeatureFlags, opts ...OptFunc) (reconcilers.Reconciler, error)
Types ¶
type GcpServices ¶
type GcpServices struct { CloudBillingProjectsService *cloudbilling.ProjectsService CloudResourceManagerOperationsService *cloudresourcemanager.OperationsService CloudResourceManagerProjectsService *cloudresourcemanager.ProjectsService ComputeGlobalOperationsService *compute.GlobalOperationsService FirewallService *compute.FirewallsService ComputeProjectsService *compute.ProjectsService IamProjectsServiceAccountsService *iam.ProjectsServiceAccountsService ServiceUsageOperationsService *serviceusage.OperationsService ServiceUsageService *serviceusage.ServicesService ProjectsRolesService *iam.ProjectsRolesService }
type OptFunc ¶
type OptFunc func(*googleGcpReconciler)
func WithGcpServices ¶
func WithGcpServices(gcpServices *GcpServices) OptFunc
Click to show internal directories.
Click to hide internal directories.