-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
592 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
pkg/apis/management/v1/virtualclusterinstance_externaldatabase_types.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package v1 | ||
|
||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
|
||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
|
||
// VirtualClusterExternalDatabase holds kube config request and response data for virtual clusters | ||
// +subresource-request | ||
type VirtualClusterExternalDatabase struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec VirtualClusterExternalDatabaseSpec `json:"spec,omitempty"` | ||
Status VirtualClusterExternalDatabaseStatus `json:"status,omitempty"` | ||
} | ||
|
||
type VirtualClusterExternalDatabaseSpec struct { | ||
// Connector specifies the secret that should be used to connect to an external database server. The connection is | ||
// used to manage a user and database for the vCluster. A data source endpoint constructed from the created user and | ||
// database is returned on status. The secret specified by connector should contain the following fields: | ||
// endpoint - the endpoint where the database server can be accessed | ||
// user - the database username | ||
// password - the password for the database username | ||
// port - the port to be used in conjunction with the endpoint to connect to the databse server. This is commonly | ||
// 3306 | ||
// +optional | ||
Connector string `json:"connector,omitempty"` | ||
} | ||
|
||
type VirtualClusterExternalDatabaseStatus struct { | ||
// DataSource holds a datasource endpoint constructed from the vCluster's designated user and database. The user and | ||
// database are created from the given connector. | ||
DataSource string `json:"dataSource,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.