Skip to content

Commit

Permalink
Update catalog api
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Aug 31, 2024
1 parent f53d8b2 commit 1a1dfb9
Show file tree
Hide file tree
Showing 48 changed files with 21,931 additions and 23 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.9.0
github.com/yudai/gojsondiff v1.0.0
go.bytebuilders.dev/catalog v0.0.7
go.bytebuilders.dev/catalog v0.0.8-0.20240831022339-c58880360336
go.bytebuilders.dev/license-verifier v0.14.1
golang.org/x/net v0.26.0
gomodules.xyz/encoding v0.0.8
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ=
github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0=
github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0=
github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
go.bytebuilders.dev/catalog v0.0.7 h1:RY2H7L9CoG779oCZjlZkU+f7FNSRSD2m4mdvLvuK2qA=
go.bytebuilders.dev/catalog v0.0.7/go.mod h1:zKCfHWFNHEaZV6BWC8vo6CYBwPDQsl3IIXW1P9Q62QA=
go.bytebuilders.dev/catalog v0.0.8-0.20240831022339-c58880360336 h1:e+UAamNBo+zqUlk5e6LZ3zYbcgH4W1YLyTC+T9fXmro=
go.bytebuilders.dev/catalog v0.0.8-0.20240831022339-c58880360336/go.mod h1:zKCfHWFNHEaZV6BWC8vo6CYBwPDQsl3IIXW1P9Q62QA=
go.bytebuilders.dev/license-verifier v0.14.1 h1:Pk0a4NKgRjMt6eBZATHwLmPUuTQL00kQB3AQoxhCsUE=
go.bytebuilders.dev/license-verifier v0.14.1/go.mod h1:GB9XTSQUcllJ4AVq29TdJI6yRjoI86HGz0XMqq9nLwY=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
apiVersion: meta.k8s.appscode.com/v1alpha1
kind: ResourceDescriptor
metadata:
creationTimestamp: null
labels:
k8s.io/group: catalog.appscode.com
k8s.io/kind: ClickHouseBinding
k8s.io/resource: clickhousebindings
k8s.io/version: v1alpha1
name: catalog.appscode.com-v1alpha1-clickhousebindings
spec:
resource:
group: catalog.appscode.com
kind: ClickHouseBinding
name: clickhousebindings
scope: Namespaced
version: v1alpha1
validation:
openAPIV3Schema:
description: ClickHouseBinding is the Schema for the clickhousebindings API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
properties:
name:
description: 'Name must be unique within a namespace. Is required when
creating resources, although some resources may allow a client to
request the generation of an appropriate name automatically. Name
is primarily intended for creation idempotence and configuration definition.
Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names'
type: string
namespace:
description: "Namespace defines the space within which each name must
be unique. An empty namespace is equivalent to the \"default\" namespace,
but \"default\" is the canonical representation. Not all objects are
required to be scoped to a namespace - the value of this field for
those objects will be empty. \n Must be a DNS_LABEL. Cannot be updated.
More info: http://kubernetes.io/docs/user-guide/namespaces"
type: string
labels:
additionalProperties:
type: string
description: 'Map of string keys and values that can be used to organize
and categorize (scope and select) objects. May match selectors of
replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels'
type: object
annotations:
additionalProperties:
type: string
description: 'Annotations is an unstructured key value map stored with
a resource that may be set by external tools to store and retrieve
arbitrary metadata. They are not queryable and should be preserved
when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations'
type: object
type: object
spec:
description: ClickHouseBindingSpec defines the desired state of ClickHouseBinding
properties:
sourceRef:
description: SourceRef refers to the source app instance.
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
required:
- name
type: object
required:
- sourceRef
type: object
type: object
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: ui.k8s.appscode.com/v1alpha1
kind: ResourceEditor
metadata:
creationTimestamp: null
labels:
k8s.io/group: catalog.appscode.com
k8s.io/kind: ClickHouseBinding
k8s.io/resource: clickhousebindings
k8s.io/version: v1alpha1
name: catalog.appscode.com-v1alpha1-clickhousebindings
spec:
resource:
group: catalog.appscode.com
kind: ClickHouseBinding
name: clickhousebindings
scope: Namespaced
version: v1alpha1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: meta.k8s.appscode.com/v1alpha1
kind: ResourceTableDefinition
metadata:
creationTimestamp: null
labels:
k8s.io/group: catalog.appscode.com
k8s.io/kind: ClickHouseBinding
k8s.io/resource: clickhousebindings
k8s.io/version: v1alpha1
name: catalog.appscode.com-v1alpha1-clickhousebindings
spec:
defaultView: true
resource:
group: catalog.appscode.com
kind: ClickHouseBinding
name: clickhousebindings
scope: Namespaced
version: v1alpha1
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*
Copyright AppsCode Inc. and Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
kmapi "kmodules.xyz/client-go/api/v1"
)

const (
ResourceKindClickHouseBinding = "ClickHouseBinding"
ResourceClickHouseBinding = "clickhousebinding"
ResourceClickHouseBindings = "clickhousebindings"
)

// ClickHouseBindingSpec defines the desired state of ClickHouseBinding
type ClickHouseBindingSpec struct {
// SourceRef refers to the source app instance.
SourceRef kmapi.ObjectReference `json:"sourceRef"`
}

