mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
[Feature] Add CRD generator for ArangoLocalStorage
(#1017)
This commit is contained in:
parent
09103a5aca
commit
fc6fce4f0a
3 changed files with 61 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
|||
- (Bugfix) Fix Operator Logger NPE
|
||||
- (Bugfix) Fix License RAW value discovery
|
||||
- (Refactor) Optimize go.mod entries
|
||||
- (Feature) Add `ArangoLocalStorage` CRD auto-installer
|
||||
|
||||
## [1.2.13](https://github.com/arangodb/kube-arangodb/tree/1.2.13) (2022-06-07)
|
||||
- (Bugfix) Fix arangosync members state inspection
|
||||
|
|
|
@ -24,6 +24,7 @@ rules:
|
|||
- "arangobackups.backup.arangodb.com"
|
||||
- "arangobackuppolicies.backup.arangodb.com"
|
||||
- "arangojobs.apps.arangodb.com"
|
||||
- "arangolocalstorages.storage.arangodb.com"
|
||||
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
59
pkg/crd/arangolocalstorage.go
Normal file
59
pkg/crd/arangolocalstorage.go
Normal file
|
@ -0,0 +1,59 @@
|
|||
//
|
||||
// DISCLAIMER
|
||||
//
|
||||
// Copyright 2016-2022 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 (
|
||||
apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
|
||||
|
||||
"github.com/arangodb/kube-arangodb/pkg/util"
|
||||
)
|
||||
|
||||
func init() {
|
||||
registerCRDWithPanic("arangolocalstorages.storage.arangodb.com", crd{
|
||||
version: "1.0.1",
|
||||
spec: apiextensions.CustomResourceDefinitionSpec{
|
||||
Group: "storage.arangodb.com",
|
||||
Names: apiextensions.CustomResourceDefinitionNames{
|
||||
Plural: "arangolocalstorages",
|
||||
Singular: "arangolocalstorage",
|
||||
Kind: "ArangoLocalStorage",
|
||||
ListKind: "ArangoLocalStorageList",
|
||||
ShortNames: []string{
|
||||
"arangostorage",
|
||||
},
|
||||
},
|
||||
Scope: apiextensions.ClusterScoped,
|
||||
Versions: []apiextensions.CustomResourceDefinitionVersion{
|
||||
{
|
||||
Name: "v1alpha",
|
||||
Schema: &apiextensions.CustomResourceValidation{
|
||||
OpenAPIV3Schema: &apiextensions.JSONSchemaProps{
|
||||
Type: "object",
|
||||
XPreserveUnknownFields: util.NewBool(true),
|
||||
},
|
||||
},
|
||||
Served: true,
|
||||
Storage: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
Loading…
Reference in a new issue