{
  "repo": "tidbcloud/dbaas",
  "binary": "server",
  "binary_path": "core/cmd/server/main.go",
  "dependencies": {
    "CoreService.SyncInfraProfile": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT/INSERT/UPDATE", "tables": ["infra_providers", "infra_computes", "infra_storages"]}]}, "kubernetes": {"conditions": ["Always"], "operations": [{"operation": "GET", "resource": "cloudv1.Provider CR"}]}}, "services": []},
    "CoreService.ReplaceProfileByYaml": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "INSERT/UPDATE", "tables": ["profile_versions", "infra_computes", "infra_storages", "nodes", "skus"]}]}}, "services": [{"name": "billing2", "target_interface": "POST /api/v1/billing/units/_bulk", "operation_type": "http_post", "conditions": ["Always"]}]},
    "CoreService.ListNodeProfiles4Tenant": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT", "tables": ["nodes", "profile_versions"]}]}}, "services": []},
    "CoreService.ListCloudProviders": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT", "tables": ["profile_versions", "nodes", "cloud_providers", "xaccount_deploys"]}]}}, "services": []},
    "CoreService.CreateIamRole": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT/INSERT", "tables": ["iam_roles", "projects"]}]}}, "services": []},
    "CoreService.DeleteIamRole": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT/DELETE", "tables": ["iam_roles"]}]}}, "services": []},
    "CoreService.ListIamRoles": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT", "tables": ["iam_roles"]}]}}, "services": []},
    "CoreService.CreateCluster": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT/INSERT", "tables": ["cloud_providers", "nodes", "clusters", "cluster_components", "cluster_connections", "tenants", "projects"]}]}, "kubernetes": {"conditions": ["background sync"], "operations": [{"operation": "CREATE", "resource": "cloudv1.Cluster CR"}]}}, "services": [{"name": "billing2", "target_interface": "GET /api/v1/billing/tenants/{tenant_id}/binded_packages/{pkg_id}", "operation_type": "http_get", "conditions": ["TenantPlan=POC AND NOT IsDevTier"]}]},
    "CoreService.CreateClusterSnapshot": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT/INSERT", "tables": ["clusters", "cluster_snapshots"]}]}}, "services": []},
    "CoreService.BatchGetClusterSnapshot": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT", "tables": ["cluster_snapshots"]}]}}, "services": []},
    "CoreService.ScaleCluster": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT/UPDATE", "tables": ["clusters", "replications", "nodes", "tenants"]}]}}, "services": []},
    "CoreService.CalcClusterFee": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT", "tables": ["nodes", "skus", "profile_versions", "tenants", "projects"]}]}}, "services": [{"name": "billing2", "target_interface": "POST /api/v1/billing/tenants/{tenant_id}/measures/dryrun", "operation_type": "http_post", "conditions": ["Always"]}]},
    "CoreService.ListClusters": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT", "tables": ["clusters", "nodes"]}]}, "kubernetes": {"conditions": ["Always"], "operations": [{"operation": "GET", "resource": "cloudv1.Cluster CR"}]}}, "services": []},
    "CoreService.CountClusters": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT COUNT", "tables": ["clusters"]}]}}, "services": []},
    "CoreService.CreateXAccountDeploy": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT/INSERT", "tables": ["cloud_providers", "xaccount_deploys", "iam_roles", "projects"]}]}}, "services": []},
    "CoreService.ListXAccountDeploy": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT", "tables": ["xaccount_deploys"]}]}}, "services": []},
    "CoreService.DeleteXAccountDeploy": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "DELETE", "tables": ["xaccount_deploys"]}]}}, "services": []},
    "CoreService.ListRegionCIDROfProject": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT", "tables": ["project_cidrs", "cloud_providers", "projects"]}]}, "kubernetes": {"conditions": ["Always"], "operations": [{"operation": "GET", "resource": "cloudv1.Network CR"}]}}, "services": []},
    "CoreService.CreateClusterConn": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT/INSERT", "tables": ["clusters", "cluster_connections"]}]}}, "services": []},
    "CoreService.CreateNetworkPeer": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT/INSERT", "tables": ["project_cidrs", "network_peers", "cloud_providers", "projects", "users"]}]}, "kubernetes": {"conditions": ["Always"], "operations": [{"operation": "GET/CREATE", "resource": "cloudv1.Network/NetworkPeer CR"}]}}, "services": []},
    "CoreService.DeleteNetworkPeer": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT/DELETE", "tables": ["network_peers", "users"]}]}, "kubernetes": {"conditions": ["Always"], "operations": [{"operation": "DELETE", "resource": "cloudv1.NetworkPeer CR"}]}}, "services": []},
    "CoreService.ListNetworkPeer": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT", "tables": ["network_peers"]}]}, "kubernetes": {"conditions": ["Always"], "operations": [{"operation": "GET", "resource": "cloudv1.Network CR"}]}}, "services": []},
    "CoreService.RestoreCluster": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT/INSERT", "tables": ["backups", "clusters", "cluster_snapshots", "nodes", "tenants", "projects"]}]}, "kubernetes": {"conditions": ["Always"], "operations": [{"operation": "CREATE", "resource": "cloudv1.Cluster CR"}]}}, "services": []},
    "CoreService.ListBackups": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT", "tables": ["backups", "cluster_snapshots", "clusters", "nodes", "tenants"]}]}}, "services": []},
    "CoreService.ListBackupsOfCluster": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT", "tables": ["backups", "cluster_snapshots", "clusters", "nodes", "tenants"]}]}}, "services": []},
    "CoreService.CreateReplication": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT/INSERT", "tables": ["clusters", "replications", "tenants"]}]}}, "services": []},
    "CoreService.Measure": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT/INSERT/UPDATE", "tables": ["project_meterings", "cluster_meterings", "billing_report_records", "tenants", "projects"]}]}}, "services": [{"name": "infra-metering", "target_interface": "POST /api/v1/provider/cost", "operation_type": "http_post", "conditions": ["When measureProject=true"]}]}
  },
  "background_dependencies": {
    "SyncProfileWorker": {"services": [{"name": "billing2", "target_interface": "POST /api/v1/billing/units/_bulk", "operation_type": "http_post", "conditions": ["Always"]}]},
    "SyncClusterWorker": {"infrastructure": {"mysql": {"conditions": ["Always"], "operations": [{"operation": "SELECT/UPDATE", "tables": ["clusters", "xaccount_deploys"]}]}, "kubernetes": {"conditions": ["Always"], "operations": [{"operation": "GET/CREATE/UPDATE", "resource": "cloudv1.Cluster/Network CR"}]}}},
    "ReportMeasure2billingWorker": {"services": [{"name": "billing2", "target_interface": "POST /api/v1/billing/tenants/{tenant_id}/measures", "operation_type": "http_post", "conditions": ["Always"]}]}
  }
}
