1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

[Feature] [ML] CRD (#1466)

This commit is contained in:
Adam Janikowski 2023-11-08 16:36:20 +01:00 committed by GitHub
parent 27d448a4e9
commit 9d0f6e0b1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
70 changed files with 4064 additions and 7 deletions

View file

@ -37,6 +37,8 @@ linters-settings:
alias: storage
- pkg: k8s.io/api/policy/v1
alias: policy
- pkg: github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1
alias: mlApi
gci:
sections:
- standard

View file

@ -4,6 +4,7 @@
- (Documentation) Improvements and fixes for rendered documentation (GH pages)
- (Feature) License Manager
- (Improvement) Use Async mode for backup creation
- (Feature) (ML) CRD
## [1.2.35](https://github.com/arangodb/kube-arangodb/tree/1.2.35) (2023-11-06)
- (Maintenance) Update go-driver to v1.6.0, update IsNotFound() checks

View file

@ -368,7 +368,7 @@ update-generated:
"all" \
"github.com/arangodb/kube-arangodb/pkg/generated" \
"github.com/arangodb/kube-arangodb/pkg/apis" \
"deployment:v1 replication:v1 storage:v1alpha backup:v1 deployment:v2alpha1 replication:v2alpha1 apps:v1" \
"deployment:v1 replication:v1 storage:v1alpha backup:v1 deployment:v2alpha1 replication:v2alpha1 apps:v1 ml:v1alpha1" \
--go-header-file "./tools/codegen/boilerplate.go.txt" \
$(VERIFYARGS)
GOPATH=$(GOBUILDDIR) $(VENDORDIR)/k8s.io/code-generator/generate-groups.sh \
@ -791,7 +791,8 @@ fix: license-range fmt license yamlfmt
CRDS:=apps-job \
backups-backup backups-backuppolicy \
database-clustersynchronization database-deployment database-member database-task \
replication-deploymentreplication
replication-deploymentreplication \
ml-storage ml-extension ml-job-batch ml-job-cron
.PHONY: sync-crds
sync-crds:

View file

@ -0,0 +1,22 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: arangomlextensions.ml.arangodb.com
spec:
group: ml.arangodb.com
names:
kind: ArangoMLExtension
listKind: ArangoMLExtensionList
plural: arangomlextensions
singular: arangomlextension
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
type: object
x-kubernetes-preserve-unknown-fields: true
served: true
storage: true
subresources:
status: {}

View file

@ -0,0 +1,22 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: arangomlbatchjobs.ml.arangodb.com
spec:
group: ml.arangodb.com
names:
kind: ArangoMLBatchJob
listKind: ArangoMLBatchJobList
plural: arangomlbatchjobs
singular: arangomlbatchjob
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
type: object
x-kubernetes-preserve-unknown-fields: true
served: true
storage: true
subresources:
status: {}

View file

@ -0,0 +1,22 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: arangomlcronjobs.ml.arangodb.com
spec:
group: ml.arangodb.com
names:
kind: ArangoMLCronJob
listKind: ArangoMLCronJobList
plural: arangomlcronjobs
singular: arangomlcronjob
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
type: object
x-kubernetes-preserve-unknown-fields: true
served: true
storage: true
subresources:
status: {}

View file

@ -0,0 +1,22 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: arangomlstorages.ml.arangodb.com
spec:
group: ml.arangodb.com
names:
kind: ArangoMLStorage
listKind: ArangoMLStorageList
plural: arangomlstorages
singular: arangomlstorage
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
type: object
x-kubernetes-preserve-unknown-fields: true
served: true
storage: true
subresources:
status: {}

View file

@ -0,0 +1,6 @@
# API Reference for ArangoMLBatchJob V1Alpha1
## Spec
## Status

View file

@ -0,0 +1,6 @@
# API Reference for ArangoMLCronJob V1Alpha1
## Spec
## Status

View file

@ -0,0 +1,6 @@
# API Reference for ArangoMLExtension V1Alpha1
## Spec
## Status

View file

@ -0,0 +1,6 @@
# API Reference for ArangoMLStorage V1Alpha1
## Spec
## Status

View file

@ -5,5 +5,9 @@
- [ArangoDeployment.V1](./ArangoDeployment.V1.md)
- [ArangoDeploymentReplication.V1](./ArangoDeploymentReplication.V1.md)
- [ArangoLocalStorage.V1Alpha](./ArangoLocalStorage.V1Alpha.md)
- [ArangoMLBatchJob.V1Alpha1](./ArangoMLBatchJob.V1Alpha1.md)
- [ArangoMLCronJob.V1Alpha1](./ArangoMLCronJob.V1Alpha1.md)
- [ArangoMLExtension.V1Alpha1](./ArangoMLExtension.V1Alpha1.md)
- [ArangoMLStorage.V1Alpha1](./ArangoMLStorage.V1Alpha1.md)
- [ArangoMember.V1](./ArangoMember.V1.md)

View file

@ -38,6 +38,7 @@ import (
backupApi "github.com/arangodb/kube-arangodb/pkg/apis/backup/v1"
deploymentApi "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
mlApi "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
replicationApi "github.com/arangodb/kube-arangodb/pkg/apis/replication/v1"
storageApi "github.com/arangodb/kube-arangodb/pkg/apis/storage/v1alpha"
"github.com/arangodb/kube-arangodb/pkg/util"
@ -145,6 +146,24 @@ func Test_GenerateAPIDocs(t *testing.T) {
"Status": backupApi.ArangoBackupPolicy{}.Status,
},
},
fmt.Sprintf("%s/pkg/apis/ml/v1alpha1", root): {
"ArangoMLExtension.V1Alpha1": {
"Spec": mlApi.ArangoMLExtension{}.Spec,
"Status": mlApi.ArangoMLExtension{}.Status,
},
"ArangoMLStorage.V1Alpha1": {
"Spec": mlApi.ArangoMLStorage{}.Spec,
"Status": mlApi.ArangoMLStorage{}.Status,
},
"ArangoMLCronJob.V1Alpha1": {
"Spec": mlApi.ArangoMLCronJob{}.Spec,
"Status": mlApi.ArangoMLCronJob{}.Status,
},
"ArangoMLBatchJob.V1Alpha1": {
"Spec": mlApi.ArangoMLBatchJob{}.Spec,
"Status": mlApi.ArangoMLBatchJob{}.Status,
},
},
fmt.Sprintf("%s/pkg/apis/replication/v1", root): {
"ArangoDeploymentReplication.V1": {
"Spec": replicationApi.ArangoDeploymentReplication{}.Spec,

View file

@ -0,0 +1,41 @@
//
// DISCLAIMER
//
// Copyright 2023 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 ml
const (
ArangoMLStorageCRDName = ArangoMLStorageResourcePlural + "." + ArangoMLGroupName
ArangoMLStorageResourceKind = "ArangoMLStorage"
ArangoMLStorageResourcePlural = "arangomlstorages"
ArangoMLExtensionCRDName = ArangoMLExtensionResourcePlural + "." + ArangoMLGroupName
ArangoMLExtensionResourceKind = "ArangoMLExtension"
ArangoMLExtensionResourcePlural = "arangomlextensions"
ArangoMLBatchJobCRDName = ArangoMLBatchJobResourcePlural + "." + ArangoMLGroupName
ArangoMLBatchJobResourceKind = "ArangoMLBatchJob"
ArangoMLBatchJobResourcePlural = "arangomlbatchjobs"
ArangoMLCronJobCRDName = ArangoMLCronJobResourcePlural + "." + ArangoMLGroupName
ArangoMLCronJobResourceKind = "ArangoMLCronJob"
ArangoMLCronJobResourcePlural = "arangomlcronjobs"
ArangoMLGroupName = "ml.arangodb.com"
)

View file

@ -0,0 +1,47 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
import (
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ArangoMLBatchJobList is a list of ArangoML BatchJobs.
type ArangoMLBatchJobList struct {
meta.TypeMeta `json:",inline"`
meta.ListMeta `json:"metadata,omitempty"`
Items []ArangoMLBatchJob `json:"items"`
}
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ArangoMLBatchJob contains definition and status of the ArangoML BatchJob.
type ArangoMLBatchJob struct {
meta.TypeMeta `json:",inline"`
meta.ObjectMeta `json:"metadata,omitempty"`
Spec ArangoMLBatchJobSpec `json:"spec"`
Status ArangoMLBatchJobStatus `json:"status"`
}

View file

@ -0,0 +1,24 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
type ArangoMLBatchJobSpec struct {
}

View file

@ -0,0 +1,24 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
type ArangoMLBatchJobStatus struct {
}

View file

@ -0,0 +1,47 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
import (
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ArangoMLCronJobList is a list of ArangoML CronJobs.
type ArangoMLCronJobList struct {
meta.TypeMeta `json:",inline"`
meta.ListMeta `json:"metadata,omitempty"`
Items []ArangoMLCronJob `json:"items"`
}
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ArangoMLCronJob contains definition and status of the ArangoML CronJob.
type ArangoMLCronJob struct {
meta.TypeMeta `json:",inline"`
meta.ObjectMeta `json:"metadata,omitempty"`
Spec ArangoMLCronJobSpec `json:"spec"`
Status ArangoMLCronJobStatus `json:"status"`
}

View file

@ -0,0 +1,24 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
type ArangoMLCronJobSpec struct {
}

View file

@ -0,0 +1,24 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
type ArangoMLCronJobStatus struct {
}

View file

@ -0,0 +1,23 @@
//
// DISCLAIMER
//
// Copyright 2023 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
//
// +k8s:deepcopy-gen=package
// +groupName=ml.arangodb.com
package v1alpha1

View file

@ -0,0 +1,47 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
import (
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ArangoMLExtensionList is a list of ArangoML Extensions.
type ArangoMLExtensionList struct {
meta.TypeMeta `json:",inline"`
meta.ListMeta `json:"metadata,omitempty"`
Items []ArangoMLExtension `json:"items"`
}
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ArangoMLExtension contains definition and status of the ArangoML Extension.
type ArangoMLExtension struct {
meta.TypeMeta `json:",inline"`
meta.ObjectMeta `json:"metadata,omitempty"`
Spec ArangoMLExtensionSpec `json:"spec"`
Status ArangoMLExtensionStatus `json:"status"`
}

View file

@ -0,0 +1,24 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
type ArangoMLExtensionSpec struct {
}

View file

@ -0,0 +1,24 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
type ArangoMLExtensionStatus struct {
}

View file

@ -0,0 +1,60 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
import (
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"github.com/arangodb/kube-arangodb/pkg/apis/ml"
)
const (
ArangoMLVersion = "v1alpha1"
)
var (
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
AddToScheme = SchemeBuilder.AddToScheme
SchemeGroupVersion = schema.GroupVersion{Group: ml.ArangoMLGroupName, Version: ArangoMLVersion}
)
// Resource gets an ArangoCluster GroupResource for a specified resource
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
// addKnownTypes adds the set of types defined in this package to the supplied scheme.
func addKnownTypes(s *runtime.Scheme) error {
s.AddKnownTypes(SchemeGroupVersion,
&ArangoMLStorage{},
&ArangoMLStorageList{},
&ArangoMLExtension{},
&ArangoMLExtensionList{},
&ArangoMLBatchJob{},
&ArangoMLBatchJobList{},
&ArangoMLCronJob{},
&ArangoMLCronJobList{})
meta.AddToGroupVersion(s, SchemeGroupVersion)
return nil
}

View file

@ -0,0 +1,47 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
import (
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ArangoMLStorageList is a list of ArangoML Storages.
type ArangoMLStorageList struct {
meta.TypeMeta `json:",inline"`
meta.ListMeta `json:"metadata,omitempty"`
Items []ArangoMLStorage `json:"items"`
}
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ArangoMLStorage contains definition and status of the ArangoML Storage.
type ArangoMLStorage struct {
meta.TypeMeta `json:",inline"`
meta.ObjectMeta `json:"metadata,omitempty"`
Spec ArangoMLStorageSpec `json:"spec"`
Status ArangoMLStorageStatus `json:"status"`
}

View file

@ -0,0 +1,24 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
type ArangoMLStorageSpec struct {
}

View file

@ -0,0 +1,24 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
type ArangoMLStorageStatus struct {
}

View file

@ -0,0 +1,402 @@
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
//
// DISCLAIMER
//
// Copyright 2023 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 deepcopy-gen. DO NOT EDIT.
package v1alpha1
import (
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ArangoMLBatchJob) DeepCopyInto(out *ArangoMLBatchJob) {
*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 ArangoMLBatchJob.
func (in *ArangoMLBatchJob) DeepCopy() *ArangoMLBatchJob {
if in == nil {
return nil
}
out := new(ArangoMLBatchJob)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ArangoMLBatchJob) 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 *ArangoMLBatchJobList) DeepCopyInto(out *ArangoMLBatchJobList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ArangoMLBatchJob, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoMLBatchJobList.
func (in *ArangoMLBatchJobList) DeepCopy() *ArangoMLBatchJobList {
if in == nil {
return nil
}
out := new(ArangoMLBatchJobList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ArangoMLBatchJobList) 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 *ArangoMLBatchJobSpec) DeepCopyInto(out *ArangoMLBatchJobSpec) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoMLBatchJobSpec.
func (in *ArangoMLBatchJobSpec) DeepCopy() *ArangoMLBatchJobSpec {
if in == nil {
return nil
}
out := new(ArangoMLBatchJobSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ArangoMLBatchJobStatus) DeepCopyInto(out *ArangoMLBatchJobStatus) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoMLBatchJobStatus.
func (in *ArangoMLBatchJobStatus) DeepCopy() *ArangoMLBatchJobStatus {
if in == nil {
return nil
}
out := new(ArangoMLBatchJobStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ArangoMLCronJob) DeepCopyInto(out *ArangoMLCronJob) {
*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 ArangoMLCronJob.
func (in *ArangoMLCronJob) DeepCopy() *ArangoMLCronJob {
if in == nil {
return nil
}
out := new(ArangoMLCronJob)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ArangoMLCronJob) 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 *ArangoMLCronJobList) DeepCopyInto(out *ArangoMLCronJobList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ArangoMLCronJob, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoMLCronJobList.
func (in *ArangoMLCronJobList) DeepCopy() *ArangoMLCronJobList {
if in == nil {
return nil
}
out := new(ArangoMLCronJobList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ArangoMLCronJobList) 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 *ArangoMLCronJobSpec) DeepCopyInto(out *ArangoMLCronJobSpec) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoMLCronJobSpec.
func (in *ArangoMLCronJobSpec) DeepCopy() *ArangoMLCronJobSpec {
if in == nil {
return nil
}
out := new(ArangoMLCronJobSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ArangoMLCronJobStatus) DeepCopyInto(out *ArangoMLCronJobStatus) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoMLCronJobStatus.
func (in *ArangoMLCronJobStatus) DeepCopy() *ArangoMLCronJobStatus {
if in == nil {
return nil
}
out := new(ArangoMLCronJobStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ArangoMLExtension) DeepCopyInto(out *ArangoMLExtension) {
*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 ArangoMLExtension.
func (in *ArangoMLExtension) DeepCopy() *ArangoMLExtension {
if in == nil {
return nil
}
out := new(ArangoMLExtension)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ArangoMLExtension) 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 *ArangoMLExtensionList) DeepCopyInto(out *ArangoMLExtensionList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ArangoMLExtension, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoMLExtensionList.
func (in *ArangoMLExtensionList) DeepCopy() *ArangoMLExtensionList {
if in == nil {
return nil
}
out := new(ArangoMLExtensionList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ArangoMLExtensionList) 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 *ArangoMLExtensionSpec) DeepCopyInto(out *ArangoMLExtensionSpec) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoMLExtensionSpec.
func (in *ArangoMLExtensionSpec) DeepCopy() *ArangoMLExtensionSpec {
if in == nil {
return nil
}
out := new(ArangoMLExtensionSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ArangoMLExtensionStatus) DeepCopyInto(out *ArangoMLExtensionStatus) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoMLExtensionStatus.
func (in *ArangoMLExtensionStatus) DeepCopy() *ArangoMLExtensionStatus {
if in == nil {
return nil
}
out := new(ArangoMLExtensionStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ArangoMLStorage) DeepCopyInto(out *ArangoMLStorage) {
*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 ArangoMLStorage.
func (in *ArangoMLStorage) DeepCopy() *ArangoMLStorage {
if in == nil {
return nil
}
out := new(ArangoMLStorage)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ArangoMLStorage) 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 *ArangoMLStorageList) DeepCopyInto(out *ArangoMLStorageList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ArangoMLStorage, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoMLStorageList.
func (in *ArangoMLStorageList) DeepCopy() *ArangoMLStorageList {
if in == nil {
return nil
}
out := new(ArangoMLStorageList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ArangoMLStorageList) 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 *ArangoMLStorageSpec) DeepCopyInto(out *ArangoMLStorageSpec) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoMLStorageSpec.
func (in *ArangoMLStorageSpec) DeepCopy() *ArangoMLStorageSpec {
if in == nil {
return nil
}
out := new(ArangoMLStorageSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ArangoMLStorageStatus) DeepCopyInto(out *ArangoMLStorageStatus) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoMLStorageStatus.
func (in *ArangoMLStorageStatus) DeepCopy() *ArangoMLStorageStatus {
if in == nil {
return nil
}
out := new(ArangoMLStorageStatus)
in.DeepCopyInto(out)
return out
}

32
pkg/crd/arangoml.go Normal file
View file

@ -0,0 +1,32 @@
//
// DISCLAIMER
//
// Copyright 2016-2023 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 crd
import (
"github.com/arangodb/kube-arangodb/pkg/crd/crds"
)
func init() {
registerCRDWithPanic(crds.MLStorageDefinition())
registerCRDWithPanic(crds.MLExtensionDefinition())
registerCRDWithPanic(crds.MLCronJobDefinition())
registerCRDWithPanic(crds.MLBatchJobDefinition())
}

View file

@ -33,14 +33,32 @@ type Definition struct {
func AllDefinitions() []Definition {
return []Definition{
AppsJobDefinition(),
BackupsBackupDefinition(),
BackupsBackupPolicyDefinition(),
DatabaseClusterSynchronizationDefinition(),
// Deployment
DatabaseDeploymentDefinition(),
DatabaseMemberDefinition(),
DatabaseTaskDefinition(),
// ACS
DatabaseClusterSynchronizationDefinition(),
// ArangoSync
ReplicationDeploymentReplicationDefinition(),
// Storage
StorageLocalStorageDefinition(),
// Apps
AppsJobDefinition(),
DatabaseTaskDefinition(),
// Backups
BackupsBackupDefinition(),
BackupsBackupPolicyDefinition(),
// ML
MLExtensionDefinition(),
MLStorageDefinition(),
MLCronJobDefinition(),
MLBatchJobDefinition(),
}
}

View file

@ -28,6 +28,7 @@ import (
"github.com/arangodb/kube-arangodb/pkg/apis/apps"
"github.com/arangodb/kube-arangodb/pkg/apis/backup"
"github.com/arangodb/kube-arangodb/pkg/apis/deployment"
"github.com/arangodb/kube-arangodb/pkg/apis/ml"
"github.com/arangodb/kube-arangodb/pkg/apis/replication"
"github.com/arangodb/kube-arangodb/pkg/apis/storage"
)
@ -48,4 +49,8 @@ func Test_CRD(t *testing.T) {
ensureCRDCompliance(t, deployment.ArangoTaskCRDName, DatabaseTaskDefinition())
ensureCRDCompliance(t, replication.ArangoDeploymentReplicationCRDName, ReplicationDeploymentReplicationDefinition())
ensureCRDCompliance(t, storage.ArangoLocalStorageCRDName, StorageLocalStorageDefinition())
ensureCRDCompliance(t, ml.ArangoMLExtensionCRDName, MLExtensionDefinition())
ensureCRDCompliance(t, ml.ArangoMLStorageCRDName, MLStorageDefinition())
ensureCRDCompliance(t, ml.ArangoMLCronJobCRDName, MLCronJobDefinition())
ensureCRDCompliance(t, ml.ArangoMLBatchJobCRDName, MLBatchJobDefinition())
}

View file

@ -0,0 +1,56 @@
//
// DISCLAIMER
//
// Copyright 2023 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 crds
import (
_ "embed"
apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
"k8s.io/apimachinery/pkg/util/yaml"
"github.com/arangodb/go-driver"
)
const (
MLExtensionVersion = driver.Version("1.0.0")
)
func init() {
if err := yaml.Unmarshal(mlExtension, &mlExtensionCRD); err != nil {
panic(err)
}
}
func MLExtension() *apiextensions.CustomResourceDefinition {
return mlExtensionCRD.DeepCopy()
}
func MLExtensionDefinition() Definition {
return Definition{
Version: MLExtensionVersion,
CRD: mlExtensionCRD.DeepCopy(),
}
}
var mlExtensionCRD apiextensions.CustomResourceDefinition
//go:embed ml-extension.yaml
var mlExtension []byte

View file

@ -0,0 +1,22 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: arangomlextensions.ml.arangodb.com
spec:
group: ml.arangodb.com
names:
kind: ArangoMLExtension
listKind: ArangoMLExtensionList
plural: arangomlextensions
singular: arangomlextension
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
type: object
x-kubernetes-preserve-unknown-fields: true
served: true
storage: true
subresources:
status: {}

View file

@ -0,0 +1,56 @@
//
// DISCLAIMER
//
// Copyright 2023 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 crds
import (
_ "embed"
apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
"k8s.io/apimachinery/pkg/util/yaml"
"github.com/arangodb/go-driver"
)
const (
MLBatchJobVersion = driver.Version("1.0.0")
)
func init() {
if err := yaml.Unmarshal(mlBatchJob, &mlBatchJobCRD); err != nil {
panic(err)
}
}
func MLBatchJob() *apiextensions.CustomResourceDefinition {
return mlBatchJobCRD.DeepCopy()
}
func MLBatchJobDefinition() Definition {
return Definition{
Version: MLBatchJobVersion,
CRD: mlBatchJobCRD.DeepCopy(),
}
}
var mlBatchJobCRD apiextensions.CustomResourceDefinition
//go:embed ml-job-batch.yaml
var mlBatchJob []byte

View file

@ -0,0 +1,22 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: arangomlbatchjobs.ml.arangodb.com
spec:
group: ml.arangodb.com
names:
kind: ArangoMLBatchJob
listKind: ArangoMLBatchJobList
plural: arangomlbatchjobs
singular: arangomlbatchjob
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
type: object
x-kubernetes-preserve-unknown-fields: true
served: true
storage: true
subresources:
status: {}

View file

@ -0,0 +1,56 @@
//
// DISCLAIMER
//
// Copyright 2023 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 crds
import (
_ "embed"
apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
"k8s.io/apimachinery/pkg/util/yaml"
"github.com/arangodb/go-driver"
)
const (
MLCronJobVersion = driver.Version("1.0.0")
)
func init() {
if err := yaml.Unmarshal(mlCronJob, &mlCronJobCRD); err != nil {
panic(err)
}
}
func MLCronJob() *apiextensions.CustomResourceDefinition {
return mlCronJobCRD.DeepCopy()
}
func MLCronJobDefinition() Definition {
return Definition{
Version: MLCronJobVersion,
CRD: mlCronJobCRD.DeepCopy(),
}
}
var mlCronJobCRD apiextensions.CustomResourceDefinition
//go:embed ml-job-cron.yaml
var mlCronJob []byte

View file

@ -0,0 +1,22 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: arangomlcronjobs.ml.arangodb.com
spec:
group: ml.arangodb.com
names:
kind: ArangoMLCronJob
listKind: ArangoMLCronJobList
plural: arangomlcronjobs
singular: arangomlcronjob
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
type: object
x-kubernetes-preserve-unknown-fields: true
served: true
storage: true
subresources:
status: {}

View file

@ -0,0 +1,56 @@
//
// DISCLAIMER
//
// Copyright 2023 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 crds
import (
_ "embed"
apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
"k8s.io/apimachinery/pkg/util/yaml"
"github.com/arangodb/go-driver"
)
const (
MLStorageVersion = driver.Version("1.0.0")
)
func init() {
if err := yaml.Unmarshal(mlStorage, &mlStorageCRD); err != nil {
panic(err)
}
}
func MLStorage() *apiextensions.CustomResourceDefinition {
return mlStorageCRD.DeepCopy()
}
func MLStorageDefinition() Definition {
return Definition{
Version: MLStorageVersion,
CRD: mlStorageCRD.DeepCopy(),
}
}
var mlStorageCRD apiextensions.CustomResourceDefinition
//go:embed ml-storage.yaml
var mlStorage []byte

View file

@ -0,0 +1,22 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: arangomlstorages.ml.arangodb.com
spec:
group: ml.arangodb.com
names:
kind: ArangoMLStorage
listKind: ArangoMLStorageList
plural: arangomlstorages
singular: arangomlstorage
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
type: object
x-kubernetes-preserve-unknown-fields: true
served: true
storage: true
subresources:
status: {}

View file

@ -30,6 +30,7 @@ import (
backupv1 "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/typed/backup/v1"
databasev1 "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/typed/deployment/v1"
databasev2alpha1 "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/typed/deployment/v2alpha1"
mlv1alpha1 "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/typed/ml/v1alpha1"
replicationv1 "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/typed/replication/v1"
replicationv2alpha1 "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/typed/replication/v2alpha1"
storagev1alpha "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/typed/storage/v1alpha"
@ -44,6 +45,7 @@ type Interface interface {
BackupV1() backupv1.BackupV1Interface
DatabaseV1() databasev1.DatabaseV1Interface
DatabaseV2alpha1() databasev2alpha1.DatabaseV2alpha1Interface
MlV1alpha1() mlv1alpha1.MlV1alpha1Interface
ReplicationV1() replicationv1.ReplicationV1Interface
ReplicationV2alpha1() replicationv2alpha1.ReplicationV2alpha1Interface
StorageV1alpha() storagev1alpha.StorageV1alphaInterface
@ -57,6 +59,7 @@ type Clientset struct {
backupV1 *backupv1.BackupV1Client
databaseV1 *databasev1.DatabaseV1Client
databaseV2alpha1 *databasev2alpha1.DatabaseV2alpha1Client
mlV1alpha1 *mlv1alpha1.MlV1alpha1Client
replicationV1 *replicationv1.ReplicationV1Client
replicationV2alpha1 *replicationv2alpha1.ReplicationV2alpha1Client
storageV1alpha *storagev1alpha.StorageV1alphaClient
@ -82,6 +85,11 @@ func (c *Clientset) DatabaseV2alpha1() databasev2alpha1.DatabaseV2alpha1Interfac
return c.databaseV2alpha1
}
// MlV1alpha1 retrieves the MlV1alpha1Client
func (c *Clientset) MlV1alpha1() mlv1alpha1.MlV1alpha1Interface {
return c.mlV1alpha1
}
// ReplicationV1 retrieves the ReplicationV1Client
func (c *Clientset) ReplicationV1() replicationv1.ReplicationV1Interface {
return c.replicationV1
@ -157,6 +165,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset,
if err != nil {
return nil, err
}
cs.mlV1alpha1, err = mlv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient)
if err != nil {
return nil, err
}
cs.replicationV1, err = replicationv1.NewForConfigAndClient(&configShallowCopy, httpClient)
if err != nil {
return nil, err
@ -194,6 +206,7 @@ func New(c rest.Interface) *Clientset {
cs.backupV1 = backupv1.New(c)
cs.databaseV1 = databasev1.New(c)
cs.databaseV2alpha1 = databasev2alpha1.New(c)
cs.mlV1alpha1 = mlv1alpha1.New(c)
cs.replicationV1 = replicationv1.New(c)
cs.replicationV2alpha1 = replicationv2alpha1.New(c)
cs.storageV1alpha = storagev1alpha.New(c)

View file

@ -32,6 +32,8 @@ import (
fakedatabasev1 "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/typed/deployment/v1/fake"
databasev2alpha1 "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/typed/deployment/v2alpha1"
fakedatabasev2alpha1 "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/typed/deployment/v2alpha1/fake"
mlv1alpha1 "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/typed/ml/v1alpha1"
fakemlv1alpha1 "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/typed/ml/v1alpha1/fake"
replicationv1 "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/typed/replication/v1"
fakereplicationv1 "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/typed/replication/v1/fake"
replicationv2alpha1 "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/typed/replication/v2alpha1"
@ -115,6 +117,11 @@ func (c *Clientset) DatabaseV2alpha1() databasev2alpha1.DatabaseV2alpha1Interfac
return &fakedatabasev2alpha1.FakeDatabaseV2alpha1{Fake: &c.Fake}
}
// MlV1alpha1 retrieves the MlV1alpha1Client
func (c *Clientset) MlV1alpha1() mlv1alpha1.MlV1alpha1Interface {
return &fakemlv1alpha1.FakeMlV1alpha1{Fake: &c.Fake}
}
// ReplicationV1 retrieves the ReplicationV1Client
func (c *Clientset) ReplicationV1() replicationv1.ReplicationV1Interface {
return &fakereplicationv1.FakeReplicationV1{Fake: &c.Fake}

View file

@ -27,6 +27,7 @@ import (
backupv1 "github.com/arangodb/kube-arangodb/pkg/apis/backup/v1"
databasev1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
databasev2alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v2alpha1"
mlv1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
replicationv1 "github.com/arangodb/kube-arangodb/pkg/apis/replication/v1"
replicationv2alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/replication/v2alpha1"
storagev1alpha "github.com/arangodb/kube-arangodb/pkg/apis/storage/v1alpha"
@ -45,6 +46,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
backupv1.AddToScheme,
databasev1.AddToScheme,
databasev2alpha1.AddToScheme,
mlv1alpha1.AddToScheme,
replicationv1.AddToScheme,
replicationv2alpha1.AddToScheme,
storagev1alpha.AddToScheme,

View file

@ -27,6 +27,7 @@ import (
backupv1 "github.com/arangodb/kube-arangodb/pkg/apis/backup/v1"
databasev1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
databasev2alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v2alpha1"
mlv1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
replicationv1 "github.com/arangodb/kube-arangodb/pkg/apis/replication/v1"
replicationv2alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/replication/v2alpha1"
storagev1alpha "github.com/arangodb/kube-arangodb/pkg/apis/storage/v1alpha"
@ -45,6 +46,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
backupv1.AddToScheme,
databasev1.AddToScheme,
databasev2alpha1.AddToScheme,
mlv1alpha1.AddToScheme,
replicationv1.AddToScheme,
replicationv2alpha1.AddToScheme,
storagev1alpha.AddToScheme,

View file

@ -0,0 +1,199 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
import (
"context"
"time"
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
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"
)
// ArangoMLBatchJobsGetter has a method to return a ArangoMLBatchJobInterface.
// A group's client should implement this interface.
type ArangoMLBatchJobsGetter interface {
ArangoMLBatchJobs(namespace string) ArangoMLBatchJobInterface
}
// ArangoMLBatchJobInterface has methods to work with ArangoMLBatchJob resources.
type ArangoMLBatchJobInterface interface {
Create(ctx context.Context, arangoMLBatchJob *v1alpha1.ArangoMLBatchJob, opts v1.CreateOptions) (*v1alpha1.ArangoMLBatchJob, error)
Update(ctx context.Context, arangoMLBatchJob *v1alpha1.ArangoMLBatchJob, opts v1.UpdateOptions) (*v1alpha1.ArangoMLBatchJob, error)
UpdateStatus(ctx context.Context, arangoMLBatchJob *v1alpha1.ArangoMLBatchJob, opts v1.UpdateOptions) (*v1alpha1.ArangoMLBatchJob, 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) (*v1alpha1.ArangoMLBatchJob, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ArangoMLBatchJobList, 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 *v1alpha1.ArangoMLBatchJob, err error)
ArangoMLBatchJobExpansion
}
// arangoMLBatchJobs implements ArangoMLBatchJobInterface
type arangoMLBatchJobs struct {
client rest.Interface
ns string
}
// newArangoMLBatchJobs returns a ArangoMLBatchJobs
func newArangoMLBatchJobs(c *MlV1alpha1Client, namespace string) *arangoMLBatchJobs {
return &arangoMLBatchJobs{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the arangoMLBatchJob, and returns the corresponding arangoMLBatchJob object, and an error if there is any.
func (c *arangoMLBatchJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ArangoMLBatchJob, err error) {
result = &v1alpha1.ArangoMLBatchJob{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomlbatchjobs").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoMLBatchJobs that match those selectors.
func (c *arangoMLBatchJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ArangoMLBatchJobList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.ArangoMLBatchJobList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomlbatchjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoMLBatchJobs.
func (c *arangoMLBatchJobs) 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("arangomlbatchjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoMLBatchJob and creates it. Returns the server's representation of the arangoMLBatchJob, and an error, if there is any.
func (c *arangoMLBatchJobs) Create(ctx context.Context, arangoMLBatchJob *v1alpha1.ArangoMLBatchJob, opts v1.CreateOptions) (result *v1alpha1.ArangoMLBatchJob, err error) {
result = &v1alpha1.ArangoMLBatchJob{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangomlbatchjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLBatchJob).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoMLBatchJob and updates it. Returns the server's representation of the arangoMLBatchJob, and an error, if there is any.
func (c *arangoMLBatchJobs) Update(ctx context.Context, arangoMLBatchJob *v1alpha1.ArangoMLBatchJob, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLBatchJob, err error) {
result = &v1alpha1.ArangoMLBatchJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomlbatchjobs").
Name(arangoMLBatchJob.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLBatchJob).
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 *arangoMLBatchJobs) UpdateStatus(ctx context.Context, arangoMLBatchJob *v1alpha1.ArangoMLBatchJob, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLBatchJob, err error) {
result = &v1alpha1.ArangoMLBatchJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomlbatchjobs").
Name(arangoMLBatchJob.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLBatchJob).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoMLBatchJob and deletes it. Returns an error if one occurs.
func (c *arangoMLBatchJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangomlbatchjobs").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoMLBatchJobs) 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("arangomlbatchjobs").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoMLBatchJob.
func (c *arangoMLBatchJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ArangoMLBatchJob, err error) {
result = &v1alpha1.ArangoMLBatchJob{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangomlbatchjobs").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -0,0 +1,199 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
import (
"context"
"time"
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
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"
)
// ArangoMLCronJobsGetter has a method to return a ArangoMLCronJobInterface.
// A group's client should implement this interface.
type ArangoMLCronJobsGetter interface {
ArangoMLCronJobs(namespace string) ArangoMLCronJobInterface
}
// ArangoMLCronJobInterface has methods to work with ArangoMLCronJob resources.
type ArangoMLCronJobInterface interface {
Create(ctx context.Context, arangoMLCronJob *v1alpha1.ArangoMLCronJob, opts v1.CreateOptions) (*v1alpha1.ArangoMLCronJob, error)
Update(ctx context.Context, arangoMLCronJob *v1alpha1.ArangoMLCronJob, opts v1.UpdateOptions) (*v1alpha1.ArangoMLCronJob, error)
UpdateStatus(ctx context.Context, arangoMLCronJob *v1alpha1.ArangoMLCronJob, opts v1.UpdateOptions) (*v1alpha1.ArangoMLCronJob, 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) (*v1alpha1.ArangoMLCronJob, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ArangoMLCronJobList, 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 *v1alpha1.ArangoMLCronJob, err error)
ArangoMLCronJobExpansion
}
// arangoMLCronJobs implements ArangoMLCronJobInterface
type arangoMLCronJobs struct {
client rest.Interface
ns string
}
// newArangoMLCronJobs returns a ArangoMLCronJobs
func newArangoMLCronJobs(c *MlV1alpha1Client, namespace string) *arangoMLCronJobs {
return &arangoMLCronJobs{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the arangoMLCronJob, and returns the corresponding arangoMLCronJob object, and an error if there is any.
func (c *arangoMLCronJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ArangoMLCronJob, err error) {
result = &v1alpha1.ArangoMLCronJob{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomlcronjobs").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoMLCronJobs that match those selectors.
func (c *arangoMLCronJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ArangoMLCronJobList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.ArangoMLCronJobList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomlcronjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoMLCronJobs.
func (c *arangoMLCronJobs) 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("arangomlcronjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoMLCronJob and creates it. Returns the server's representation of the arangoMLCronJob, and an error, if there is any.
func (c *arangoMLCronJobs) Create(ctx context.Context, arangoMLCronJob *v1alpha1.ArangoMLCronJob, opts v1.CreateOptions) (result *v1alpha1.ArangoMLCronJob, err error) {
result = &v1alpha1.ArangoMLCronJob{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangomlcronjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLCronJob).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoMLCronJob and updates it. Returns the server's representation of the arangoMLCronJob, and an error, if there is any.
func (c *arangoMLCronJobs) Update(ctx context.Context, arangoMLCronJob *v1alpha1.ArangoMLCronJob, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLCronJob, err error) {
result = &v1alpha1.ArangoMLCronJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomlcronjobs").
Name(arangoMLCronJob.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLCronJob).
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 *arangoMLCronJobs) UpdateStatus(ctx context.Context, arangoMLCronJob *v1alpha1.ArangoMLCronJob, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLCronJob, err error) {
result = &v1alpha1.ArangoMLCronJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomlcronjobs").
Name(arangoMLCronJob.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLCronJob).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoMLCronJob and deletes it. Returns an error if one occurs.
func (c *arangoMLCronJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangomlcronjobs").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoMLCronJobs) 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("arangomlcronjobs").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoMLCronJob.
func (c *arangoMLCronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ArangoMLCronJob, err error) {
result = &v1alpha1.ArangoMLCronJob{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangomlcronjobs").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -0,0 +1,199 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
import (
"context"
"time"
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
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"
)
// ArangoMLExtensionsGetter has a method to return a ArangoMLExtensionInterface.
// A group's client should implement this interface.
type ArangoMLExtensionsGetter interface {
ArangoMLExtensions(namespace string) ArangoMLExtensionInterface
}
// ArangoMLExtensionInterface has methods to work with ArangoMLExtension resources.
type ArangoMLExtensionInterface interface {
Create(ctx context.Context, arangoMLExtension *v1alpha1.ArangoMLExtension, opts v1.CreateOptions) (*v1alpha1.ArangoMLExtension, error)
Update(ctx context.Context, arangoMLExtension *v1alpha1.ArangoMLExtension, opts v1.UpdateOptions) (*v1alpha1.ArangoMLExtension, error)
UpdateStatus(ctx context.Context, arangoMLExtension *v1alpha1.ArangoMLExtension, opts v1.UpdateOptions) (*v1alpha1.ArangoMLExtension, 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) (*v1alpha1.ArangoMLExtension, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ArangoMLExtensionList, 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 *v1alpha1.ArangoMLExtension, err error)
ArangoMLExtensionExpansion
}
// arangoMLExtensions implements ArangoMLExtensionInterface
type arangoMLExtensions struct {
client rest.Interface
ns string
}
// newArangoMLExtensions returns a ArangoMLExtensions
func newArangoMLExtensions(c *MlV1alpha1Client, namespace string) *arangoMLExtensions {
return &arangoMLExtensions{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the arangoMLExtension, and returns the corresponding arangoMLExtension object, and an error if there is any.
func (c *arangoMLExtensions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ArangoMLExtension, err error) {
result = &v1alpha1.ArangoMLExtension{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomlextensions").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoMLExtensions that match those selectors.
func (c *arangoMLExtensions) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ArangoMLExtensionList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.ArangoMLExtensionList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomlextensions").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoMLExtensions.
func (c *arangoMLExtensions) 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("arangomlextensions").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoMLExtension and creates it. Returns the server's representation of the arangoMLExtension, and an error, if there is any.
func (c *arangoMLExtensions) Create(ctx context.Context, arangoMLExtension *v1alpha1.ArangoMLExtension, opts v1.CreateOptions) (result *v1alpha1.ArangoMLExtension, err error) {
result = &v1alpha1.ArangoMLExtension{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangomlextensions").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLExtension).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoMLExtension and updates it. Returns the server's representation of the arangoMLExtension, and an error, if there is any.
func (c *arangoMLExtensions) Update(ctx context.Context, arangoMLExtension *v1alpha1.ArangoMLExtension, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLExtension, err error) {
result = &v1alpha1.ArangoMLExtension{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomlextensions").
Name(arangoMLExtension.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLExtension).
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 *arangoMLExtensions) UpdateStatus(ctx context.Context, arangoMLExtension *v1alpha1.ArangoMLExtension, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLExtension, err error) {
result = &v1alpha1.ArangoMLExtension{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomlextensions").
Name(arangoMLExtension.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLExtension).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoMLExtension and deletes it. Returns an error if one occurs.
func (c *arangoMLExtensions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangomlextensions").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoMLExtensions) 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("arangomlextensions").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoMLExtension.
func (c *arangoMLExtensions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ArangoMLExtension, err error) {
result = &v1alpha1.ArangoMLExtension{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangomlextensions").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -0,0 +1,199 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
import (
"context"
"time"
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
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"
)
// ArangoMLStoragesGetter has a method to return a ArangoMLStorageInterface.
// A group's client should implement this interface.
type ArangoMLStoragesGetter interface {
ArangoMLStorages(namespace string) ArangoMLStorageInterface
}
// ArangoMLStorageInterface has methods to work with ArangoMLStorage resources.
type ArangoMLStorageInterface interface {
Create(ctx context.Context, arangoMLStorage *v1alpha1.ArangoMLStorage, opts v1.CreateOptions) (*v1alpha1.ArangoMLStorage, error)
Update(ctx context.Context, arangoMLStorage *v1alpha1.ArangoMLStorage, opts v1.UpdateOptions) (*v1alpha1.ArangoMLStorage, error)
UpdateStatus(ctx context.Context, arangoMLStorage *v1alpha1.ArangoMLStorage, opts v1.UpdateOptions) (*v1alpha1.ArangoMLStorage, 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) (*v1alpha1.ArangoMLStorage, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ArangoMLStorageList, 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 *v1alpha1.ArangoMLStorage, err error)
ArangoMLStorageExpansion
}
// arangoMLStorages implements ArangoMLStorageInterface
type arangoMLStorages struct {
client rest.Interface
ns string
}
// newArangoMLStorages returns a ArangoMLStorages
func newArangoMLStorages(c *MlV1alpha1Client, namespace string) *arangoMLStorages {
return &arangoMLStorages{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the arangoMLStorage, and returns the corresponding arangoMLStorage object, and an error if there is any.
func (c *arangoMLStorages) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ArangoMLStorage, err error) {
result = &v1alpha1.ArangoMLStorage{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomlstorages").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoMLStorages that match those selectors.
func (c *arangoMLStorages) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ArangoMLStorageList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.ArangoMLStorageList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomlstorages").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoMLStorages.
func (c *arangoMLStorages) 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("arangomlstorages").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoMLStorage and creates it. Returns the server's representation of the arangoMLStorage, and an error, if there is any.
func (c *arangoMLStorages) Create(ctx context.Context, arangoMLStorage *v1alpha1.ArangoMLStorage, opts v1.CreateOptions) (result *v1alpha1.ArangoMLStorage, err error) {
result = &v1alpha1.ArangoMLStorage{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangomlstorages").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLStorage).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoMLStorage and updates it. Returns the server's representation of the arangoMLStorage, and an error, if there is any.
func (c *arangoMLStorages) Update(ctx context.Context, arangoMLStorage *v1alpha1.ArangoMLStorage, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLStorage, err error) {
result = &v1alpha1.ArangoMLStorage{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomlstorages").
Name(arangoMLStorage.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLStorage).
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 *arangoMLStorages) UpdateStatus(ctx context.Context, arangoMLStorage *v1alpha1.ArangoMLStorage, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLStorage, err error) {
result = &v1alpha1.ArangoMLStorage{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomlstorages").
Name(arangoMLStorage.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLStorage).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoMLStorage and deletes it. Returns an error if one occurs.
func (c *arangoMLStorages) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangomlstorages").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoMLStorages) 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("arangomlstorages").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoMLStorage.
func (c *arangoMLStorages) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ArangoMLStorage, err error) {
result = &v1alpha1.ArangoMLStorage{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangomlstorages").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -0,0 +1,24 @@
//
// DISCLAIMER
//
// Copyright 2023 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.
// This package has the automatically generated typed clients.
package v1alpha1

View file

@ -0,0 +1,24 @@
//
// DISCLAIMER
//
// Copyright 2023 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 has the automatically generated clients.
package fake

View file

@ -0,0 +1,146 @@
//
// DISCLAIMER
//
// Copyright 2023 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"
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
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"
)
// FakeArangoMLBatchJobs implements ArangoMLBatchJobInterface
type FakeArangoMLBatchJobs struct {
Fake *FakeMlV1alpha1
ns string
}
var arangomlbatchjobsResource = schema.GroupVersionResource{Group: "ml.arangodb.com", Version: "v1alpha1", Resource: "arangomlbatchjobs"}
var arangomlbatchjobsKind = schema.GroupVersionKind{Group: "ml.arangodb.com", Version: "v1alpha1", Kind: "ArangoMLBatchJob"}
// Get takes name of the arangoMLBatchJob, and returns the corresponding arangoMLBatchJob object, and an error if there is any.
func (c *FakeArangoMLBatchJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ArangoMLBatchJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangomlbatchjobsResource, c.ns, name), &v1alpha1.ArangoMLBatchJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ArangoMLBatchJob), err
}
// List takes label and field selectors, and returns the list of ArangoMLBatchJobs that match those selectors.
func (c *FakeArangoMLBatchJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ArangoMLBatchJobList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(arangomlbatchjobsResource, arangomlbatchjobsKind, c.ns, opts), &v1alpha1.ArangoMLBatchJobList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.ArangoMLBatchJobList{ListMeta: obj.(*v1alpha1.ArangoMLBatchJobList).ListMeta}
for _, item := range obj.(*v1alpha1.ArangoMLBatchJobList).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 arangoMLBatchJobs.
func (c *FakeArangoMLBatchJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangomlbatchjobsResource, c.ns, opts))
}
// Create takes the representation of a arangoMLBatchJob and creates it. Returns the server's representation of the arangoMLBatchJob, and an error, if there is any.
func (c *FakeArangoMLBatchJobs) Create(ctx context.Context, arangoMLBatchJob *v1alpha1.ArangoMLBatchJob, opts v1.CreateOptions) (result *v1alpha1.ArangoMLBatchJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangomlbatchjobsResource, c.ns, arangoMLBatchJob), &v1alpha1.ArangoMLBatchJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ArangoMLBatchJob), err
}
// Update takes the representation of a arangoMLBatchJob and updates it. Returns the server's representation of the arangoMLBatchJob, and an error, if there is any.
func (c *FakeArangoMLBatchJobs) Update(ctx context.Context, arangoMLBatchJob *v1alpha1.ArangoMLBatchJob, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLBatchJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangomlbatchjobsResource, c.ns, arangoMLBatchJob), &v1alpha1.ArangoMLBatchJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ArangoMLBatchJob), 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 *FakeArangoMLBatchJobs) UpdateStatus(ctx context.Context, arangoMLBatchJob *v1alpha1.ArangoMLBatchJob, opts v1.UpdateOptions) (*v1alpha1.ArangoMLBatchJob, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangomlbatchjobsResource, "status", c.ns, arangoMLBatchJob), &v1alpha1.ArangoMLBatchJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ArangoMLBatchJob), err
}
// Delete takes name of the arangoMLBatchJob and deletes it. Returns an error if one occurs.
func (c *FakeArangoMLBatchJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(arangomlbatchjobsResource, c.ns, name, opts), &v1alpha1.ArangoMLBatchJob{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoMLBatchJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangomlbatchjobsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.ArangoMLBatchJobList{})
return err
}
// Patch applies the patch and returns the patched arangoMLBatchJob.
func (c *FakeArangoMLBatchJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ArangoMLBatchJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangomlbatchjobsResource, c.ns, name, pt, data, subresources...), &v1alpha1.ArangoMLBatchJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ArangoMLBatchJob), err
}

View file

@ -0,0 +1,146 @@
//
// DISCLAIMER
//
// Copyright 2023 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"
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
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"
)
// FakeArangoMLCronJobs implements ArangoMLCronJobInterface
type FakeArangoMLCronJobs struct {
Fake *FakeMlV1alpha1
ns string
}
var arangomlcronjobsResource = schema.GroupVersionResource{Group: "ml.arangodb.com", Version: "v1alpha1", Resource: "arangomlcronjobs"}
var arangomlcronjobsKind = schema.GroupVersionKind{Group: "ml.arangodb.com", Version: "v1alpha1", Kind: "ArangoMLCronJob"}
// Get takes name of the arangoMLCronJob, and returns the corresponding arangoMLCronJob object, and an error if there is any.
func (c *FakeArangoMLCronJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ArangoMLCronJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangomlcronjobsResource, c.ns, name), &v1alpha1.ArangoMLCronJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ArangoMLCronJob), err
}
// List takes label and field selectors, and returns the list of ArangoMLCronJobs that match those selectors.
func (c *FakeArangoMLCronJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ArangoMLCronJobList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(arangomlcronjobsResource, arangomlcronjobsKind, c.ns, opts), &v1alpha1.ArangoMLCronJobList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.ArangoMLCronJobList{ListMeta: obj.(*v1alpha1.ArangoMLCronJobList).ListMeta}
for _, item := range obj.(*v1alpha1.ArangoMLCronJobList).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 arangoMLCronJobs.
func (c *FakeArangoMLCronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangomlcronjobsResource, c.ns, opts))
}
// Create takes the representation of a arangoMLCronJob and creates it. Returns the server's representation of the arangoMLCronJob, and an error, if there is any.
func (c *FakeArangoMLCronJobs) Create(ctx context.Context, arangoMLCronJob *v1alpha1.ArangoMLCronJob, opts v1.CreateOptions) (result *v1alpha1.ArangoMLCronJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangomlcronjobsResource, c.ns, arangoMLCronJob), &v1alpha1.ArangoMLCronJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ArangoMLCronJob), err
}
// Update takes the representation of a arangoMLCronJob and updates it. Returns the server's representation of the arangoMLCronJob, and an error, if there is any.
func (c *FakeArangoMLCronJobs) Update(ctx context.Context, arangoMLCronJob *v1alpha1.ArangoMLCronJob, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLCronJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangomlcronjobsResource, c.ns, arangoMLCronJob), &v1alpha1.ArangoMLCronJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ArangoMLCronJob), 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 *FakeArangoMLCronJobs) UpdateStatus(ctx context.Context, arangoMLCronJob *v1alpha1.ArangoMLCronJob, opts v1.UpdateOptions) (*v1alpha1.ArangoMLCronJob, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangomlcronjobsResource, "status", c.ns, arangoMLCronJob), &v1alpha1.ArangoMLCronJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ArangoMLCronJob), err
}
// Delete takes name of the arangoMLCronJob and deletes it. Returns an error if one occurs.
func (c *FakeArangoMLCronJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(arangomlcronjobsResource, c.ns, name, opts), &v1alpha1.ArangoMLCronJob{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoMLCronJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangomlcronjobsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.ArangoMLCronJobList{})
return err
}
// Patch applies the patch and returns the patched arangoMLCronJob.
func (c *FakeArangoMLCronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ArangoMLCronJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangomlcronjobsResource, c.ns, name, pt, data, subresources...), &v1alpha1.ArangoMLCronJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ArangoMLCronJob), err
}

View file

@ -0,0 +1,146 @@
//
// DISCLAIMER
//
// Copyright 2023 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"
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
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"
)
// FakeArangoMLExtensions implements ArangoMLExtensionInterface
type FakeArangoMLExtensions struct {
Fake *FakeMlV1alpha1
ns string
}
var arangomlextensionsResource = schema.GroupVersionResource{Group: "ml.arangodb.com", Version: "v1alpha1", Resource: "arangomlextensions"}
var arangomlextensionsKind = schema.GroupVersionKind{Group: "ml.arangodb.com", Version: "v1alpha1", Kind: "ArangoMLExtension"}
// Get takes name of the arangoMLExtension, and returns the corresponding arangoMLExtension object, and an error if there is any.
func (c *FakeArangoMLExtensions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ArangoMLExtension, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangomlextensionsResource, c.ns, name), &v1alpha1.ArangoMLExtension{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ArangoMLExtension), err
}
// List takes label and field selectors, and returns the list of ArangoMLExtensions that match those selectors.
func (c *FakeArangoMLExtensions) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ArangoMLExtensionList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(arangomlextensionsResource, arangomlextensionsKind, c.ns, opts), &v1alpha1.ArangoMLExtensionList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.ArangoMLExtensionList{ListMeta: obj.(*v1alpha1.ArangoMLExtensionList).ListMeta}
for _, item := range obj.(*v1alpha1.ArangoMLExtensionList).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 arangoMLExtensions.
func (c *FakeArangoMLExtensions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangomlextensionsResource, c.ns, opts))
}
// Create takes the representation of a arangoMLExtension and creates it. Returns the server's representation of the arangoMLExtension, and an error, if there is any.
func (c *FakeArangoMLExtensions) Create(ctx context.Context, arangoMLExtension *v1alpha1.ArangoMLExtension, opts v1.CreateOptions) (result *v1alpha1.ArangoMLExtension, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangomlextensionsResource, c.ns, arangoMLExtension), &v1alpha1.ArangoMLExtension{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ArangoMLExtension), err
}
// Update takes the representation of a arangoMLExtension and updates it. Returns the server's representation of the arangoMLExtension, and an error, if there is any.
func (c *FakeArangoMLExtensions) Update(ctx context.Context, arangoMLExtension *v1alpha1.ArangoMLExtension, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLExtension, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangomlextensionsResource, c.ns, arangoMLExtension), &v1alpha1.ArangoMLExtension{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ArangoMLExtension), 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 *FakeArangoMLExtensions) UpdateStatus(ctx context.Context, arangoMLExtension *v1alpha1.ArangoMLExtension, opts v1.UpdateOptions) (*v1alpha1.ArangoMLExtension, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangomlextensionsResource, "status", c.ns, arangoMLExtension), &v1alpha1.ArangoMLExtension{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ArangoMLExtension), err
}
// Delete takes name of the arangoMLExtension and deletes it. Returns an error if one occurs.
func (c *FakeArangoMLExtensions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(arangomlextensionsResource, c.ns, name, opts), &v1alpha1.ArangoMLExtension{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoMLExtensions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangomlextensionsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.ArangoMLExtensionList{})
return err
}
// Patch applies the patch and returns the patched arangoMLExtension.
func (c *FakeArangoMLExtensions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ArangoMLExtension, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangomlextensionsResource, c.ns, name, pt, data, subresources...), &v1alpha1.ArangoMLExtension{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ArangoMLExtension), err
}

View file

@ -0,0 +1,146 @@
//
// DISCLAIMER
//
// Copyright 2023 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"
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
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"
)
// FakeArangoMLStorages implements ArangoMLStorageInterface
type FakeArangoMLStorages struct {
Fake *FakeMlV1alpha1
ns string
}
var arangomlstoragesResource = schema.GroupVersionResource{Group: "ml.arangodb.com", Version: "v1alpha1", Resource: "arangomlstorages"}
var arangomlstoragesKind = schema.GroupVersionKind{Group: "ml.arangodb.com", Version: "v1alpha1", Kind: "ArangoMLStorage"}
// Get takes name of the arangoMLStorage, and returns the corresponding arangoMLStorage object, and an error if there is any.
func (c *FakeArangoMLStorages) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ArangoMLStorage, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangomlstoragesResource, c.ns, name), &v1alpha1.ArangoMLStorage{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ArangoMLStorage), err
}
// List takes label and field selectors, and returns the list of ArangoMLStorages that match those selectors.
func (c *FakeArangoMLStorages) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ArangoMLStorageList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(arangomlstoragesResource, arangomlstoragesKind, c.ns, opts), &v1alpha1.ArangoMLStorageList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.ArangoMLStorageList{ListMeta: obj.(*v1alpha1.ArangoMLStorageList).ListMeta}
for _, item := range obj.(*v1alpha1.ArangoMLStorageList).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 arangoMLStorages.
func (c *FakeArangoMLStorages) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangomlstoragesResource, c.ns, opts))
}
// Create takes the representation of a arangoMLStorage and creates it. Returns the server's representation of the arangoMLStorage, and an error, if there is any.
func (c *FakeArangoMLStorages) Create(ctx context.Context, arangoMLStorage *v1alpha1.ArangoMLStorage, opts v1.CreateOptions) (result *v1alpha1.ArangoMLStorage, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangomlstoragesResource, c.ns, arangoMLStorage), &v1alpha1.ArangoMLStorage{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ArangoMLStorage), err
}
// Update takes the representation of a arangoMLStorage and updates it. Returns the server's representation of the arangoMLStorage, and an error, if there is any.
func (c *FakeArangoMLStorages) Update(ctx context.Context, arangoMLStorage *v1alpha1.ArangoMLStorage, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLStorage, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangomlstoragesResource, c.ns, arangoMLStorage), &v1alpha1.ArangoMLStorage{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ArangoMLStorage), 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 *FakeArangoMLStorages) UpdateStatus(ctx context.Context, arangoMLStorage *v1alpha1.ArangoMLStorage, opts v1.UpdateOptions) (*v1alpha1.ArangoMLStorage, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangomlstoragesResource, "status", c.ns, arangoMLStorage), &v1alpha1.ArangoMLStorage{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ArangoMLStorage), err
}
// Delete takes name of the arangoMLStorage and deletes it. Returns an error if one occurs.
func (c *FakeArangoMLStorages) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(arangomlstoragesResource, c.ns, name, opts), &v1alpha1.ArangoMLStorage{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoMLStorages) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangomlstoragesResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.ArangoMLStorageList{})
return err
}
// Patch applies the patch and returns the patched arangoMLStorage.
func (c *FakeArangoMLStorages) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ArangoMLStorage, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangomlstoragesResource, c.ns, name, pt, data, subresources...), &v1alpha1.ArangoMLStorage{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ArangoMLStorage), err
}

View file

@ -0,0 +1,56 @@
//
// DISCLAIMER
//
// Copyright 2023 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 (
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/typed/ml/v1alpha1"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
type FakeMlV1alpha1 struct {
*testing.Fake
}
func (c *FakeMlV1alpha1) ArangoMLBatchJobs(namespace string) v1alpha1.ArangoMLBatchJobInterface {
return &FakeArangoMLBatchJobs{c, namespace}
}
func (c *FakeMlV1alpha1) ArangoMLCronJobs(namespace string) v1alpha1.ArangoMLCronJobInterface {
return &FakeArangoMLCronJobs{c, namespace}
}
func (c *FakeMlV1alpha1) ArangoMLExtensions(namespace string) v1alpha1.ArangoMLExtensionInterface {
return &FakeArangoMLExtensions{c, namespace}
}
func (c *FakeMlV1alpha1) ArangoMLStorages(namespace string) v1alpha1.ArangoMLStorageInterface {
return &FakeArangoMLStorages{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeMlV1alpha1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}

View file

@ -0,0 +1,31 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
type ArangoMLBatchJobExpansion interface{}
type ArangoMLCronJobExpansion interface{}
type ArangoMLExtensionExpansion interface{}
type ArangoMLStorageExpansion interface{}

View file

@ -0,0 +1,126 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
import (
"net/http"
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
"github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
rest "k8s.io/client-go/rest"
)
type MlV1alpha1Interface interface {
RESTClient() rest.Interface
ArangoMLBatchJobsGetter
ArangoMLCronJobsGetter
ArangoMLExtensionsGetter
ArangoMLStoragesGetter
}
// MlV1alpha1Client is used to interact with features provided by the ml.arangodb.com group.
type MlV1alpha1Client struct {
restClient rest.Interface
}
func (c *MlV1alpha1Client) ArangoMLBatchJobs(namespace string) ArangoMLBatchJobInterface {
return newArangoMLBatchJobs(c, namespace)
}
func (c *MlV1alpha1Client) ArangoMLCronJobs(namespace string) ArangoMLCronJobInterface {
return newArangoMLCronJobs(c, namespace)
}
func (c *MlV1alpha1Client) ArangoMLExtensions(namespace string) ArangoMLExtensionInterface {
return newArangoMLExtensions(c, namespace)
}
func (c *MlV1alpha1Client) ArangoMLStorages(namespace string) ArangoMLStorageInterface {
return newArangoMLStorages(c, namespace)
}
// NewForConfig creates a new MlV1alpha1Client for the given config.
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
// where httpClient was generated with rest.HTTPClientFor(c).
func NewForConfig(c *rest.Config) (*MlV1alpha1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
httpClient, err := rest.HTTPClientFor(&config)
if err != nil {
return nil, err
}
return NewForConfigAndClient(&config, httpClient)
}
// NewForConfigAndClient creates a new MlV1alpha1Client for the given config and http client.
// Note the http client provided takes precedence over the configured transport values.
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*MlV1alpha1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientForConfigAndClient(&config, h)
if err != nil {
return nil, err
}
return &MlV1alpha1Client{client}, nil
}
// NewForConfigOrDie creates a new MlV1alpha1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *MlV1alpha1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new MlV1alpha1Client for the given RESTClient.
func New(c rest.Interface) *MlV1alpha1Client {
return &MlV1alpha1Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v1alpha1.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *MlV1alpha1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}

View file

@ -32,6 +32,7 @@ import (
backup "github.com/arangodb/kube-arangodb/pkg/generated/informers/externalversions/backup"
deployment "github.com/arangodb/kube-arangodb/pkg/generated/informers/externalversions/deployment"
internalinterfaces "github.com/arangodb/kube-arangodb/pkg/generated/informers/externalversions/internalinterfaces"
ml "github.com/arangodb/kube-arangodb/pkg/generated/informers/externalversions/ml"
replication "github.com/arangodb/kube-arangodb/pkg/generated/informers/externalversions/replication"
storage "github.com/arangodb/kube-arangodb/pkg/generated/informers/externalversions/storage"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@ -183,6 +184,7 @@ type SharedInformerFactory interface {
Apps() apps.Interface
Backup() backup.Interface
Database() deployment.Interface
Ml() ml.Interface
Replication() replication.Interface
Storage() storage.Interface
}
@ -199,6 +201,10 @@ func (f *sharedInformerFactory) Database() deployment.Interface {
return deployment.New(f, f.namespace, f.tweakListOptions)
}
func (f *sharedInformerFactory) Ml() ml.Interface {
return ml.New(f, f.namespace, f.tweakListOptions)
}
func (f *sharedInformerFactory) Replication() replication.Interface {
return replication.New(f, f.namespace, f.tweakListOptions)
}

View file

@ -29,6 +29,7 @@ import (
backupv1 "github.com/arangodb/kube-arangodb/pkg/apis/backup/v1"
deploymentv1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
v2alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v2alpha1"
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
replicationv1 "github.com/arangodb/kube-arangodb/pkg/apis/replication/v1"
replicationv2alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/replication/v2alpha1"
v1alpha "github.com/arangodb/kube-arangodb/pkg/apis/storage/v1alpha"
@ -92,6 +93,16 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
case v2alpha1.SchemeGroupVersion.WithResource("arangotasks"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Database().V2alpha1().ArangoTasks().Informer()}, nil
// Group=ml.arangodb.com, Version=v1alpha1
case v1alpha1.SchemeGroupVersion.WithResource("arangomlbatchjobs"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Ml().V1alpha1().ArangoMLBatchJobs().Informer()}, nil
case v1alpha1.SchemeGroupVersion.WithResource("arangomlcronjobs"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Ml().V1alpha1().ArangoMLCronJobs().Informer()}, nil
case v1alpha1.SchemeGroupVersion.WithResource("arangomlextensions"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Ml().V1alpha1().ArangoMLExtensions().Informer()}, nil
case v1alpha1.SchemeGroupVersion.WithResource("arangomlstorages"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Ml().V1alpha1().ArangoMLStorages().Informer()}, nil
// Group=replication.database.arangodb.com, Version=v1
case replicationv1.SchemeGroupVersion.WithResource("arangodeploymentreplications"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Replication().V1().ArangoDeploymentReplications().Informer()}, nil

View file

@ -0,0 +1,50 @@
//
// DISCLAIMER
//
// Copyright 2023 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 ml
import (
internalinterfaces "github.com/arangodb/kube-arangodb/pkg/generated/informers/externalversions/internalinterfaces"
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/generated/informers/externalversions/ml/v1alpha1"
)
// Interface provides access to each of this group's versions.
type Interface interface {
// V1alpha1 provides access to shared informers for resources in V1alpha1.
V1alpha1() v1alpha1.Interface
}
type group struct {
factory internalinterfaces.SharedInformerFactory
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// V1alpha1 returns a new v1alpha1.Interface.
func (g *group) V1alpha1() v1alpha1.Interface {
return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)
}

View file

@ -0,0 +1,94 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
import (
"context"
time "time"
mlv1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
versioned "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned"
internalinterfaces "github.com/arangodb/kube-arangodb/pkg/generated/informers/externalversions/internalinterfaces"
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/generated/listers/ml/v1alpha1"
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"
)
// ArangoMLBatchJobInformer provides access to a shared informer and lister for
// ArangoMLBatchJobs.
type ArangoMLBatchJobInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha1.ArangoMLBatchJobLister
}
type arangoMLBatchJobInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewArangoMLBatchJobInformer constructs a new informer for ArangoMLBatchJob 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 NewArangoMLBatchJobInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredArangoMLBatchJobInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredArangoMLBatchJobInformer constructs a new informer for ArangoMLBatchJob 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 NewFilteredArangoMLBatchJobInformer(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.MlV1alpha1().ArangoMLBatchJobs(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.MlV1alpha1().ArangoMLBatchJobs(namespace).Watch(context.TODO(), options)
},
},
&mlv1alpha1.ArangoMLBatchJob{},
resyncPeriod,
indexers,
)
}
func (f *arangoMLBatchJobInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredArangoMLBatchJobInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *arangoMLBatchJobInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&mlv1alpha1.ArangoMLBatchJob{}, f.defaultInformer)
}
func (f *arangoMLBatchJobInformer) Lister() v1alpha1.ArangoMLBatchJobLister {
return v1alpha1.NewArangoMLBatchJobLister(f.Informer().GetIndexer())
}

View file

@ -0,0 +1,94 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
import (
"context"
time "time"
mlv1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
versioned "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned"
internalinterfaces "github.com/arangodb/kube-arangodb/pkg/generated/informers/externalversions/internalinterfaces"
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/generated/listers/ml/v1alpha1"
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"
)
// ArangoMLCronJobInformer provides access to a shared informer and lister for
// ArangoMLCronJobs.
type ArangoMLCronJobInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha1.ArangoMLCronJobLister
}
type arangoMLCronJobInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewArangoMLCronJobInformer constructs a new informer for ArangoMLCronJob 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 NewArangoMLCronJobInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredArangoMLCronJobInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredArangoMLCronJobInformer constructs a new informer for ArangoMLCronJob 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 NewFilteredArangoMLCronJobInformer(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.MlV1alpha1().ArangoMLCronJobs(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.MlV1alpha1().ArangoMLCronJobs(namespace).Watch(context.TODO(), options)
},
},
&mlv1alpha1.ArangoMLCronJob{},
resyncPeriod,
indexers,
)
}
func (f *arangoMLCronJobInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredArangoMLCronJobInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *arangoMLCronJobInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&mlv1alpha1.ArangoMLCronJob{}, f.defaultInformer)
}
func (f *arangoMLCronJobInformer) Lister() v1alpha1.ArangoMLCronJobLister {
return v1alpha1.NewArangoMLCronJobLister(f.Informer().GetIndexer())
}

View file

@ -0,0 +1,94 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
import (
"context"
time "time"
mlv1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
versioned "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned"
internalinterfaces "github.com/arangodb/kube-arangodb/pkg/generated/informers/externalversions/internalinterfaces"
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/generated/listers/ml/v1alpha1"
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"
)
// ArangoMLExtensionInformer provides access to a shared informer and lister for
// ArangoMLExtensions.
type ArangoMLExtensionInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha1.ArangoMLExtensionLister
}
type arangoMLExtensionInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewArangoMLExtensionInformer constructs a new informer for ArangoMLExtension 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 NewArangoMLExtensionInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredArangoMLExtensionInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredArangoMLExtensionInformer constructs a new informer for ArangoMLExtension 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 NewFilteredArangoMLExtensionInformer(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.MlV1alpha1().ArangoMLExtensions(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.MlV1alpha1().ArangoMLExtensions(namespace).Watch(context.TODO(), options)
},
},
&mlv1alpha1.ArangoMLExtension{},
resyncPeriod,
indexers,
)
}
func (f *arangoMLExtensionInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredArangoMLExtensionInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *arangoMLExtensionInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&mlv1alpha1.ArangoMLExtension{}, f.defaultInformer)
}
func (f *arangoMLExtensionInformer) Lister() v1alpha1.ArangoMLExtensionLister {
return v1alpha1.NewArangoMLExtensionLister(f.Informer().GetIndexer())
}

View file

@ -0,0 +1,94 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
import (
"context"
time "time"
mlv1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
versioned "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned"
internalinterfaces "github.com/arangodb/kube-arangodb/pkg/generated/informers/externalversions/internalinterfaces"
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/generated/listers/ml/v1alpha1"
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"
)
// ArangoMLStorageInformer provides access to a shared informer and lister for
// ArangoMLStorages.
type ArangoMLStorageInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha1.ArangoMLStorageLister
}
type arangoMLStorageInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewArangoMLStorageInformer constructs a new informer for ArangoMLStorage 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 NewArangoMLStorageInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredArangoMLStorageInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredArangoMLStorageInformer constructs a new informer for ArangoMLStorage 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 NewFilteredArangoMLStorageInformer(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.MlV1alpha1().ArangoMLStorages(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.MlV1alpha1().ArangoMLStorages(namespace).Watch(context.TODO(), options)
},
},
&mlv1alpha1.ArangoMLStorage{},
resyncPeriod,
indexers,
)
}
func (f *arangoMLStorageInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredArangoMLStorageInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *arangoMLStorageInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&mlv1alpha1.ArangoMLStorage{}, f.defaultInformer)
}
func (f *arangoMLStorageInformer) Lister() v1alpha1.ArangoMLStorageLister {
return v1alpha1.NewArangoMLStorageLister(f.Informer().GetIndexer())
}

View file

@ -0,0 +1,70 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
import (
internalinterfaces "github.com/arangodb/kube-arangodb/pkg/generated/informers/externalversions/internalinterfaces"
)
// Interface provides access to all the informers in this group version.
type Interface interface {
// ArangoMLBatchJobs returns a ArangoMLBatchJobInformer.
ArangoMLBatchJobs() ArangoMLBatchJobInformer
// ArangoMLCronJobs returns a ArangoMLCronJobInformer.
ArangoMLCronJobs() ArangoMLCronJobInformer
// ArangoMLExtensions returns a ArangoMLExtensionInformer.
ArangoMLExtensions() ArangoMLExtensionInformer
// ArangoMLStorages returns a ArangoMLStorageInformer.
ArangoMLStorages() ArangoMLStorageInformer
}
type version struct {
factory internalinterfaces.SharedInformerFactory
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// ArangoMLBatchJobs returns a ArangoMLBatchJobInformer.
func (v *version) ArangoMLBatchJobs() ArangoMLBatchJobInformer {
return &arangoMLBatchJobInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
// ArangoMLCronJobs returns a ArangoMLCronJobInformer.
func (v *version) ArangoMLCronJobs() ArangoMLCronJobInformer {
return &arangoMLCronJobInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
// ArangoMLExtensions returns a ArangoMLExtensionInformer.
func (v *version) ArangoMLExtensions() ArangoMLExtensionInformer {
return &arangoMLExtensionInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
// ArangoMLStorages returns a ArangoMLStorageInformer.
func (v *version) ArangoMLStorages() ArangoMLStorageInformer {
return &arangoMLStorageInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}

View file

@ -0,0 +1,103 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
import (
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// ArangoMLBatchJobLister helps list ArangoMLBatchJobs.
// All objects returned here must be treated as read-only.
type ArangoMLBatchJobLister interface {
// List lists all ArangoMLBatchJobs in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.ArangoMLBatchJob, err error)
// ArangoMLBatchJobs returns an object that can list and get ArangoMLBatchJobs.
ArangoMLBatchJobs(namespace string) ArangoMLBatchJobNamespaceLister
ArangoMLBatchJobListerExpansion
}
// arangoMLBatchJobLister implements the ArangoMLBatchJobLister interface.
type arangoMLBatchJobLister struct {
indexer cache.Indexer
}
// NewArangoMLBatchJobLister returns a new ArangoMLBatchJobLister.
func NewArangoMLBatchJobLister(indexer cache.Indexer) ArangoMLBatchJobLister {
return &arangoMLBatchJobLister{indexer: indexer}
}
// List lists all ArangoMLBatchJobs in the indexer.
func (s *arangoMLBatchJobLister) List(selector labels.Selector) (ret []*v1alpha1.ArangoMLBatchJob, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ArangoMLBatchJob))
})
return ret, err
}
// ArangoMLBatchJobs returns an object that can list and get ArangoMLBatchJobs.
func (s *arangoMLBatchJobLister) ArangoMLBatchJobs(namespace string) ArangoMLBatchJobNamespaceLister {
return arangoMLBatchJobNamespaceLister{indexer: s.indexer, namespace: namespace}
}
// ArangoMLBatchJobNamespaceLister helps list and get ArangoMLBatchJobs.
// All objects returned here must be treated as read-only.
type ArangoMLBatchJobNamespaceLister interface {
// List lists all ArangoMLBatchJobs in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.ArangoMLBatchJob, err error)
// Get retrieves the ArangoMLBatchJob from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1alpha1.ArangoMLBatchJob, error)
ArangoMLBatchJobNamespaceListerExpansion
}
// arangoMLBatchJobNamespaceLister implements the ArangoMLBatchJobNamespaceLister
// interface.
type arangoMLBatchJobNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoMLBatchJobs in the indexer for a given namespace.
func (s arangoMLBatchJobNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.ArangoMLBatchJob, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ArangoMLBatchJob))
})
return ret, err
}
// Get retrieves the ArangoMLBatchJob from the indexer for a given namespace and name.
func (s arangoMLBatchJobNamespaceLister) Get(name string) (*v1alpha1.ArangoMLBatchJob, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("arangomlbatchjob"), name)
}
return obj.(*v1alpha1.ArangoMLBatchJob), nil
}

View file

@ -0,0 +1,103 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
import (
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// ArangoMLCronJobLister helps list ArangoMLCronJobs.
// All objects returned here must be treated as read-only.
type ArangoMLCronJobLister interface {
// List lists all ArangoMLCronJobs in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.ArangoMLCronJob, err error)
// ArangoMLCronJobs returns an object that can list and get ArangoMLCronJobs.
ArangoMLCronJobs(namespace string) ArangoMLCronJobNamespaceLister
ArangoMLCronJobListerExpansion
}
// arangoMLCronJobLister implements the ArangoMLCronJobLister interface.
type arangoMLCronJobLister struct {
indexer cache.Indexer
}
// NewArangoMLCronJobLister returns a new ArangoMLCronJobLister.
func NewArangoMLCronJobLister(indexer cache.Indexer) ArangoMLCronJobLister {
return &arangoMLCronJobLister{indexer: indexer}
}
// List lists all ArangoMLCronJobs in the indexer.
func (s *arangoMLCronJobLister) List(selector labels.Selector) (ret []*v1alpha1.ArangoMLCronJob, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ArangoMLCronJob))
})
return ret, err
}
// ArangoMLCronJobs returns an object that can list and get ArangoMLCronJobs.
func (s *arangoMLCronJobLister) ArangoMLCronJobs(namespace string) ArangoMLCronJobNamespaceLister {
return arangoMLCronJobNamespaceLister{indexer: s.indexer, namespace: namespace}
}
// ArangoMLCronJobNamespaceLister helps list and get ArangoMLCronJobs.
// All objects returned here must be treated as read-only.
type ArangoMLCronJobNamespaceLister interface {
// List lists all ArangoMLCronJobs in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.ArangoMLCronJob, err error)
// Get retrieves the ArangoMLCronJob from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1alpha1.ArangoMLCronJob, error)
ArangoMLCronJobNamespaceListerExpansion
}
// arangoMLCronJobNamespaceLister implements the ArangoMLCronJobNamespaceLister
// interface.
type arangoMLCronJobNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoMLCronJobs in the indexer for a given namespace.
func (s arangoMLCronJobNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.ArangoMLCronJob, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ArangoMLCronJob))
})
return ret, err
}
// Get retrieves the ArangoMLCronJob from the indexer for a given namespace and name.
func (s arangoMLCronJobNamespaceLister) Get(name string) (*v1alpha1.ArangoMLCronJob, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("arangomlcronjob"), name)
}
return obj.(*v1alpha1.ArangoMLCronJob), nil
}

