Skip to content

Commit

Permalink
feat: add subdomain backend
Browse files Browse the repository at this point in the history
  • Loading branch information
Repo Sync Bot committed Sep 1, 2020
1 parent 846a0a1 commit 7651a1a
Show file tree
Hide file tree
Showing 17 changed files with 1,355 additions and 2 deletions.
3 changes: 3 additions & 0 deletions pkg/apis/management/install/zz_generated.api.register.go

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

19 changes: 19 additions & 0 deletions pkg/apis/management/v1/cluster_domain_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package v1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// +subresource-request
type ClusterDomain struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

// +optional
Target string `json:"target,omitempty"`

// +optional
Domain string `json:"domain,omitempty"`
}
1 change: 1 addition & 0 deletions pkg/apis/management/v1/cluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
// +k8s:openapi-gen=true
// +resource:path=clusters,rest=ClusterREST
// +subresource:request=ClusterReset,path=reset,kind=ClusterReset,rest=ClusterResetREST
// +subresource:request=ClusterDomain,path=domain,kind=ClusterDomain,rest=ClusterDomainREST
// +subresource:request=ClusterMembers,path=members,kind=ClusterMembers,rest=ClusterMembersREST
// +subresource:request=ClusterVirtualClusterDefaults,path=virtualclusterdefaults,kind=ClusterVirtualClusterDefaults,rest=ClusterVirtualClusterDefaultsREST
type Cluster struct {
Expand Down
3 changes: 3 additions & 0 deletions pkg/apis/management/v1/license_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type LicenseStatus struct {
type LicenseInfo struct {
Announcement string `json:"announcement,omitempty"`
License string `json:"license,omitempty"`
CurrentTime int64 `json:"currentTime"`
ResourceLimits []ResourceLimit `json:"resourceLimits,omitempty"`
BlockRequests []ResoureRequests `json:"blockRequests,omitempty"`
Features map[string]bool `json:"features,omitempty"`
Expand All @@ -43,6 +44,7 @@ type LicenseInfo struct {
Promotions Promotions `json:"promotions,omitempty"`
Analytics Analytics `json:"analytics,omitempty"`
Links map[string]string `json:"links,omitempty"`
BaseDomains []string `json:"baseDomains,omitempty"`
}

type CustomerInfo struct {
Expand All @@ -61,6 +63,7 @@ type CustomerInfo struct {
type Analytics struct {
Endpoint string `json:"endpoint,omitempty"`
Requests []ResoureRequests `json:"requests,omitempty"`
Token string `json:"token,omitempty"`
}

type Promotions struct {
Expand Down
36 changes: 36 additions & 0 deletions pkg/apis/management/v1/loftupgrade_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package v1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// +genclient
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// LoftUpgrade holds the upgrade information
// +k8s:openapi-gen=true
// +resource:path=loftupgrades,rest=LoftUpgradeREST
type LoftUpgrade struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec LoftUpgradeSpec `json:"spec,omitempty"`
Status LoftUpgradeStatus `json:"status,omitempty"`
}

type LoftUpgradeSpec struct {
// If specified, updated the release in the given namespace
// +optional
Namespace string `json:"namespace,omitempty"`

// If specified, uses this as release name
// +optional
Release string `json:"release,omitempty"`

// +optional
Version string `json:"version,omitempty"`
}

type LoftUpgradeStatus struct {
}
25 changes: 25 additions & 0 deletions pkg/apis/management/v1/zz_generated.api.register.go

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

Loading

0 comments on commit 7651a1a

Please sign in to comment.