Skip to content

Commit

Permalink
Add ui support to gateway (#1173)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <tamal@appscode.com>
  • Loading branch information
tamalsaha authored Mar 14, 2024
1 parent bfad33d commit c50127c
Show file tree
Hide file tree
Showing 31 changed files with 615 additions and 1 deletion.
54 changes: 53 additions & 1 deletion apis/kubedb/v1alpha2/openapi_generated.go

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

17 changes: 17 additions & 0 deletions apis/kubedb/v1alpha2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@ type Gateway struct {
// 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 {
Expand All @@ -250,3 +253,17 @@ type NamedServiceStatus struct {

Ports []ofst.ServicePort `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"`

// 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"`
}
28 changes: 28 additions & 0 deletions apis/kubedb/v1alpha2/zz_generated.deepcopy.go

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

18 changes: 18 additions & 0 deletions crds/kubedb.com_druids.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24441,6 +24441,24 @@ spec:
- ports
type: object
type: array
ui:
items:
properties:
alias:
type: string
helmRelease:
properties:
name:
type: string
type: object
x-kubernetes-map-type: atomic
url:
type: string
required:
- alias
- url
type: object
type: array
required:
- name
- namespace
Expand Down
18 changes: 18 additions & 0 deletions crds/kubedb.com_elasticsearches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5867,6 +5867,24 @@ spec:
- ports
type: object
type: array
ui:
items:
properties:
alias:
type: string
helmRelease:
properties:
name:
type: string
type: object
x-kubernetes-map-type: atomic
url:
type: string
required:
- alias
- url
type: object
type: array
required:
- name
- namespace
Expand Down
18 changes: 18 additions & 0 deletions crds/kubedb.com_etcds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3953,6 +3953,24 @@ spec:
- ports
type: object
type: array
ui:
items:
properties:
alias:
type: string
helmRelease:
properties:
name:
type: string
type: object
x-kubernetes-map-type: atomic
url:
type: string
required:
- alias
- url
type: object
type: array
required:
- name
- namespace
Expand Down
18 changes: 18 additions & 0 deletions crds/kubedb.com_ferretdbs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3989,6 +3989,24 @@ spec:
- ports
type: object
type: array
ui:
items:
properties:
alias:
type: string
helmRelease:
properties:
name:
type: string
type: object
x-kubernetes-map-type: atomic
url:
type: string
required:
- alias
- url
type: object
type: array
required:
- name
- namespace
Expand Down
18 changes: 18 additions & 0 deletions crds/kubedb.com_kafkas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7671,6 +7671,24 @@ spec:
- ports
type: object
type: array
ui:
items:
properties:
alias:
type: string
helmRelease:
properties:
name:
type: string
type: object
x-kubernetes-map-type: atomic
url:
type: string
required:
- alias
- url
type: object
type: array
required:
- name
- namespace
Expand Down
18 changes: 18 additions & 0 deletions crds/kubedb.com_mariadbs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4259,6 +4259,24 @@ spec:
- ports
type: object
type: array
ui:
items:
properties:
alias:
type: string
helmRelease:
properties:
name:
type: string
type: object
x-kubernetes-map-type: atomic
url:
type: string
required:
- alias
- url
type: object
type: array
required:
- name
- namespace
Expand Down
18 changes: 18 additions & 0 deletions crds/kubedb.com_memcacheds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3729,6 +3729,24 @@ spec:
- ports
type: object
type: array
ui:
items:
properties:
alias:
type: string
helmRelease:
properties:
name:
type: string
type: object
x-kubernetes-map-type: atomic
url:
type: string
required:
- alias
- url
type: object
type: array
required:
- name
- namespace
Expand Down
18 changes: 18 additions & 0 deletions crds/kubedb.com_mongodbs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17073,6 +17073,24 @@ spec:
- ports
type: object
type: array
ui:
items:
properties:
alias:
type: string
helmRelease:
properties:
name:
type: string
type: object
x-kubernetes-map-type: atomic
url:
type: string
required:
- alias
- url
type: object
type: array
required:
- name
- namespace
Expand Down
18 changes: 18 additions & 0 deletions crds/kubedb.com_mysqls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6888,6 +6888,24 @@ spec:
- ports
type: object
type: array
ui:
items:
properties:
alias:
type: string
helmRelease:
properties:
name:
type: string
type: object
x-kubernetes-map-type: atomic
url:
type: string
required:
- alias
- url
type: object
type: array
required:
- name
- namespace
Expand Down
18 changes: 18 additions & 0 deletions crds/kubedb.com_perconaxtradbs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4256,6 +4256,24 @@ spec:
- ports
type: object
type: array
ui:
items:
properties:
alias:
type: string
helmRelease:
properties:
name:
type: string
type: object
x-kubernetes-map-type: atomic
url:
type: string
required:
- alias
- url
type: object
type: array
required:
- name
- namespace
Expand Down
Loading

0 comments on commit c50127c

Please sign in to comment.