Skip to content

Commit

Permalink
Move Gateway api to kubedb/apimachinery
Browse files Browse the repository at this point in the history
Signed-off-by: Arnob kumar saha <[email protected]>
  • Loading branch information
ArnobKumarSaha committed Sep 9, 2024
1 parent c588803 commit 95bd859
Show file tree
Hide file tree
Showing 717 changed files with 591,783 additions and 12,706 deletions.
3 changes: 0 additions & 3 deletions .config/api-rules/violation_exceptions.list
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
API rule violation: list_type_missing,go.bytebuilders.dev/catalog/api/v1alpha1,Gateway,Services
API rule violation: list_type_missing,go.bytebuilders.dev/catalog/api/v1alpha1,Gateway,UI
API rule violation: list_type_missing,go.bytebuilders.dev/catalog/api/v1alpha1,NamedServiceStatus,Ports
API rule violation: list_type_missing,k8s.io/api/core/v1,RangeAllocation,Data
API rule violation: list_type_missing,k8s.io/apimachinery/pkg/apis/meta/v1,FieldsV1,Raw
API rule violation: list_type_missing,k8s.io/apimachinery/pkg/runtime,RawExtension,Raw
Expand Down
155 changes: 2 additions & 153 deletions api/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 2 additions & 40 deletions api/v1alpha1/shared_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
core "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
kmapi "kmodules.xyz/client-go/api/v1"
ofst "kmodules.xyz/offshoot-api/api/v1"
dbuiapi "kubedb.dev/apimachinery/apis/ui/v1alpha1"
"sigs.k8s.io/controller-runtime/pkg/client"
)

Expand Down Expand Up @@ -92,45 +92,7 @@ type BindingStatus struct {
Source *runtime.RawExtension `json:"source,omitempty"`

// +optional
Gateway *Gateway `json:"gateway,omitempty"`
}

type Gateway struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
// +optional
IP string `json:"ip,omitempty"`
// +optional
Hostname string `json:"hostname,omitempty"`
// Services is an optional configuration for services used to expose database
// +optional
Services []NamedServiceStatus `json:"services,omitempty"`
// UI is an optional list of database web uis
// +optional
UI []NamedURL `json:"ui,omitempty"`
}

type NamedServiceStatus struct {
// Alias represents the identifier of the service.
Alias string `json:"alias"`

Ports []ofst.GatewayPort `json:"ports"`
}

type NamedURL struct {
// Alias represents the identifier of the service.
// This should match the db ui chart name
Alias string `json:"alias"`

// URL of the database ui
URL string `json:"url"`

Port ofst.GatewayPort `json:"port"`

// HelmRelease is the name of the helm release used to deploy this ui
// The name format is typically <alias>-<db-name>
// +optional
HelmRelease *core.LocalObjectReference `json:"helmRelease,omitempty"`
Gateway *dbuiapi.Gateway `json:"gateway,omitempty"`
}

// +k8s:deepcopy-gen=false
Expand Down
74 changes: 2 additions & 72 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 95bd859

Please sign in to comment.