View file

@ -0,0 +1,103 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
import (
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// ArangoMLExtensionLister helps list ArangoMLExtensions.
// All objects returned here must be treated as read-only.
type ArangoMLExtensionLister interface {
// List lists all ArangoMLExtensions in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.ArangoMLExtension, err error)
// ArangoMLExtensions returns an object that can list and get ArangoMLExtensions.
ArangoMLExtensions(namespace string) ArangoMLExtensionNamespaceLister
ArangoMLExtensionListerExpansion
}
// arangoMLExtensionLister implements the ArangoMLExtensionLister interface.
type arangoMLExtensionLister struct {
indexer cache.Indexer
}
// NewArangoMLExtensionLister returns a new ArangoMLExtensionLister.
func NewArangoMLExtensionLister(indexer cache.Indexer) ArangoMLExtensionLister {
return &arangoMLExtensionLister{indexer: indexer}
}
// List lists all ArangoMLExtensions in the indexer.
func (s *arangoMLExtensionLister) List(selector labels.Selector) (ret []*v1alpha1.ArangoMLExtension, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ArangoMLExtension))
})
return ret, err
}
// ArangoMLExtensions returns an object that can list and get ArangoMLExtensions.
func (s *arangoMLExtensionLister) ArangoMLExtensions(namespace string) ArangoMLExtensionNamespaceLister {
return arangoMLExtensionNamespaceLister{indexer: s.indexer, namespace: namespace}
}
// ArangoMLExtensionNamespaceLister helps list and get ArangoMLExtensions.
// All objects returned here must be treated as read-only.
type ArangoMLExtensionNamespaceLister interface {
// List lists all ArangoMLExtensions in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.ArangoMLExtension, err error)
// Get retrieves the ArangoMLExtension from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1alpha1.ArangoMLExtension, error)
ArangoMLExtensionNamespaceListerExpansion
}
// arangoMLExtensionNamespaceLister implements the ArangoMLExtensionNamespaceLister
// interface.
type arangoMLExtensionNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoMLExtensions in the indexer for a given namespace.
func (s arangoMLExtensionNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.ArangoMLExtension, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ArangoMLExtension))
})
return ret, err
}
// Get retrieves the ArangoMLExtension from the indexer for a given namespace and name.
func (s arangoMLExtensionNamespaceLister) Get(name string) (*v1alpha1.ArangoMLExtension, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("arangomlextension"), name)
}
return obj.(*v1alpha1.ArangoMLExtension), nil
}

