Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Kidswiss committed Jan 26, 2024
1 parent 6c12b7e commit e1ef271
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 45 deletions.
2 changes: 2 additions & 0 deletions apis/stackgres/v1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ func init() {
&SGClusterList{},
&SGPostgresConfig{},
&SGPostgesConfigList{},
&SGPoolingConfigList{},
&SGPoolingConfig{},
)
}
19 changes: 0 additions & 19 deletions apis/stackgres/v1/sgpoolconfigs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package v1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)

// +kubebuilder:object:root=true
Expand All @@ -27,21 +26,3 @@ type SGPoolingConfigList struct {

Items []SGPoolingConfig `json:"items"`
}

type (
someStruct struct {
Configs []Config `json:",inline"`
}
// +kubebuilder:pruning:PreserveUnknownFields
// +kubebuilder:validation:EmbeddedResource
Config unstructured.Unstructured
)

func (in *Config) DeepCopyInto(out *Config) {
// controller-gen cannot handle the interface{} type of an aliased Unstructured, thus we write our own DeepCopyInto function.
if out != nil {
casted := unstructured.Unstructured(*in)
deepCopy := casted.DeepCopy()
out.Object = deepCopy.Object
}
}
8 changes: 5 additions & 3 deletions apis/stackgres/v1/sgpoolconfigs_types.go

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

27 changes: 4 additions & 23 deletions apis/stackgres/v1/zz_generated.deepcopy.go

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

0 comments on commit e1ef271

Please sign in to comment.