postgresql_types.go 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. Copyright 2023.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. package v1
  14. import (
  15. metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
  16. )
  17. // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
  18. // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
  19. // PostgreSQLSpec defines the desired state of PostgreSQL
  20. type PostgreSQLSpec struct {
  21. // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
  22. // Important: Run "make" to regenerate code after modifying this file
  23. // Foo is an example field of PostgreSQL. Edit postgresql_types.go to remove/update
  24. Foo string `json:"foo,omitempty"`
  25. }
  26. // PostgreSQLStatus defines the observed state of PostgreSQL
  27. type PostgreSQLStatus struct {
  28. // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
  29. // Important: Run "make" to regenerate code after modifying this file
  30. }
  31. //+kubebuilder:object:root=true
  32. //+kubebuilder:subresource:status
  33. // PostgreSQL is the Schema for the postgresqls API
  34. type PostgreSQL struct {
  35. metav1.TypeMeta `json:",inline"`
  36. metav1.ObjectMeta `json:"metadata,omitempty"`
  37. Spec PostgreSQLSpec `json:"spec,omitempty"`
  38. Status PostgreSQLStatus `json:"status,omitempty"`
  39. }
  40. //+kubebuilder:object:root=true
  41. // PostgreSQLList contains a list of PostgreSQL
  42. type PostgreSQLList struct {
  43. metav1.TypeMeta `json:",inline"`
  44. metav1.ListMeta `json:"metadata,omitempty"`
  45. Items []PostgreSQL `json:"items"`
  46. }
  47. func init() {
  48. SchemeBuilder.Register(&PostgreSQL{}, &PostgreSQLList{})
  49. }