View file

@ -0,0 +1,103 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
import (
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// ArangoMLStorageLister helps list ArangoMLStorages.
// All objects returned here must be treated as read-only.
type ArangoMLStorageLister interface {
// List lists all ArangoMLStorages in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.ArangoMLStorage, err error)
// ArangoMLStorages returns an object that can list and get ArangoMLStorages.
ArangoMLStorages(namespace string) ArangoMLStorageNamespaceLister
ArangoMLStorageListerExpansion
}
// arangoMLStorageLister implements the ArangoMLStorageLister interface.
type arangoMLStorageLister struct {
indexer cache.Indexer
}
// NewArangoMLStorageLister returns a new ArangoMLStorageLister.
func NewArangoMLStorageLister(indexer cache.Indexer) ArangoMLStorageLister {
return &arangoMLStorageLister{indexer: indexer}
}
// List lists all ArangoMLStorages in the indexer.
func (s *arangoMLStorageLister) List(selector labels.Selector) (ret []*v1alpha1.ArangoMLStorage, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ArangoMLStorage))
})
return ret, err
}
// ArangoMLStorages returns an object that can list and get ArangoMLStorages.
func (s *arangoMLStorageLister) ArangoMLStorages(namespace string) ArangoMLStorageNamespaceLister {
return arangoMLStorageNamespaceLister{indexer: s.indexer, namespace: namespace}
}
// ArangoMLStorageNamespaceLister helps list and get ArangoMLStorages.
// All objects returned here must be treated as read-only.
type ArangoMLStorageNamespaceLister interface {
// List lists all ArangoMLStorages in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.ArangoMLStorage, err error)
// Get retrieves the ArangoMLStorage from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1alpha1.ArangoMLStorage, error)
ArangoMLStorageNamespaceListerExpansion
}
// arangoMLStorageNamespaceLister implements the ArangoMLStorageNamespaceLister
// interface.
type arangoMLStorageNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoMLStorages in the indexer for a given namespace.
func (s arangoMLStorageNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.ArangoMLStorage, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ArangoMLStorage))
})
return ret, err
}
// Get retrieves the ArangoMLStorage from the indexer for a given namespace and name.
func (s arangoMLStorageNamespaceLister) Get(name string) (*v1alpha1.ArangoMLStorage, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("arangomlstorage"), name)
}
return obj.(*v1alpha1.ArangoMLStorage), nil
}

