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

[Feature] [Analytics] Metadata (#1664)

This commit is contained in:
Adam Janikowski 2024-05-10 14:44:33 +02:00 committed by GitHub
parent 34acb21f7b
commit e6a4ad471c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 62 additions and 83 deletions

View file

@ -15,6 +15,7 @@
- (Feature) (Analytics) GAE Integration
- (Feature) (Analytics) Enable TLS and Service
- (Feature) (ML) Unify Integration Sidecar
- (Feature) (Analytics) Metadata
## [1.2.40](https://github.com/arangodb/kube-arangodb/tree/1.2.40) (2024-04-10)
- (Feature) Add Core fields to the Scheduler Container Spec

View file

@ -3154,54 +3154,22 @@ Conditions specific to the entire extension
***
### .status.metadataService.local.arangoMLFeatureStore
### .status.metadataService.arangoMLFeatureStore
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1beta1/extension_status_metadata_service.go#L38)</sup>
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1beta1/extension_status_metadata_service.go#L28)</sup>
ArangoMLFeatureStoreDatabase define Database name to be used as MetadataService Backend
***
### .status.metadataService.local.arangoPipe
### .status.metadataService.arangoPipe
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1beta1/extension_status_metadata_service.go#L35)</sup>
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1beta1/extension_status_metadata_service.go#L25)</sup>
ArangoPipeDatabase define Database name to be used as MetadataService Backend
***
### .status.metadataService.secret.checksum
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L61)</sup>
UID keeps the information about object Checksum
***
### .status.metadataService.secret.name
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L52)</sup>
Name of the object
***
### .status.metadataService.secret.namespace
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L55)</sup>
Namespace of the object. Should default to the namespace of the parent object
***
### .status.metadataService.secret.uid
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L58)</sup>
UID keeps the information about object UID
***
### .status.reconciliation.service.checksum
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L61)</sup>

View file

@ -23,10 +23,11 @@ package v1alpha1
import api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
const (
LicenseValidCondition api.ConditionType = "LicenseValid"
DeploymentFoundCondition api.ConditionType = "DeploymentFound"
ReadyCondition api.ConditionType = "Ready"
SpecValidCondition api.ConditionType = "SpecValid"
StatefulSetReadyCondition api.ConditionType = "StatefulSetReady"
TLSEnabledCondition api.ConditionType = "TLSEnabled"
LicenseValidCondition api.ConditionType = "LicenseValid"
DeploymentFoundCondition api.ConditionType = "DeploymentFound"
ReadyCondition api.ConditionType = "Ready"
SpecValidCondition api.ConditionType = "SpecValid"
StatefulSetReadyCondition api.ConditionType = "StatefulSetReady"
TLSEnabledCondition api.ConditionType = "TLSEnabled"
MetadataServiceValidCondition api.ConditionType = "MetadataServiceValid"
)

View file

@ -20,17 +20,7 @@
package v1beta1
import sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1"
type ArangoMLExtensionStatusMetadataService struct {
// Local define the Local ArangoDeployment Metadata Service configuration
Local *ArangoMLExtensionStatusMetadataServiceLocal `json:"local,omitempty"`
// Secret define the Secret specification to store all the details
Secret *sharedApi.Object `json:"secret,omitempty"`
}
type ArangoMLExtensionStatusMetadataServiceLocal struct {
// ArangoPipeDatabase define Database name to be used as MetadataService Backend
ArangoPipeDatabase string `json:"arangoPipe"`

View file

@ -274,7 +274,7 @@ func (in *ArangoMLExtensionStatus) DeepCopyInto(out *ArangoMLExtensionStatus) {
if in.MetadataService != nil {
in, out := &in.MetadataService, &out.MetadataService
*out = new(ArangoMLExtensionStatusMetadataService)
(*in).DeepCopyInto(*out)
**out = **in
}
if in.ServiceAccount != nil {
in, out := &in.ServiceAccount, &out.ServiceAccount
@ -333,16 +333,6 @@ func (in *ArangoMLExtensionStatusArangoDBRef) DeepCopy() *ArangoMLExtensionStatu
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ArangoMLExtensionStatusMetadataService) DeepCopyInto(out *ArangoMLExtensionStatusMetadataService) {
*out = *in
if in.Local != nil {
in, out := &in.Local, &out.Local
*out = new(ArangoMLExtensionStatusMetadataServiceLocal)
**out = **in
}
if in.Secret != nil {
in, out := &in.Secret, &out.Secret
*out = new(v1.Object)
(*in).DeepCopyInto(*out)
}
return
}
@ -356,22 +346,6 @@ func (in *ArangoMLExtensionStatusMetadataService) DeepCopy() *ArangoMLExtensionS
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ArangoMLExtensionStatusMetadataServiceLocal) DeepCopyInto(out *ArangoMLExtensionStatusMetadataServiceLocal) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoMLExtensionStatusMetadataServiceLocal.
func (in *ArangoMLExtensionStatusMetadataServiceLocal) DeepCopy() *ArangoMLExtensionStatusMetadataServiceLocal {
if in == nil {
return nil
}
out := new(ArangoMLExtensionStatusMetadataServiceLocal)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ArangoMLExtensionStatusReconciliation) DeepCopyInto(out *ArangoMLExtensionStatusReconciliation) {
*out = *in

View file

@ -0,0 +1,40 @@
//
// DISCLAIMER
//
// Copyright 2024 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 k8s
import (
core "k8s.io/api/core/v1"
"github.com/arangodb/kube-arangodb/pkg/util"
)
func CoreSecret(in *core.Secret) *core.Secret {
return FilterP(in, func(in *core.Secret) *core.Secret {
return &core.Secret{
ObjectMeta: ObjectMetaFilter(in.ObjectMeta),
Data: in.Data,
}
})
}
func CoreSecretChecksum(in *core.Secret) (string, error) {
return util.SHA256FromJSON(CoreSecret(in))
}

View file

@ -1,7 +1,7 @@
//
// DISCLAIMER
//
// Copyright 2016-2022 ArangoDB GmbH, Cologne, Germany
// Copyright 2016-2024 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.
@ -41,12 +41,17 @@ type Event struct {
Message string
}
// APIObject helps to abstract an object from our custom API.
type APIObject interface {
runtime.Object
type K8SObject interface {
meta.Object
// AsOwner creates an OwnerReference for the given deployment
AsOwner() meta.OwnerReference
}
// APIObject helps to abstract an object from our custom API.
type APIObject interface {
runtime.Object
K8SObject
OwnerOf(in meta.Object) bool
}