{"id":25343872,"url":"https://github.com/appscode-cloud/resource-model","last_synced_at":"2025-04-08T14:46:22.622Z","repository":{"id":42478704,"uuid":"268450939","full_name":"appscode-cloud/resource-model","owner":"appscode-cloud","description":"ByteBuilders Resource Models","archived":false,"fork":false,"pushed_at":"2025-02-07T01:43:28.000Z","size":34466,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-14T11:05:32.409Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appscode-cloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-01T07:13:21.000Z","updated_at":"2025-02-07T01:43:37.000Z","dependencies_parsed_at":"2024-07-10T09:18:56.651Z","dependency_job_id":"b80a191e-d9bb-4186-a3b0-469dc20c104e","html_url":"https://github.com/appscode-cloud/resource-model","commit_stats":null,"previous_names":["bytebuilders/resource-model"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appscode-cloud%2Fresource-model","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appscode-cloud%2Fresource-model/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appscode-cloud%2Fresource-model/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appscode-cloud%2Fresource-model/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appscode-cloud","download_url":"https://codeload.github.com/appscode-cloud/resource-model/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247866114,"owners_count":21009238,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-14T10:59:16.536Z","updated_at":"2025-04-08T14:46:22.582Z","avatar_url":"https://github.com/appscode-cloud.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Go Report Card](https://goreportcard.com/badge/go.bytebuilders.dev/resource-model)](https://goreportcard.com/report/go.bytebuilders.dev/resource-model)\n[![GoDoc](https://godoc.org/go.bytebuilders.dev/resource-model?status.svg \"GoDoc\")](https://godoc.org/go.bytebuilders.dev/resource-model)\n[![Build Status](https://github.com/bytebuilders/resource-model/workflows/CI/badge.svg)](https://github.com/bytebuilders/resource-model/actions?workflow=CI)\n[![Slack](https://shields.io/badge/Join_Slack-salck?color=4A154B\u0026logo=slack)](https://slack.appscode.com)\n[![Twitter](https://img.shields.io/twitter/follow/ByteBuilders.svg?style=social\u0026logo=twitter\u0026label=Follow)](https://twitter.com/intent/follow?screen_name=ByteBuilders)\n\n# resource-model\n\n[ByteBuilders](https://byte.builders) Resource Models\n\n![Import Cluster](./hack/files/import_cluster.png)\n\n\u003ccenter\u003eFig: Import Cluster Flow\u003c/center\u003e\n\n\n\n##  ClusterInfo\n\nTo show or to store basic cluster information for future reference, some public information is stored using `ClusterInfo` resource. The information that is stored is shown bellow.\n\n```yaml\n- Name\n- UID\n- OwnerID\n- ExternalID\n- Provider\n- Endpoint\n- Location\n- Project\n- KubernetesVersion\n- NodeCount\n```\n\n## ClusterAuthInfoTemplate\n\nThis resource is actually a template for necessary data to connect to the cluster. It contains `CertificateAuthorityData` for the cluster and also `User authentication data` of the cluster owner. If the cluster provides `kube config`, then it's also stored. Only when the necessary information or `kube config` is provided, `ClusterAuthInfoTemplate` is stored.\n\n```yaml\n- UID\n- OwnerID\n- KubeConfig\n\n- CertificateAuthorityData\n\n- ClientCertificateData\n- ClientKeyData\n\n- Token\n\n- Username\n- Password\n```\n\n## ClusterUserAuth\n\nThis resource contains user specific authentication data. These data are used to create `kube config` for accessing the cluster. In some cases, the cluster provides `kube config` which is also stored by this resource. When an user imports a cluster, user specific credential is stored in `ClusterUserAuth` .\n\n```yaml\n- ClusterUID\n- UserID\n- KubeConfig\n\n- ClientCertificateData\n- ClientKeyData\n\n- Token\n\n- Username\n- Password\n```\n\nSometimes these direct authentication data isn't stored. Instead some auxiliary data are provided from which we can generate `Token` which can be used for accessing the cluster.\n\nFor example:\n\n```yaml\n# GKEProvider\n\n- ClientID\n- ClientSecret\n- AccessToken\n- RefreshToken\n- Expiry\n```\n\n```yaml\n# AWSProvider\n\n- AccessKeyID\n- SecretAccessKey\n```\n\n## CloudCredential\n\nThis resource is used to store credentials to list and import clusters.\n\nCredential formats\n\n```go\ntype GKECredential struct {\n   ClientID     string\n   ClientSecret string\n   AccessToken  string\n   RefreshToken string\n   Scopes \t\t[]string\n   Expiry \t\tint64\n}\n\ntype GCECredential struct {\n   ProjectID      string\n   ServiceAccount string\n}\n\ntype DigitalOceanCredential struct {\n   Token string\n}\n\ntype AzureCredential struct {\n   TenantID       string\n   SubscriptionID string\n   ClientID       string\n   ClientSecret   string\n}\n\ntype AWSCredential struct {\n   AccessKeyID     string\n   SecretAccessKey string\n}\n\ntype PacketCredential struct {\n   ProjectID string\n   APIKey    string\n}\n\ntype ScalewayCredential struct {\n   Organization string\n   Token        string\n}\n\ntype LinodeCredential struct {\n   Token string\n}\n\ntype VultrCredential struct {\n   Token string\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappscode-cloud%2Fresource-model","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappscode-cloud%2Fresource-model","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappscode-cloud%2Fresource-model/lists"}