Skip to content

Commit

Permalink
Revise api
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Sep 24, 2023
1 parent 0325693 commit eb6b14d
Show file tree
Hide file tree
Showing 19 changed files with 236 additions and 129 deletions.
31 changes: 29 additions & 2 deletions apis/core/v1alpha1/openapi_generated.go

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

12 changes: 6 additions & 6 deletions apis/core/v1alpha1/project_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package v1alpha1

import (
kmapi "kmodules.xyz/client-go/api/v1"
"kmodules.xyz/resource-metadata/apis/meta/v1alpha1"
"kmodules.xyz/resource-metadata/apis/shared"

core "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand All @@ -33,11 +33,11 @@ const (
// ProjectSpec defines the desired state of Project
type ProjectSpec struct {
// +kubebuilder:default=User
Type ProjectType `json:"type,omitempty"`
Namespaces []string `json:"namespaces,omitempty"`
NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"`
Monitoring *ProjectMonitoring `json:"monitoring,omitempty"`
Presets []v1alpha1.SourceLocator `json:"presets,omitempty"`
Type ProjectType `json:"type,omitempty"`
Namespaces []string `json:"namespaces,omitempty"`
NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"`
Monitoring *ProjectMonitoring `json:"monitoring,omitempty"`
Presets []shared.SourceLocator `json:"presets,omitempty"`
}

type ProjectMonitoring struct {
Expand Down
4 changes: 2 additions & 2 deletions apis/core/v1alpha1/zz_generated.deepcopy.go

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

27 changes: 27 additions & 0 deletions apis/management/v1alpha1/openapi_generated.go

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

58 changes: 29 additions & 29 deletions apis/meta/v1alpha1/openapi_generated.go

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

11 changes: 2 additions & 9 deletions apis/meta/v1alpha1/renderdashboard_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package v1alpha1

import (
kmapi "kmodules.xyz/client-go/api/v1"
"kmodules.xyz/resource-metadata/apis/shared"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -53,7 +53,7 @@ type RenderDashboardRequest struct {
Source *runtime.RawExtension `json:"source,omitempty"`

// +optional
SourceLocator *SourceLocator `json:"sourceLocator,omitempty"`
SourceLocator *shared.SourceLocator `json:"sourceLocator,omitempty"`

// +optional
Name string `json:"name,omitempty"`
Expand All @@ -62,13 +62,6 @@ type RenderDashboardRequest struct {
EmbeddedLink bool `json:"embeddedLink,omitempty"`
}

type SourceLocator struct {
// +optional
Resource kmapi.ResourceID `json:"resource"`
// +optional
Ref kmapi.ObjectReference `json:"ref"`
}

type RenderDashboardResponse struct {
Dashboards []DashboardResponse `json:"dashboards"`
}
Expand Down
20 changes: 1 addition & 19 deletions apis/meta/v1alpha1/zz_generated.deepcopy.go

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

27 changes: 27 additions & 0 deletions apis/shared/openapi_generated.go

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

7 changes: 7 additions & 0 deletions apis/shared/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ import (
helmshared "x-helm.dev/apimachinery/apis/shared"
)

type SourceLocator struct {
// +optional
Resource kmapi.ResourceID `json:"resource"`
// +optional
Ref kmapi.ObjectReference `json:"ref"`
}

type DeploymentParameters struct {
ProductID string `json:"productID,omitempty"`
PlanID string `json:"planID,omitempty"`
Expand Down
18 changes: 18 additions & 0 deletions apis/shared/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 eb6b14d

Please sign in to comment.