diff --git a/api/catalog/v1alpha1/generic_types.go b/api/catalog/v1alpha1/generic_types.go index 24abbaa0..24ce469c 100644 --- a/api/catalog/v1alpha1/generic_types.go +++ b/api/catalog/v1alpha1/generic_types.go @@ -178,6 +178,15 @@ func (dst *GenericBinding) Duckify(srcRaw runtime.Object) error { dst.Spec.SourceRef = src.Spec.SourceRef dst.Status = src.Status return nil + case *OracleBinding: + dst.TypeMeta = metav1.TypeMeta{ + APIVersion: GroupVersion.String(), + Kind: ResourceKindOracleBinding, + } + dst.ObjectMeta = src.ObjectMeta + dst.Spec.SourceRef = src.Spec.SourceRef + dst.Status = src.Status + return nil case *PerconaXtraDBBinding: dst.TypeMeta = metav1.TypeMeta{ APIVersion: GroupVersion.String(), diff --git a/api/catalog/v1alpha1/openapi_generated.go b/api/catalog/v1alpha1/openapi_generated.go index ea1e0e60..f528958d 100644 --- a/api/catalog/v1alpha1/openapi_generated.go +++ b/api/catalog/v1alpha1/openapi_generated.go @@ -63,6 +63,8 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "go.bytebuilders.dev/catalog/api/catalog/v1alpha1.MongoDBBindingList": schema_catalog_api_catalog_v1alpha1_MongoDBBindingList(ref), "go.bytebuilders.dev/catalog/api/catalog/v1alpha1.MySQLBinding": schema_catalog_api_catalog_v1alpha1_MySQLBinding(ref), "go.bytebuilders.dev/catalog/api/catalog/v1alpha1.MySQLBindingList": schema_catalog_api_catalog_v1alpha1_MySQLBindingList(ref), + "go.bytebuilders.dev/catalog/api/catalog/v1alpha1.OracleBinding": schema_catalog_api_catalog_v1alpha1_OracleBinding(ref), + "go.bytebuilders.dev/catalog/api/catalog/v1alpha1.OracleBindingList": schema_catalog_api_catalog_v1alpha1_OracleBindingList(ref), "go.bytebuilders.dev/catalog/api/catalog/v1alpha1.PerconaXtraDBBinding": schema_catalog_api_catalog_v1alpha1_PerconaXtraDBBinding(ref), "go.bytebuilders.dev/catalog/api/catalog/v1alpha1.PerconaXtraDBBindingList": schema_catalog_api_catalog_v1alpha1_PerconaXtraDBBindingList(ref), "go.bytebuilders.dev/catalog/api/catalog/v1alpha1.PgBouncerBinding": schema_catalog_api_catalog_v1alpha1_PgBouncerBinding(ref), @@ -1760,6 +1762,102 @@ func schema_catalog_api_catalog_v1alpha1_MySQLBindingList(ref common.ReferenceCa } } +func schema_catalog_api_catalog_v1alpha1_OracleBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OracleBinding is the Schema for the oraclebindings API", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("go.bytebuilders.dev/catalog/api/catalog/v1alpha1.BindingSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("go.bytebuilders.dev/catalog/api/catalog/v1alpha1.BindingStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "go.bytebuilders.dev/catalog/api/catalog/v1alpha1.BindingSpec", "go.bytebuilders.dev/catalog/api/catalog/v1alpha1.BindingStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_catalog_api_catalog_v1alpha1_OracleBindingList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OracleBindingList contains a list of OracleBinding", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + 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{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("go.bytebuilders.dev/catalog/api/catalog/v1alpha1.OracleBinding"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "go.bytebuilders.dev/catalog/api/catalog/v1alpha1.OracleBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + func schema_catalog_api_catalog_v1alpha1_PerconaXtraDBBinding(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/api/catalog/v1alpha1/oraclebinding_types.go b/api/catalog/v1alpha1/oraclebinding_types.go new file mode 100644 index 00000000..b6347b27 --- /dev/null +++ b/api/catalog/v1alpha1/oraclebinding_types.go @@ -0,0 +1,78 @@ +/* +Copyright 2023. + +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 ( + ResourceKindOracleBinding = "OracleBinding" + ResourceOracleBinding = "oraclebinding" + ResourceOracleBindings = "oraclebindings" +) + +// +kubebuilder:object:root=true +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:subresource:status +// +kubebuilder:resource:shortName=orbinding,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" + +// OracleBinding is the Schema for the oraclebindings API +type OracleBinding struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec BindingSpec `json:"spec,omitempty"` + Status BindingStatus `json:"status,omitempty"` +} + +//+kubebuilder:object:root=true +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// OracleBindingList contains a list of OracleBinding +type OracleBindingList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []OracleBinding `json:"items"` +} + +func init() { + SchemeBuilder.Register(&OracleBinding{}, &OracleBindingList{}) +} + +var _ BindingInterface = &OracleBinding{} + +func (in *OracleBinding) GetSourceRef() kmapi.ObjectReference { + return in.Spec.SourceRef +} + +func (in *OracleBinding) GetStatus() *BindingStatus { + return &in.Status +} + +func (in *OracleBinding) GetConditions() kmapi.Conditions { + return in.Status.Conditions +} + +func (in *OracleBinding) SetConditions(conditions kmapi.Conditions) { + in.Status.Conditions = conditions +} diff --git a/api/catalog/v1alpha1/zz_generated.deepcopy.go b/api/catalog/v1alpha1/zz_generated.deepcopy.go index 1ef60bda..9a415055 100644 --- a/api/catalog/v1alpha1/zz_generated.deepcopy.go +++ b/api/catalog/v1alpha1/zz_generated.deepcopy.go @@ -847,6 +847,65 @@ func (in *MySQLBindingList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OracleBinding) DeepCopyInto(out *OracleBinding) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OracleBinding. +func (in *OracleBinding) DeepCopy() *OracleBinding { + if in == nil { + return nil + } + out := new(OracleBinding) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OracleBinding) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OracleBindingList) DeepCopyInto(out *OracleBindingList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OracleBinding, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OracleBindingList. +func (in *OracleBindingList) DeepCopy() *OracleBindingList { + if in == nil { + return nil + } + out := new(OracleBindingList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OracleBindingList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PerconaXtraDBBinding) DeepCopyInto(out *PerconaXtraDBBinding) { *out = *in diff --git a/crds/catalog.appscode.com_oraclebindings.yaml b/crds/catalog.appscode.com_oraclebindings.yaml new file mode 100644 index 00000000..477f877e --- /dev/null +++ b/crds/catalog.appscode.com_oraclebindings.yaml @@ -0,0 +1,290 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/name: ace + kube-bind.appscode.com/exported: "true" + name: oraclebindings.catalog.appscode.com +spec: + group: catalog.appscode.com + names: + categories: + - binding + - kubedb + - appscode + kind: OracleBinding + listKind: OracleBindingList + plural: oraclebindings + shortNames: + - orbinding + singular: oraclebinding + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.sourceRef.namespace + name: Src_NS + type: string + - jsonPath: .spec.sourceRef.name + name: Src_Name + type: string + - jsonPath: .status.phase + name: Status + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: OracleBinding is the Schema for the oraclebindings 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: + type: object + spec: + description: BindingSpec defines the desired state of Binding + 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 + status: + description: BindingStatus defines the observed state of App + properties: + conditions: + items: + description: Condition defines an observation of a object operational + state. + properties: + lastTransitionTime: + description: |- + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + A human-readable message indicating details about the transition. + This field may be empty. + type: string + observedGeneration: + description: |- + If set, this represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.condition[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer + reason: + description: |- + The reason for the condition's last transition in CamelCase. + The specific API may choose whether this field is considered a guaranteed API. + This field may not be empty. + type: string + severity: + description: |- + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: |- + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary util + can be useful (see .node.status.util), the ability to deconflict is important. + type: string + required: + - lastTransitionTime + - status + - type + type: object + maxItems: 12 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + gateway: + properties: + hostname: + type: string + ip: + type: string + name: + type: string + namespace: + type: string + services: + description: Services is an optional configuration for services + used to expose database + items: + properties: + alias: + description: Alias represents the identifier of the service. + type: string + ports: + items: + description: GatewayPort contains information on Gateway + service's port. + properties: + backendServicePort: + description: Number of the port to access the backend + service. + format: int32 + type: integer + name: + description: The name of this port within the gateway + service. + type: string + nodePort: + description: |- + The port on each node on which this gateway service is exposed when type is + NodePort or LoadBalancer. + format: int32 + type: integer + port: + description: The port that will be exposed by the + gateway service. + format: int32 + type: integer + required: + - port + type: object + type: array + required: + - alias + - ports + type: object + type: array + ui: + description: UI is an optional list of database web uis + items: + properties: + alias: + description: |- + Alias represents the identifier of the service. + This should match the db ui chart name + type: string + helmRelease: + description: |- + HelmRelease is the name of the helm release used to deploy this ui + The name format is typically - + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + port: + description: GatewayPort contains information on Gateway + service's port. + properties: + backendServicePort: + description: Number of the port to access the backend + service. + format: int32 + type: integer + name: + description: The name of this port within the gateway + service. + type: string + nodePort: + description: |- + The port on each node on which this gateway service is exposed when type is + NodePort or LoadBalancer. + format: int32 + type: integer + port: + description: The port that will be exposed by the gateway + service. + format: int32 + type: integer + required: + - port + type: object + url: + description: URL of the database ui + type: string + required: + - alias + - port + - url + type: object + type: array + required: + - name + - namespace + type: object + phase: + description: Specifies the current phase of the App + enum: + - Pending + - InProgress + - Terminating + - Current + - Failed + - Expired + type: string + secretRef: + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic + source: + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/go1.25.5.linux-amd64.tar.gz b/go1.25.5.linux-amd64.tar.gz new file mode 100644 index 00000000..920055cd Binary files /dev/null and b/go1.25.5.linux-amd64.tar.gz differ