mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
[Feature] ArangoClusterSynchronization model (#872)
This commit is contained in:
parent
b5e707e2af
commit
9a00f404a8
29 changed files with 1547 additions and 0 deletions
|
@ -8,6 +8,7 @@
|
|||
- Add endpoint into member status
|
||||
- Add debug mode (Golang DLV)
|
||||
- License V2 for ArangoDB 3.9.0+
|
||||
- Add ArangoClusterSynchronization v1 API
|
||||
|
||||
## [1.2.6](https://github.com/arangodb/kube-arangodb/tree/1.2.6) (2021-12-15)
|
||||
- Add ArangoBackup backoff functionality
|
||||
|
|
|
@ -31,6 +31,10 @@ const (
|
|||
ArangoMemberResourceKind = "ArangoMember"
|
||||
ArangoMemberResourcePlural = "arangomembers"
|
||||
|
||||
ArangoClusterSynchronizationCRDName = ArangoClusterSynchronizationResourcePlural + "." + ArangoDeploymentGroupName
|
||||
ArangoClusterSynchronizationResourceKind = "ArangoClusterSynchronization"
|
||||
ArangoClusterSynchronizationResourcePlural = "arangoclustersynchronizations"
|
||||
|
||||
ArangoDeploymentGroupName = "database.arangodb.com"
|
||||
)
|
||||
|
||||
|
|
60
pkg/apis/deployment/v1/cluster_synchronization.go
Normal file
60
pkg/apis/deployment/v1/cluster_synchronization.go
Normal file
|
@ -0,0 +1,60 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2016-2021 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"github.com/arangodb/kube-arangodb/pkg/apis/deployment"
|
||||
|
||||
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ArangoClusterSynchronizationList is a list of ArangoDB jobs.
|
||||
type ArangoClusterSynchronizationList struct {
|
||||
meta.TypeMeta `json:",inline"`
|
||||
meta.ListMeta `json:"metadata,omitempty"`
|
||||
|
||||
Items []ArangoClusterSynchronization `json:"items"`
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ArangoClusterSynchronization contains definition and status of the ArangoDB type Job.
|
||||
type ArangoClusterSynchronization struct {
|
||||
meta.TypeMeta `json:",inline"`
|
||||
meta.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec ArangoClusterSynchronizationSpec `json:"spec,omitempty"`
|
||||
Status ArangoClusterSynchronizationStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// AsOwner creates an OwnerReference for the given job
|
||||
func (a *ArangoClusterSynchronization) AsOwner() meta.OwnerReference {
|
||||
trueVar := true
|
||||
return meta.OwnerReference{
|
||||
APIVersion: SchemeGroupVersion.String(),
|
||||
Kind: deployment.ArangoClusterSynchronizationResourceKind,
|
||||
Name: a.Name,
|
||||
UID: a.UID,
|
||||
Controller: &trueVar,
|
||||
}
|
||||
}
|
24
pkg/apis/deployment/v1/cluster_synchronization_spec.go
Normal file
24
pkg/apis/deployment/v1/cluster_synchronization_spec.go
Normal file
|
@ -0,0 +1,24 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2016-2021 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
|
||||
package v1
|
||||
|
||||
type ArangoClusterSynchronizationSpec struct {
|
||||
}
|
24
pkg/apis/deployment/v1/cluster_synchronization_status.go
Normal file
24
pkg/apis/deployment/v1/cluster_synchronization_status.go
Normal file
|
@ -0,0 +1,24 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2016-2021 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
|
||||
package v1
|
||||
|
||||
type ArangoClusterSynchronizationStatus struct {
|
||||
}
|
93
pkg/apis/deployment/v1/zz_generated.deepcopy.go
generated
93
pkg/apis/deployment/v1/zz_generated.deepcopy.go
generated
|
@ -61,6 +61,99 @@ func (in *Action) DeepCopy() *Action {
|
|||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ArangoClusterSynchronization) DeepCopyInto(out *ArangoClusterSynchronization) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
out.Spec = in.Spec
|
||||
out.Status = in.Status
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoClusterSynchronization.
|
||||
func (in *ArangoClusterSynchronization) DeepCopy() *ArangoClusterSynchronization {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ArangoClusterSynchronization)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ArangoClusterSynchronization) 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 *ArangoClusterSynchronizationList) DeepCopyInto(out *ArangoClusterSynchronizationList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ArangoClusterSynchronization, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoClusterSynchronizationList.
|
||||
func (in *ArangoClusterSynchronizationList) DeepCopy() *ArangoClusterSynchronizationList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ArangoClusterSynchronizationList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ArangoClusterSynchronizationList) 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 *ArangoClusterSynchronizationSpec) DeepCopyInto(out *ArangoClusterSynchronizationSpec) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoClusterSynchronizationSpec.
|
||||
func (in *ArangoClusterSynchronizationSpec) DeepCopy() *ArangoClusterSynchronizationSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ArangoClusterSynchronizationSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ArangoClusterSynchronizationStatus) DeepCopyInto(out *ArangoClusterSynchronizationStatus) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoClusterSynchronizationStatus.
|
||||
func (in *ArangoClusterSynchronizationStatus) DeepCopy() *ArangoClusterSynchronizationStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ArangoClusterSynchronizationStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ArangoDeployment) DeepCopyInto(out *ArangoDeployment) {
|
||||
*out = *in
|
||||
|
|
60
pkg/apis/deployment/v2alpha1/cluster_synchronization.go
Normal file
60
pkg/apis/deployment/v2alpha1/cluster_synchronization.go
Normal file
|
@ -0,0 +1,60 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2016-2021 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
|
||||
package v2alpha1
|
||||
|
||||
import (
|
||||
"github.com/arangodb/kube-arangodb/pkg/apis/deployment"
|
||||
|
||||
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ArangoClusterSynchronizationList is a list of ArangoDB jobs.
|
||||
type ArangoClusterSynchronizationList struct {
|
||||
meta.TypeMeta `json:",inline"`
|
||||
meta.ListMeta `json:"metadata,omitempty"`
|
||||
|
||||
Items []ArangoClusterSynchronization `json:"items"`
|
||||
}
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ArangoClusterSynchronization contains definition and status of the ArangoDB type Job.
|
||||
type ArangoClusterSynchronization struct {
|
||||
meta.TypeMeta `json:",inline"`
|
||||
meta.ObjectMeta `json:"metadata,omitempty"`
|
||||
Spec ArangoClusterSynchronizationSpec `json:"spec,omitempty"`
|
||||
Status ArangoClusterSynchronizationStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// AsOwner creates an OwnerReference for the given job
|
||||
func (a *ArangoClusterSynchronization) AsOwner() meta.OwnerReference {
|
||||
trueVar := true
|
||||
return meta.OwnerReference{
|
||||
APIVersion: SchemeGroupVersion.String(),
|
||||
Kind: deployment.ArangoClusterSynchronizationResourceKind,
|
||||
Name: a.Name,
|
||||
UID: a.UID,
|
||||
Controller: &trueVar,
|
||||
}
|
||||
}
|
24
pkg/apis/deployment/v2alpha1/cluster_synchronization_spec.go
Normal file
24
pkg/apis/deployment/v2alpha1/cluster_synchronization_spec.go
Normal file
|
@ -0,0 +1,24 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2016-2021 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
|
||||
package v2alpha1
|
||||
|
||||
type ArangoClusterSynchronizationSpec struct {
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2016-2021 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
|
||||
package v2alpha1
|
||||
|
||||
type ArangoClusterSynchronizationStatus struct {
|
||||
}
|
|
@ -61,6 +61,99 @@ func (in *Action) DeepCopy() *Action {
|
|||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ArangoClusterSynchronization) DeepCopyInto(out *ArangoClusterSynchronization) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
out.Spec = in.Spec
|
||||
out.Status = in.Status
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoClusterSynchronization.
|
||||
func (in *ArangoClusterSynchronization) DeepCopy() *ArangoClusterSynchronization {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ArangoClusterSynchronization)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ArangoClusterSynchronization) 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 *ArangoClusterSynchronizationList) DeepCopyInto(out *ArangoClusterSynchronizationList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ArangoClusterSynchronization, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoClusterSynchronizationList.
|
||||
func (in *ArangoClusterSynchronizationList) DeepCopy() *ArangoClusterSynchronizationList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ArangoClusterSynchronizationList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ArangoClusterSynchronizationList) 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 *ArangoClusterSynchronizationSpec) DeepCopyInto(out *ArangoClusterSynchronizationSpec) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoClusterSynchronizationSpec.
|
||||
func (in *ArangoClusterSynchronizationSpec) DeepCopy() *ArangoClusterSynchronizationSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ArangoClusterSynchronizationSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ArangoClusterSynchronizationStatus) DeepCopyInto(out *ArangoClusterSynchronizationStatus) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoClusterSynchronizationStatus.
|
||||
func (in *ArangoClusterSynchronizationStatus) DeepCopy() *ArangoClusterSynchronizationStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ArangoClusterSynchronizationStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ArangoDeployment) DeepCopyInto(out *ArangoDeployment) {
|
||||
*out = *in
|
||||
|
|
199
pkg/generated/clientset/versioned/typed/deployment/v1/arangoclustersynchronization.go
generated
Normal file
199
pkg/generated/clientset/versioned/typed/deployment/v1/arangoclustersynchronization.go
generated
Normal file
|
@ -0,0 +1,199 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2016-2021 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
|
||||
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// ArangoClusterSynchronizationsGetter has a method to return a ArangoClusterSynchronizationInterface.
|
||||
// A group's client should implement this interface.
|
||||
type ArangoClusterSynchronizationsGetter interface {
|
||||
ArangoClusterSynchronizations(namespace string) ArangoClusterSynchronizationInterface
|
||||
}
|
||||
|
||||
// ArangoClusterSynchronizationInterface has methods to work with ArangoClusterSynchronization resources.
|
||||
type ArangoClusterSynchronizationInterface interface {
|
||||
Create(ctx context.Context, arangoClusterSynchronization *v1.ArangoClusterSynchronization, opts metav1.CreateOptions) (*v1.ArangoClusterSynchronization, error)
|
||||
Update(ctx context.Context, arangoClusterSynchronization *v1.ArangoClusterSynchronization, opts metav1.UpdateOptions) (*v1.ArangoClusterSynchronization, error)
|
||||
UpdateStatus(ctx context.Context, arangoClusterSynchronization *v1.ArangoClusterSynchronization, opts metav1.UpdateOptions) (*v1.ArangoClusterSynchronization, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ArangoClusterSynchronization, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.ArangoClusterSynchronizationList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ArangoClusterSynchronization, err error)
|
||||
ArangoClusterSynchronizationExpansion
|
||||
}
|
||||
|
||||
// arangoClusterSynchronizations implements ArangoClusterSynchronizationInterface
|
||||
type arangoClusterSynchronizations struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newArangoClusterSynchronizations returns a ArangoClusterSynchronizations
|
||||
func newArangoClusterSynchronizations(c *DatabaseV1Client, namespace string) *arangoClusterSynchronizations {
|
||||
return &arangoClusterSynchronizations{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the arangoClusterSynchronization, and returns the corresponding arangoClusterSynchronization object, and an error if there is any.
|
||||
func (c *arangoClusterSynchronizations) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ArangoClusterSynchronization, err error) {
|
||||
result = &v1.ArangoClusterSynchronization{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("arangoclustersynchronizations").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ArangoClusterSynchronizations that match those selectors.
|
||||
func (c *arangoClusterSynchronizations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ArangoClusterSynchronizationList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.ArangoClusterSynchronizationList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("arangoclustersynchronizations").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested arangoClusterSynchronizations.
|
||||
func (c *arangoClusterSynchronizations) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("arangoclustersynchronizations").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a arangoClusterSynchronization and creates it. Returns the server's representation of the arangoClusterSynchronization, and an error, if there is any.
|
||||
func (c *arangoClusterSynchronizations) Create(ctx context.Context, arangoClusterSynchronization *v1.ArangoClusterSynchronization, opts metav1.CreateOptions) (result *v1.ArangoClusterSynchronization, err error) {
|
||||
result = &v1.ArangoClusterSynchronization{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("arangoclustersynchronizations").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(arangoClusterSynchronization).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a arangoClusterSynchronization and updates it. Returns the server's representation of the arangoClusterSynchronization, and an error, if there is any.
|
||||
func (c *arangoClusterSynchronizations) Update(ctx context.Context, arangoClusterSynchronization *v1.ArangoClusterSynchronization, opts metav1.UpdateOptions) (result *v1.ArangoClusterSynchronization, err error) {
|
||||
result = &v1.ArangoClusterSynchronization{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("arangoclustersynchronizations").
|
||||
Name(arangoClusterSynchronization.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(arangoClusterSynchronization).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *arangoClusterSynchronizations) UpdateStatus(ctx context.Context, arangoClusterSynchronization *v1.ArangoClusterSynchronization, opts metav1.UpdateOptions) (result *v1.ArangoClusterSynchronization, err error) {
|
||||
result = &v1.ArangoClusterSynchronization{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("arangoclustersynchronizations").
|
||||
Name(arangoClusterSynchronization.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(arangoClusterSynchronization).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the arangoClusterSynchronization and deletes it. Returns an error if one occurs.
|
||||
func (c *arangoClusterSynchronizations) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("arangoclustersynchronizations").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *arangoClusterSynchronizations) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("arangoclustersynchronizations").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched arangoClusterSynchronization.
|
||||
func (c *arangoClusterSynchronizations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ArangoClusterSynchronization, err error) {
|
||||
result = &v1.ArangoClusterSynchronization{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("arangoclustersynchronizations").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
|
@ -30,6 +30,7 @@ import (
|
|||
|
||||
type DatabaseV1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
ArangoClusterSynchronizationsGetter
|
||||
ArangoDeploymentsGetter
|
||||
ArangoMembersGetter
|
||||
}
|
||||
|
@ -39,6 +40,10 @@ type DatabaseV1Client struct {
|
|||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *DatabaseV1Client) ArangoClusterSynchronizations(namespace string) ArangoClusterSynchronizationInterface {
|
||||
return newArangoClusterSynchronizations(c, namespace)
|
||||
}
|
||||
|
||||
func (c *DatabaseV1Client) ArangoDeployments(namespace string) ArangoDeploymentInterface {
|
||||
return newArangoDeployments(c, namespace)
|
||||
}
|
||||
|
|
146
pkg/generated/clientset/versioned/typed/deployment/v1/fake/fake_arangoclustersynchronization.go
generated
Normal file
146
pkg/generated/clientset/versioned/typed/deployment/v1/fake/fake_arangoclustersynchronization.go
generated
Normal file
|
@ -0,0 +1,146 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2016-2021 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
deploymentv1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeArangoClusterSynchronizations implements ArangoClusterSynchronizationInterface
|
||||
type FakeArangoClusterSynchronizations struct {
|
||||
Fake *FakeDatabaseV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var arangoclustersynchronizationsResource = schema.GroupVersionResource{Group: "database.arangodb.com", Version: "v1", Resource: "arangoclustersynchronizations"}
|
||||
|
||||
var arangoclustersynchronizationsKind = schema.GroupVersionKind{Group: "database.arangodb.com", Version: "v1", Kind: "ArangoClusterSynchronization"}
|
||||
|
||||
// Get takes name of the arangoClusterSynchronization, and returns the corresponding arangoClusterSynchronization object, and an error if there is any.
|
||||
func (c *FakeArangoClusterSynchronizations) Get(ctx context.Context, name string, options v1.GetOptions) (result *deploymentv1.ArangoClusterSynchronization, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(arangoclustersynchronizationsResource, c.ns, name), &deploymentv1.ArangoClusterSynchronization{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*deploymentv1.ArangoClusterSynchronization), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ArangoClusterSynchronizations that match those selectors.
|
||||
func (c *FakeArangoClusterSynchronizations) List(ctx context.Context, opts v1.ListOptions) (result *deploymentv1.ArangoClusterSynchronizationList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(arangoclustersynchronizationsResource, arangoclustersynchronizationsKind, c.ns, opts), &deploymentv1.ArangoClusterSynchronizationList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &deploymentv1.ArangoClusterSynchronizationList{ListMeta: obj.(*deploymentv1.ArangoClusterSynchronizationList).ListMeta}
|
||||
for _, item := range obj.(*deploymentv1.ArangoClusterSynchronizationList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested arangoClusterSynchronizations.
|
||||
func (c *FakeArangoClusterSynchronizations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(arangoclustersynchronizationsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a arangoClusterSynchronization and creates it. Returns the server's representation of the arangoClusterSynchronization, and an error, if there is any.
|
||||
func (c *FakeArangoClusterSynchronizations) Create(ctx context.Context, arangoClusterSynchronization *deploymentv1.ArangoClusterSynchronization, opts v1.CreateOptions) (result *deploymentv1.ArangoClusterSynchronization, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(arangoclustersynchronizationsResource, c.ns, arangoClusterSynchronization), &deploymentv1.ArangoClusterSynchronization{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*deploymentv1.ArangoClusterSynchronization), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a arangoClusterSynchronization and updates it. Returns the server's representation of the arangoClusterSynchronization, and an error, if there is any.
|
||||
func (c *FakeArangoClusterSynchronizations) Update(ctx context.Context, arangoClusterSynchronization *deploymentv1.ArangoClusterSynchronization, opts v1.UpdateOptions) (result *deploymentv1.ArangoClusterSynchronization, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(arangoclustersynchronizationsResource, c.ns, arangoClusterSynchronization), &deploymentv1.ArangoClusterSynchronization{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*deploymentv1.ArangoClusterSynchronization), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeArangoClusterSynchronizations) UpdateStatus(ctx context.Context, arangoClusterSynchronization *deploymentv1.ArangoClusterSynchronization, opts v1.UpdateOptions) (*deploymentv1.ArangoClusterSynchronization, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(arangoclustersynchronizationsResource, "status", c.ns, arangoClusterSynchronization), &deploymentv1.ArangoClusterSynchronization{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*deploymentv1.ArangoClusterSynchronization), err
|
||||
}
|
||||
|
||||
// Delete takes name of the arangoClusterSynchronization and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeArangoClusterSynchronizations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(arangoclustersynchronizationsResource, c.ns, name), &deploymentv1.ArangoClusterSynchronization{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeArangoClusterSynchronizations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(arangoclustersynchronizationsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &deploymentv1.ArangoClusterSynchronizationList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched arangoClusterSynchronization.
|
||||
func (c *FakeArangoClusterSynchronizations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *deploymentv1.ArangoClusterSynchronization, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(arangoclustersynchronizationsResource, c.ns, name, pt, data, subresources...), &deploymentv1.ArangoClusterSynchronization{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*deploymentv1.ArangoClusterSynchronization), err
|
||||
}
|
|
@ -32,6 +32,10 @@ type FakeDatabaseV1 struct {
|
|||
*testing.Fake
|
||||
}
|
||||
|
||||
func (c *FakeDatabaseV1) ArangoClusterSynchronizations(namespace string) v1.ArangoClusterSynchronizationInterface {
|
||||
return &FakeArangoClusterSynchronizations{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeDatabaseV1) ArangoDeployments(namespace string) v1.ArangoDeploymentInterface {
|
||||
return &FakeArangoDeployments{c, namespace}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
package v1
|
||||
|
||||
type ArangoClusterSynchronizationExpansion interface{}
|
||||
|
||||
type ArangoDeploymentExpansion interface{}
|
||||
|
||||
type ArangoMemberExpansion interface{}
|
||||
|
|
199
pkg/generated/clientset/versioned/typed/deployment/v2alpha1/arangoclustersynchronization.go
generated
Normal file
199
pkg/generated/clientset/versioned/typed/deployment/v2alpha1/arangoclustersynchronization.go
generated
Normal file
|
@ -0,0 +1,199 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2016-2021 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v2alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v2alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v2alpha1"
|
||||
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// ArangoClusterSynchronizationsGetter has a method to return a ArangoClusterSynchronizationInterface.
|
||||
// A group's client should implement this interface.
|
||||
type ArangoClusterSynchronizationsGetter interface {
|
||||
ArangoClusterSynchronizations(namespace string) ArangoClusterSynchronizationInterface
|
||||
}
|
||||
|
||||
// ArangoClusterSynchronizationInterface has methods to work with ArangoClusterSynchronization resources.
|
||||
type ArangoClusterSynchronizationInterface interface {
|
||||
Create(ctx context.Context, arangoClusterSynchronization *v2alpha1.ArangoClusterSynchronization, opts v1.CreateOptions) (*v2alpha1.ArangoClusterSynchronization, error)
|
||||
Update(ctx context.Context, arangoClusterSynchronization *v2alpha1.ArangoClusterSynchronization, opts v1.UpdateOptions) (*v2alpha1.ArangoClusterSynchronization, error)
|
||||
UpdateStatus(ctx context.Context, arangoClusterSynchronization *v2alpha1.ArangoClusterSynchronization, opts v1.UpdateOptions) (*v2alpha1.ArangoClusterSynchronization, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.ArangoClusterSynchronization, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.ArangoClusterSynchronizationList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.ArangoClusterSynchronization, err error)
|
||||
ArangoClusterSynchronizationExpansion
|
||||
}
|
||||
|
||||
// arangoClusterSynchronizations implements ArangoClusterSynchronizationInterface
|
||||
type arangoClusterSynchronizations struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newArangoClusterSynchronizations returns a ArangoClusterSynchronizations
|
||||
func newArangoClusterSynchronizations(c *DatabaseV2alpha1Client, namespace string) *arangoClusterSynchronizations {
|
||||
return &arangoClusterSynchronizations{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the arangoClusterSynchronization, and returns the corresponding arangoClusterSynchronization object, and an error if there is any.
|
||||
func (c *arangoClusterSynchronizations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.ArangoClusterSynchronization, err error) {
|
||||
result = &v2alpha1.ArangoClusterSynchronization{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("arangoclustersynchronizations").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ArangoClusterSynchronizations that match those selectors.
|
||||
func (c *arangoClusterSynchronizations) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.ArangoClusterSynchronizationList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v2alpha1.ArangoClusterSynchronizationList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("arangoclustersynchronizations").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested arangoClusterSynchronizations.
|
||||
func (c *arangoClusterSynchronizations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("arangoclustersynchronizations").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a arangoClusterSynchronization and creates it. Returns the server's representation of the arangoClusterSynchronization, and an error, if there is any.
|
||||
func (c *arangoClusterSynchronizations) Create(ctx context.Context, arangoClusterSynchronization *v2alpha1.ArangoClusterSynchronization, opts v1.CreateOptions) (result *v2alpha1.ArangoClusterSynchronization, err error) {
|
||||
result = &v2alpha1.ArangoClusterSynchronization{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("arangoclustersynchronizations").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(arangoClusterSynchronization).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a arangoClusterSynchronization and updates it. Returns the server's representation of the arangoClusterSynchronization, and an error, if there is any.
|
||||
func (c *arangoClusterSynchronizations) Update(ctx context.Context, arangoClusterSynchronization *v2alpha1.ArangoClusterSynchronization, opts v1.UpdateOptions) (result *v2alpha1.ArangoClusterSynchronization, err error) {
|
||||
result = &v2alpha1.ArangoClusterSynchronization{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("arangoclustersynchronizations").
|
||||
Name(arangoClusterSynchronization.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(arangoClusterSynchronization).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *arangoClusterSynchronizations) UpdateStatus(ctx context.Context, arangoClusterSynchronization *v2alpha1.ArangoClusterSynchronization, opts v1.UpdateOptions) (result *v2alpha1.ArangoClusterSynchronization, err error) {
|
||||
result = &v2alpha1.ArangoClusterSynchronization{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("arangoclustersynchronizations").
|
||||
Name(arangoClusterSynchronization.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(arangoClusterSynchronization).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the arangoClusterSynchronization and deletes it. Returns an error if one occurs.
|
||||
func (c *arangoClusterSynchronizations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("arangoclustersynchronizations").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *arangoClusterSynchronizations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("arangoclustersynchronizations").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched arangoClusterSynchronization.
|
||||
func (c *arangoClusterSynchronizations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.ArangoClusterSynchronization, err error) {
|
||||
result = &v2alpha1.ArangoClusterSynchronization{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("arangoclustersynchronizations").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
|
@ -30,6 +30,7 @@ import (
|
|||
|
||||
type DatabaseV2alpha1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
ArangoClusterSynchronizationsGetter
|
||||
ArangoDeploymentsGetter
|
||||
ArangoMembersGetter
|
||||
}
|
||||
|
@ -39,6 +40,10 @@ type DatabaseV2alpha1Client struct {
|
|||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *DatabaseV2alpha1Client) ArangoClusterSynchronizations(namespace string) ArangoClusterSynchronizationInterface {
|
||||
return newArangoClusterSynchronizations(c, namespace)
|
||||
}
|
||||
|
||||
func (c *DatabaseV2alpha1Client) ArangoDeployments(namespace string) ArangoDeploymentInterface {
|
||||
return newArangoDeployments(c, namespace)
|
||||
}
|
||||
|
|
146
pkg/generated/clientset/versioned/typed/deployment/v2alpha1/fake/fake_arangoclustersynchronization.go
generated
Normal file
146
pkg/generated/clientset/versioned/typed/deployment/v2alpha1/fake/fake_arangoclustersynchronization.go
generated
Normal file
|
@ -0,0 +1,146 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2016-2021 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v2alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v2alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeArangoClusterSynchronizations implements ArangoClusterSynchronizationInterface
|
||||
type FakeArangoClusterSynchronizations struct {
|
||||
Fake *FakeDatabaseV2alpha1
|
||||
ns string
|
||||
}
|
||||
|
||||
var arangoclustersynchronizationsResource = schema.GroupVersionResource{Group: "database.arangodb.com", Version: "v2alpha1", Resource: "arangoclustersynchronizations"}
|
||||
|
||||
var arangoclustersynchronizationsKind = schema.GroupVersionKind{Group: "database.arangodb.com", Version: "v2alpha1", Kind: "ArangoClusterSynchronization"}
|
||||
|
||||
// Get takes name of the arangoClusterSynchronization, and returns the corresponding arangoClusterSynchronization object, and an error if there is any.
|
||||
func (c *FakeArangoClusterSynchronizations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.ArangoClusterSynchronization, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(arangoclustersynchronizationsResource, c.ns, name), &v2alpha1.ArangoClusterSynchronization{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2alpha1.ArangoClusterSynchronization), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ArangoClusterSynchronizations that match those selectors.
|
||||
func (c *FakeArangoClusterSynchronizations) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.ArangoClusterSynchronizationList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(arangoclustersynchronizationsResource, arangoclustersynchronizationsKind, c.ns, opts), &v2alpha1.ArangoClusterSynchronizationList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v2alpha1.ArangoClusterSynchronizationList{ListMeta: obj.(*v2alpha1.ArangoClusterSynchronizationList).ListMeta}
|
||||
for _, item := range obj.(*v2alpha1.ArangoClusterSynchronizationList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested arangoClusterSynchronizations.
|
||||
func (c *FakeArangoClusterSynchronizations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(arangoclustersynchronizationsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a arangoClusterSynchronization and creates it. Returns the server's representation of the arangoClusterSynchronization, and an error, if there is any.
|
||||
func (c *FakeArangoClusterSynchronizations) Create(ctx context.Context, arangoClusterSynchronization *v2alpha1.ArangoClusterSynchronization, opts v1.CreateOptions) (result *v2alpha1.ArangoClusterSynchronization, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(arangoclustersynchronizationsResource, c.ns, arangoClusterSynchronization), &v2alpha1.ArangoClusterSynchronization{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2alpha1.ArangoClusterSynchronization), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a arangoClusterSynchronization and updates it. Returns the server's representation of the arangoClusterSynchronization, and an error, if there is any.
|
||||
func (c *FakeArangoClusterSynchronizations) Update(ctx context.Context, arangoClusterSynchronization *v2alpha1.ArangoClusterSynchronization, opts v1.UpdateOptions) (result *v2alpha1.ArangoClusterSynchronization, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(arangoclustersynchronizationsResource, c.ns, arangoClusterSynchronization), &v2alpha1.ArangoClusterSynchronization{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2alpha1.ArangoClusterSynchronization), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeArangoClusterSynchronizations) UpdateStatus(ctx context.Context, arangoClusterSynchronization *v2alpha1.ArangoClusterSynchronization, opts v1.UpdateOptions) (*v2alpha1.ArangoClusterSynchronization, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(arangoclustersynchronizationsResource, "status", c.ns, arangoClusterSynchronization), &v2alpha1.ArangoClusterSynchronization{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2alpha1.ArangoClusterSynchronization), err
|
||||
}
|
||||
|
||||
// Delete takes name of the arangoClusterSynchronization and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeArangoClusterSynchronizations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(arangoclustersynchronizationsResource, c.ns, name), &v2alpha1.ArangoClusterSynchronization{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeArangoClusterSynchronizations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(arangoclustersynchronizationsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v2alpha1.ArangoClusterSynchronizationList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched arangoClusterSynchronization.
|
||||
func (c *FakeArangoClusterSynchronizations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.ArangoClusterSynchronization, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(arangoclustersynchronizationsResource, c.ns, name, pt, data, subresources...), &v2alpha1.ArangoClusterSynchronization{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2alpha1.ArangoClusterSynchronization), err
|
||||
}
|
|
@ -32,6 +32,10 @@ type FakeDatabaseV2alpha1 struct {
|
|||
*testing.Fake
|
||||
}
|
||||
|
||||
func (c *FakeDatabaseV2alpha1) ArangoClusterSynchronizations(namespace string) v2alpha1.ArangoClusterSynchronizationInterface {
|
||||
return &FakeArangoClusterSynchronizations{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeDatabaseV2alpha1) ArangoDeployments(namespace string) v2alpha1.ArangoDeploymentInterface {
|
||||
return &FakeArangoDeployments{c, namespace}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
package v2alpha1
|
||||
|
||||
type ArangoClusterSynchronizationExpansion interface{}
|
||||
|
||||
type ArangoDeploymentExpansion interface{}
|
||||
|
||||
type ArangoMemberExpansion interface{}
|
||||
|
|
94
pkg/generated/informers/externalversions/deployment/v1/arangoclustersynchronization.go
generated
Normal file
94
pkg/generated/informers/externalversions/deployment/v1/arangoclustersynchronization.go
generated
Normal file
|
@ -0,0 +1,94 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2016-2021 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
deploymentv1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
|
||||
versioned "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned"
|
||||
internalinterfaces "github.com/arangodb/kube-arangodb/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
v1 "github.com/arangodb/kube-arangodb/pkg/generated/listers/deployment/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// ArangoClusterSynchronizationInformer provides access to a shared informer and lister for
|
||||
// ArangoClusterSynchronizations.
|
||||
type ArangoClusterSynchronizationInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.ArangoClusterSynchronizationLister
|
||||
}
|
||||
|
||||
type arangoClusterSynchronizationInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewArangoClusterSynchronizationInformer constructs a new informer for ArangoClusterSynchronization type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewArangoClusterSynchronizationInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredArangoClusterSynchronizationInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredArangoClusterSynchronizationInformer constructs a new informer for ArangoClusterSynchronization type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredArangoClusterSynchronizationInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.DatabaseV1().ArangoClusterSynchronizations(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.DatabaseV1().ArangoClusterSynchronizations(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&deploymentv1.ArangoClusterSynchronization{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *arangoClusterSynchronizationInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredArangoClusterSynchronizationInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *arangoClusterSynchronizationInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&deploymentv1.ArangoClusterSynchronization{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *arangoClusterSynchronizationInformer) Lister() v1.ArangoClusterSynchronizationLister {
|
||||
return v1.NewArangoClusterSynchronizationLister(f.Informer().GetIndexer())
|
||||
}
|
|
@ -28,6 +28,8 @@ import (
|
|||
|
||||
// Interface provides access to all the informers in this group version.
|
||||
type Interface interface {
|
||||
// ArangoClusterSynchronizations returns a ArangoClusterSynchronizationInformer.
|
||||
ArangoClusterSynchronizations() ArangoClusterSynchronizationInformer
|
||||
// ArangoDeployments returns a ArangoDeploymentInformer.
|
||||
ArangoDeployments() ArangoDeploymentInformer
|
||||
// ArangoMembers returns a ArangoMemberInformer.
|
||||
|
@ -45,6 +47,11 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
|||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// ArangoClusterSynchronizations returns a ArangoClusterSynchronizationInformer.
|
||||
func (v *version) ArangoClusterSynchronizations() ArangoClusterSynchronizationInformer {
|
||||
return &arangoClusterSynchronizationInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// ArangoDeployments returns a ArangoDeploymentInformer.
|
||||
func (v *version) ArangoDeployments() ArangoDeploymentInformer {
|
||||
return &arangoDeploymentInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
|
|
94
pkg/generated/informers/externalversions/deployment/v2alpha1/arangoclustersynchronization.go
generated
Normal file
94
pkg/generated/informers/externalversions/deployment/v2alpha1/arangoclustersynchronization.go
generated
Normal file
|
@ -0,0 +1,94 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2016-2021 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v2alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
deploymentv2alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v2alpha1"
|
||||
versioned "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned"
|
||||
internalinterfaces "github.com/arangodb/kube-arangodb/pkg/generated/informers/externalversions/internalinterfaces"
|
||||
v2alpha1 "github.com/arangodb/kube-arangodb/pkg/generated/listers/deployment/v2alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// ArangoClusterSynchronizationInformer provides access to a shared informer and lister for
|
||||
// ArangoClusterSynchronizations.
|
||||
type ArangoClusterSynchronizationInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v2alpha1.ArangoClusterSynchronizationLister
|
||||
}
|
||||
|
||||
type arangoClusterSynchronizationInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewArangoClusterSynchronizationInformer constructs a new informer for ArangoClusterSynchronization type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewArangoClusterSynchronizationInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredArangoClusterSynchronizationInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredArangoClusterSynchronizationInformer constructs a new informer for ArangoClusterSynchronization type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredArangoClusterSynchronizationInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.DatabaseV2alpha1().ArangoClusterSynchronizations(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.DatabaseV2alpha1().ArangoClusterSynchronizations(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&deploymentv2alpha1.ArangoClusterSynchronization{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *arangoClusterSynchronizationInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredArangoClusterSynchronizationInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *arangoClusterSynchronizationInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&deploymentv2alpha1.ArangoClusterSynchronization{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *arangoClusterSynchronizationInformer) Lister() v2alpha1.ArangoClusterSynchronizationLister {
|
||||
return v2alpha1.NewArangoClusterSynchronizationLister(f.Informer().GetIndexer())
|
||||
}
|
|
@ -28,6 +28,8 @@ import (
|
|||
|
||||
// Interface provides access to all the informers in this group version.
|
||||
type Interface interface {
|
||||
// ArangoClusterSynchronizations returns a ArangoClusterSynchronizationInformer.
|
||||
ArangoClusterSynchronizations() ArangoClusterSynchronizationInformer
|
||||
// ArangoDeployments returns a ArangoDeploymentInformer.
|
||||
ArangoDeployments() ArangoDeploymentInformer
|
||||
// ArangoMembers returns a ArangoMemberInformer.
|
||||
|
@ -45,6 +47,11 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
|||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// ArangoClusterSynchronizations returns a ArangoClusterSynchronizationInformer.
|
||||
func (v *version) ArangoClusterSynchronizations() ArangoClusterSynchronizationInformer {
|
||||
return &arangoClusterSynchronizationInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// ArangoDeployments returns a ArangoDeploymentInformer.
|
||||
func (v *version) ArangoDeployments() ArangoDeploymentInformer {
|
||||
return &arangoDeploymentInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
|
|
|
@ -73,12 +73,16 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
|||
return &genericInformer{resource: resource.GroupResource(), informer: f.Backup().V1().ArangoBackupPolicies().Informer()}, nil
|
||||
|
||||
// Group=database.arangodb.com, Version=v1
|
||||
case deploymentv1.SchemeGroupVersion.WithResource("arangoclustersynchronizations"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Database().V1().ArangoClusterSynchronizations().Informer()}, nil
|
||||
case deploymentv1.SchemeGroupVersion.WithResource("arangodeployments"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Database().V1().ArangoDeployments().Informer()}, nil
|
||||
case deploymentv1.SchemeGroupVersion.WithResource("arangomembers"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Database().V1().ArangoMembers().Informer()}, nil
|
||||
|
||||
// Group=database.arangodb.com, Version=v2alpha1
|
||||
case v2alpha1.SchemeGroupVersion.WithResource("arangoclustersynchronizations"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Database().V2alpha1().ArangoClusterSynchronizations().Informer()}, nil
|
||||
case v2alpha1.SchemeGroupVersion.WithResource("arangodeployments"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Database().V2alpha1().ArangoDeployments().Informer()}, nil
|
||||
case v2alpha1.SchemeGroupVersion.WithResource("arangomembers"):
|
||||
|
|
103
pkg/generated/listers/deployment/v1/arangoclustersynchronization.go
generated
Normal file
103
pkg/generated/listers/deployment/v1/arangoclustersynchronization.go
generated
Normal file
|
@ -0,0 +1,103 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2016-2021 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// ArangoClusterSynchronizationLister helps list ArangoClusterSynchronizations.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ArangoClusterSynchronizationLister interface {
|
||||
// List lists all ArangoClusterSynchronizations in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.ArangoClusterSynchronization, err error)
|
||||
// ArangoClusterSynchronizations returns an object that can list and get ArangoClusterSynchronizations.
|
||||
ArangoClusterSynchronizations(namespace string) ArangoClusterSynchronizationNamespaceLister
|
||||
ArangoClusterSynchronizationListerExpansion
|
||||
}
|
||||
|
||||
// arangoClusterSynchronizationLister implements the ArangoClusterSynchronizationLister interface.
|
||||
type arangoClusterSynchronizationLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewArangoClusterSynchronizationLister returns a new ArangoClusterSynchronizationLister.
|
||||
func NewArangoClusterSynchronizationLister(indexer cache.Indexer) ArangoClusterSynchronizationLister {
|
||||
return &arangoClusterSynchronizationLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all ArangoClusterSynchronizations in the indexer.
|
||||
func (s *arangoClusterSynchronizationLister) List(selector labels.Selector) (ret []*v1.ArangoClusterSynchronization, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.ArangoClusterSynchronization))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// ArangoClusterSynchronizations returns an object that can list and get ArangoClusterSynchronizations.
|
||||
func (s *arangoClusterSynchronizationLister) ArangoClusterSynchronizations(namespace string) ArangoClusterSynchronizationNamespaceLister {
|
||||
return arangoClusterSynchronizationNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// ArangoClusterSynchronizationNamespaceLister helps list and get ArangoClusterSynchronizations.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ArangoClusterSynchronizationNamespaceLister interface {
|
||||
// List lists all ArangoClusterSynchronizations in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.ArangoClusterSynchronization, err error)
|
||||
// Get retrieves the ArangoClusterSynchronization from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.ArangoClusterSynchronization, error)
|
||||
ArangoClusterSynchronizationNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// arangoClusterSynchronizationNamespaceLister implements the ArangoClusterSynchronizationNamespaceLister
|
||||
// interface.
|
||||
type arangoClusterSynchronizationNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all ArangoClusterSynchronizations in the indexer for a given namespace.
|
||||
func (s arangoClusterSynchronizationNamespaceLister) List(selector labels.Selector) (ret []*v1.ArangoClusterSynchronization, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1.ArangoClusterSynchronization))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the ArangoClusterSynchronization from the indexer for a given namespace and name.
|
||||
func (s arangoClusterSynchronizationNamespaceLister) Get(name string) (*v1.ArangoClusterSynchronization, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1.Resource("arangoclustersynchronization"), name)
|
||||
}
|
||||
return obj.(*v1.ArangoClusterSynchronization), nil
|
||||
}
|
|
@ -22,6 +22,14 @@
|
|||
|
||||
package v1
|
||||
|
||||
// ArangoClusterSynchronizationListerExpansion allows custom methods to be added to
|
||||
// ArangoClusterSynchronizationLister.
|
||||
type ArangoClusterSynchronizationListerExpansion interface{}
|
||||
|
||||
// ArangoClusterSynchronizationNamespaceListerExpansion allows custom methods to be added to
|
||||
// ArangoClusterSynchronizationNamespaceLister.
|
||||
type ArangoClusterSynchronizationNamespaceListerExpansion interface{}
|
||||
|
||||
// ArangoDeploymentListerExpansion allows custom methods to be added to
|
||||
// ArangoDeploymentLister.
|
||||
type ArangoDeploymentListerExpansion interface{}
|
||||
|
|
103
pkg/generated/listers/deployment/v2alpha1/arangoclustersynchronization.go
generated
Normal file
103
pkg/generated/listers/deployment/v2alpha1/arangoclustersynchronization.go
generated
Normal file
|
@ -0,0 +1,103 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2016-2021 ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
||||
//
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v2alpha1
|
||||
|
||||
import (
|
||||
v2alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v2alpha1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// ArangoClusterSynchronizationLister helps list ArangoClusterSynchronizations.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ArangoClusterSynchronizationLister interface {
|
||||
// List lists all ArangoClusterSynchronizations in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v2alpha1.ArangoClusterSynchronization, err error)
|
||||
// ArangoClusterSynchronizations returns an object that can list and get ArangoClusterSynchronizations.
|
||||
ArangoClusterSynchronizations(namespace string) ArangoClusterSynchronizationNamespaceLister
|
||||
ArangoClusterSynchronizationListerExpansion
|
||||
}
|
||||
|
||||
// arangoClusterSynchronizationLister implements the ArangoClusterSynchronizationLister interface.
|
||||
type arangoClusterSynchronizationLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewArangoClusterSynchronizationLister returns a new ArangoClusterSynchronizationLister.
|
||||
func NewArangoClusterSynchronizationLister(indexer cache.Indexer) ArangoClusterSynchronizationLister {
|
||||
return &arangoClusterSynchronizationLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all ArangoClusterSynchronizations in the indexer.
|
||||
func (s *arangoClusterSynchronizationLister) List(selector labels.Selector) (ret []*v2alpha1.ArangoClusterSynchronization, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v2alpha1.ArangoClusterSynchronization))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// ArangoClusterSynchronizations returns an object that can list and get ArangoClusterSynchronizations.
|
||||
func (s *arangoClusterSynchronizationLister) ArangoClusterSynchronizations(namespace string) ArangoClusterSynchronizationNamespaceLister {
|
||||
return arangoClusterSynchronizationNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// ArangoClusterSynchronizationNamespaceLister helps list and get ArangoClusterSynchronizations.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type ArangoClusterSynchronizationNamespaceLister interface {
|
||||
// List lists all ArangoClusterSynchronizations in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v2alpha1.ArangoClusterSynchronization, err error)
|
||||
// Get retrieves the ArangoClusterSynchronization from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v2alpha1.ArangoClusterSynchronization, error)
|
||||
ArangoClusterSynchronizationNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// arangoClusterSynchronizationNamespaceLister implements the ArangoClusterSynchronizationNamespaceLister
|
||||
// interface.
|
||||
type arangoClusterSynchronizationNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all ArangoClusterSynchronizations in the indexer for a given namespace.
|
||||
func (s arangoClusterSynchronizationNamespaceLister) List(selector labels.Selector) (ret []*v2alpha1.ArangoClusterSynchronization, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v2alpha1.ArangoClusterSynchronization))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the ArangoClusterSynchronization from the indexer for a given namespace and name.
|
||||
func (s arangoClusterSynchronizationNamespaceLister) Get(name string) (*v2alpha1.ArangoClusterSynchronization, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v2alpha1.Resource("arangoclustersynchronization"), name)
|
||||
}
|
||||
return obj.(*v2alpha1.ArangoClusterSynchronization), nil
|
||||
}
|
|
@ -22,6 +22,14 @@
|
|||
|
||||
package v2alpha1
|
||||
|
||||
// ArangoClusterSynchronizationListerExpansion allows custom methods to be added to
|
||||
// ArangoClusterSynchronizationLister.
|
||||
type ArangoClusterSynchronizationListerExpansion interface{}
|
||||
|
||||
// ArangoClusterSynchronizationNamespaceListerExpansion allows custom methods to be added to
|
||||
// ArangoClusterSynchronizationNamespaceLister.
|
||||
type ArangoClusterSynchronizationNamespaceListerExpansion interface{}
|
||||
|
||||
// ArangoDeploymentListerExpansion allows custom methods to be added to
|
||||
// ArangoDeploymentLister.
|
||||
type ArangoDeploymentListerExpansion interface{}
|
||||
|
|
Loading…
Reference in a new issue