1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-15 17:51:03 +00:00
kube-arangodb/pkg/apis/storage/v1alpha/local_storage.go
2018-03-27 13:32:33 +02:00

61 lines
1.9 KiB
Go

//
// DISCLAIMER
//
// Copyright 2018 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
//
// Author Ewout Prangsma
//
package v1alpha
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ArangoLocalStorageList is a list of ArangoDB local storage providers.
type ArangoLocalStorageList struct {
metav1.TypeMeta `json:",inline"`
// Standard list metadata
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
metav1.ListMeta `json:"metadata,omitempty"`
Items []ArangoLocalStorage `json:"items"`
}
// +genclient
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ArangoLocalStorage contains the entire Kubernetes info for an ArangoDB
// local storage provider.
type ArangoLocalStorage struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec LocalStorageSpec `json:"spec"`
Status LocalStorageStatus `json:"status"`
}
// AsOwner creates an OwnerReference for the given storage
func (d *ArangoLocalStorage) AsOwner() metav1.OwnerReference {
return metav1.OwnerReference{
APIVersion: SchemeGroupVersion.String(),
Kind: ArangoLocalStorageResourceKind,
Name: d.Name,
UID: d.UID,
}
}