google_gcp_reconciler

package
v0.0.0-...-d3538c1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

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

func GenerateProjectID(domain, environment, teamSlug string) string

GenerateProjectID Generate a unique project ID for the team in a given environment in a deterministic fashion

func GetProjectDisplayName

func GetProjectDisplayName(teamSlug, environment string) string

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, 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL