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

[Feature] Add CRD generator for ArangoDeploymentReplication (#1015)

This commit is contained in:
Nikita Vanyasin 2022-06-17 12:44:08 +04:00 committed by GitHub
parent 10d2e4d25f
commit aa08c5dd40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 86 additions and 0 deletions

View file

@ -18,6 +18,7 @@
- (Bugfix) Fix License RAW value discovery - (Bugfix) Fix License RAW value discovery
- (Refactor) Optimize go.mod entries - (Refactor) Optimize go.mod entries
- (Feature) Add `ArangoLocalStorage` CRD auto-installer - (Feature) Add `ArangoLocalStorage` CRD auto-installer
- (Feature) Add `ArangoDeploymentReplication` CRD auto-installer
## [1.2.13](https://github.com/arangodb/kube-arangodb/tree/1.2.13) (2022-06-07) ## [1.2.13](https://github.com/arangodb/kube-arangodb/tree/1.2.13) (2022-06-07)
- (Bugfix) Fix arangosync members state inspection - (Bugfix) Fix arangosync members state inspection

View file

@ -21,6 +21,7 @@ rules:
- "arangoclustersynchronizations.database.arangodb.com" - "arangoclustersynchronizations.database.arangodb.com"
- "arangomembers.database.arangodb.com" - "arangomembers.database.arangodb.com"
- "arangotasks.database.arangodb.com" - "arangotasks.database.arangodb.com"
- "arangodeploymentreplications.replication.database.arangodb.com"
- "arangobackups.backup.arangodb.com" - "arangobackups.backup.arangodb.com"
- "arangobackuppolicies.backup.arangodb.com" - "arangobackuppolicies.backup.arangodb.com"
- "arangojobs.apps.arangodb.com" - "arangojobs.apps.arangodb.com"

View file

@ -0,0 +1,84 @@
//
// 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("arangodeploymentreplications.replication.database.arangodb.com", crd{
version: "1.0.1",
spec: apiextensions.CustomResourceDefinitionSpec{
Group: "replication.database.arangodb.com",
Names: apiextensions.CustomResourceDefinitionNames{
Plural: "arangodeploymentreplications",
Singular: "arangodeploymentreplication",
ShortNames: []string{
"arangorepl",
},
Kind: "ArangoDeploymentReplication",
ListKind: "ArangoDeploymentReplicationList",
},
Scope: apiextensions.NamespaceScoped,
Versions: []apiextensions.CustomResourceDefinitionVersion{
{
Name: "v1",
Schema: &apiextensions.CustomResourceValidation{
OpenAPIV3Schema: &apiextensions.JSONSchemaProps{
Type: "object",
XPreserveUnknownFields: util.NewBool(true),
},
},
Served: true,
Storage: true,
},
{
Name: "v1alpha",
Schema: &apiextensions.CustomResourceValidation{
OpenAPIV3Schema: &apiextensions.JSONSchemaProps{
Type: "object",
XPreserveUnknownFields: util.NewBool(true),
},
},
Served: true,
Storage: false,
},
{
Name: "v2alpha1",
Schema: &apiextensions.CustomResourceValidation{
OpenAPIV3Schema: &apiextensions.JSONSchemaProps{
Type: "object",
XPreserveUnknownFields: util.NewBool(true),
},
},
Served: true,
Storage: false,
Subresources: &apiextensions.CustomResourceSubresources{
Status: &apiextensions.CustomResourceSubresourceStatus{},
},
},
},
},
})
}