// +kubebuilder:object:root=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:subresource:status
// +kubebuilder:resource:shortName=chbinding,categories={binding,kubedb,appscode}
// +kubebuilder:printcolumn:name="Src_NS",type="string",JSONPath=".spec.sourceRef.namespace"
// +kubebuilder:printcolumn:name="Src_Name",type="string",JSONPath=".spec.sourceRef.name"
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase"
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

// ClickHouseBinding is the Schema for the clickhousebindings API
type ClickHouseBinding struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec ClickHouseBindingSpec `json:"spec,omitempty"`
Status BindingStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true

// ClickHouseBindingList contains a list of ClickHouseBinding
type ClickHouseBindingList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ClickHouseBinding `json:"items"`
}

func init() {
SchemeBuilder.Register(&ClickHouseBinding{}, &ClickHouseBindingList{})
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type DruidBindingSpec struct {
// +kubebuilder:object:root=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:subresource:status
// +kubebuilder:resource:categories={kubedb,appscode}
// +kubebuilder:resource:shortName=drbinding,categories={binding,kubedb,appscode}
// +kubebuilder:printcolumn:name="Src_NS",type="string",JSONPath=".spec.sourceRef.namespace"
// +kubebuilder:printcolumn:name="Src_Name",type="string",JSONPath=".spec.sourceRef.name"
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type ElasticsearchBindingSpec struct {
// +kubebuilder:object:root=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:subresource:status
// +kubebuilder:resource:categories={kubedb,appscode}
// +kubebuilder:resource:shortName=esbinding,categories={binding,kubedb,appscode}
// +kubebuilder:printcolumn:name="Src_NS",type="string",JSONPath=".spec.sourceRef.namespace"
// +kubebuilder:printcolumn:name="Src_Name",type="string",JSONPath=".spec.sourceRef.name"
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type FerretDBBindingSpec struct {
// +kubebuilder:object:root=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:subresource:status
// +kubebuilder:resource:categories={kubedb,appscode}
// +kubebuilder:resource:shortName=frbinding,categories={binding,kubedb,appscode}
// +kubebuilder:printcolumn:name="Src_NS",type="string",JSONPath=".spec.sourceRef.namespace"
// +kubebuilder:printcolumn:name="Src_Name",type="string",JSONPath=".spec.sourceRef.name"
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type KafkaBindingSpec struct {
// +kubebuilder:object:root=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:subresource:status
// +kubebuilder:resource:categories={kubedb,appscode}
// +kubebuilder:resource:shortName=kfbinding,categories={binding,kubedb,appscode}
// +kubebuilder:printcolumn:name="Src_NS",type="string",JSONPath=".spec.sourceRef.namespace"
// +kubebuilder:printcolumn:name="Src_Name",type="string",JSONPath=".spec.sourceRef.name"
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type MariaDBBindingSpec struct {
// +kubebuilder:object:root=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:subresource:status
// +kubebuilder:resource:categories={kubedb,appscode}
// +kubebuilder:resource:shortName=mdbinding,categories={binding,kubedb,appscode}
// +kubebuilder:printcolumn:name="Src_NS",type="string",JSONPath=".spec.sourceRef.namespace"
// +kubebuilder:printcolumn:name="Src_Name",type="string",JSONPath=".spec.sourceRef.name"
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type MemcachedBindingSpec struct {
// +kubebuilder:object:root=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:subresource:status
// +kubebuilder:resource:categories={kubedb,appscode}
// +kubebuilder:resource:shortName=mcbinding,categories={binding,kubedb,appscode}
// +kubebuilder:printcolumn:name="Src_NS",type="string",JSONPath=".spec.sourceRef.namespace"
// +kubebuilder:printcolumn:name="Src_Name",type="string",JSONPath=".spec.sourceRef.name"
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type MongoDBBindingSpec struct {
// +kubebuilder:object:root=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:subresource:status
// +kubebuilder:resource:categories={kubedb,appscode}
// +kubebuilder:resource:shortName=mgbinding,categories={binding,kubedb,appscode}
// +kubebuilder:printcolumn:name="Src_NS",type="string",JSONPath=".spec.sourceRef.namespace"
// +kubebuilder:printcolumn:name="Src_Name",type="string",JSONPath=".spec.sourceRef.name"
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type MSSQLServerBindingSpec struct {
// +kubebuilder:object:root=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:subresource:status
// +kubebuilder:resource:categories={kubedb,appscode}
// +kubebuilder:resource:shortName=msbinding,categories={binding,kubedb,appscode}
// +kubebuilder:printcolumn:name="Src_NS",type="string",JSONPath=".spec.sourceRef.namespace"
// +kubebuilder:printcolumn:name="Src_Name",type="string",JSONPath=".spec.sourceRef.name"
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type MySQLBindingSpec struct {
// +kubebuilder:object:root=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:subresource:status
// +kubebuilder:resource:categories={kubedb,appscode}
// +kubebuilder:resource:shortName=mybinding,categories={binding,kubedb,appscode}
// +kubebuilder:printcolumn:name="Src_NS",type="string",JSONPath=".spec.sourceRef.namespace"
// +kubebuilder:printcolumn:name="Src_Name",type="string",JSONPath=".spec.sourceRef.name"
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase"
Expand Down
Loading

0 comments on commit 1a1dfb9

Please sign in to comment.