View file

@ -0,0 +1,55 @@
//
// DISCLAIMER
//
// Copyright 2023 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 v1alpha1
// ArangoMLBatchJobListerExpansion allows custom methods to be added to
// ArangoMLBatchJobLister.
type ArangoMLBatchJobListerExpansion interface{}
// ArangoMLBatchJobNamespaceListerExpansion allows custom methods to be added to
// ArangoMLBatchJobNamespaceLister.
type ArangoMLBatchJobNamespaceListerExpansion interface{}
// ArangoMLCronJobListerExpansion allows custom methods to be added to
// ArangoMLCronJobLister.
type ArangoMLCronJobListerExpansion interface{}
// ArangoMLCronJobNamespaceListerExpansion allows custom methods to be added to
// ArangoMLCronJobNamespaceLister.
type ArangoMLCronJobNamespaceListerExpansion interface{}
// ArangoMLExtensionListerExpansion allows custom methods to be added to
// ArangoMLExtensionLister.
type ArangoMLExtensionListerExpansion interface{}
// ArangoMLExtensionNamespaceListerExpansion allows custom methods to be added to
// ArangoMLExtensionNamespaceLister.
type ArangoMLExtensionNamespaceListerExpansion interface{}
// ArangoMLStorageListerExpansion allows custom methods to be added to
// ArangoMLStorageLister.
type ArangoMLStorageListerExpansion interface{}
// ArangoMLStorageNamespaceListerExpansion allows custom methods to be added to
// ArangoMLStorageNamespaceLister.
type ArangoMLStorageNamespaceListerExpansion interface{}