-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pgpool db client with latest pgpool api
Signed-off-by: MobarakHsn <[email protected]>
- Loading branch information
1 parent
9078472
commit 3d735d1
Showing
12 changed files
with
519 additions
and
63 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
vendor/kubedb.dev/pgpool/api/catalog/v1alpha1/groupversion_info.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
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 contains API Schema definitions for the catalog v1alpha1 API group | ||
// +kubebuilder:object:generate=true | ||
// +groupName=catalog.kubedb.com | ||
package v1alpha1 | ||
|
||
import ( | ||
"k8s.io/apimachinery/pkg/runtime/schema" | ||
"sigs.k8s.io/controller-runtime/pkg/scheme" | ||
) | ||
|
||
var ( | ||
// GroupVersion is group version used to register these objects | ||
GroupVersion = schema.GroupVersion{Group: "catalog.kubedb.com", Version: "v1alpha1"} | ||
|
||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme | ||
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} | ||
|
||
// AddToScheme adds the types in this group-version to the given scheme. | ||
AddToScheme = SchemeBuilder.AddToScheme | ||
) |
75 changes: 75 additions & 0 deletions
75
vendor/kubedb.dev/pgpool/api/catalog/v1alpha1/pgpoolversion_types.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* | ||
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 ( | ||
meta "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! | ||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. | ||
|
||
const ( | ||
ResourceCodePgpoolVersion = "ppversion" | ||
ResourceKindPgpoolVersion = "PgpoolVersion" | ||
ResourceSingularPgpoolVersion = "pgpoolversion" | ||
ResourcePluralPgpoolVersion = "pgpoolversions" | ||
) | ||
|
||
// +genclient | ||
// +genclient:nonNamespaced | ||
// +genclient:skipVerbs=updateStatus | ||
// +k8s:openapi-gen=true | ||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
|
||
// +kubebuilder:object:root=true | ||
// +kubebuilder:resource:path=pgpoolversions,singular=pgpoolversion,scope=Cluster,shortName=ppversion,categories={datastore,kubedb,appscode} | ||
// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version" | ||
// +kubebuilder:printcolumn:name="PGPOOL_IMAGE",type="string",JSONPath=".spec.pgpool.image" | ||
// +kubebuilder:printcolumn:name="Deprecated",type="boolean",JSONPath=".spec.deprecated" | ||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" | ||
type PgpoolVersion struct { | ||
meta.TypeMeta `json:",inline"` | ||
meta.ObjectMeta `json:"metadata,omitempty"` | ||
Spec PgpoolVersionSpec `json:"spec,omitempty"` | ||
} | ||
|
||
// PgpoolVersionSpec defines the desired state of PgpoolVersion | ||
type PgpoolVersionSpec struct { | ||
// Version | ||
Version string `json:"version"` | ||
// Database Image | ||
Pgpool PgpoolVersionDatabase `json:"pgpool"` | ||
// +optional | ||
Deprecated bool `json:"deprecated,omitempty"` | ||
} | ||
|
||
// PgBouncerVersionDatabase is the PgBouncer Database image | ||
type PgpoolVersionDatabase struct { | ||
Image string `json:"image"` | ||
} | ||
|
||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
//+kubebuilder:object:root=true | ||
|
||
// PgpoolVersionList contains a list of PgpoolVersion | ||
type PgpoolVersionList struct { | ||
meta.TypeMeta `json:",inline"` | ||
meta.ListMeta `json:"metadata,omitempty"` | ||
Items []PgpoolVersion `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilder.Register(&PgpoolVersion{}, &PgpoolVersionList{}) | ||
} |
Oops, something went wrong.