remove metadata from CRD validation
This commit is contained in:
parent
956fd1379c
commit
a3fdc848bf
|
|
@ -56,7 +56,6 @@ spec:
|
||||||
required:
|
required:
|
||||||
- kind
|
- kind
|
||||||
- apiVersion
|
- apiVersion
|
||||||
- metadata
|
|
||||||
- spec
|
- spec
|
||||||
properties:
|
properties:
|
||||||
kind:
|
kind:
|
||||||
|
|
@ -67,14 +66,6 @@ spec:
|
||||||
type: string
|
type: string
|
||||||
enum:
|
enum:
|
||||||
- acid.zalan.do/v1
|
- acid.zalan.do/v1
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
required:
|
|
||||||
- name
|
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
maxLength: 53
|
|
||||||
spec:
|
spec:
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
|
|
|
||||||
|
|
@ -107,13 +107,12 @@ var min0 = 0.0
|
||||||
var min1 = 1.0
|
var min1 = 1.0
|
||||||
var min2 = 2.0
|
var min2 = 2.0
|
||||||
var minDisable = -1.0
|
var minDisable = -1.0
|
||||||
var maxLength = int64(53)
|
|
||||||
|
|
||||||
// PostgresCRDResourceValidation to check applied manifest parameters
|
// PostgresCRDResourceValidation to check applied manifest parameters
|
||||||
var PostgresCRDResourceValidation = apiextv1.CustomResourceValidation{
|
var PostgresCRDResourceValidation = apiextv1.CustomResourceValidation{
|
||||||
OpenAPIV3Schema: &apiextv1.JSONSchemaProps{
|
OpenAPIV3Schema: &apiextv1.JSONSchemaProps{
|
||||||
Type: "object",
|
Type: "object",
|
||||||
Required: []string{"kind", "apiVersion", "metadata", "spec"},
|
Required: []string{"kind", "apiVersion", "spec"},
|
||||||
Properties: map[string]apiextv1.JSONSchemaProps{
|
Properties: map[string]apiextv1.JSONSchemaProps{
|
||||||
"kind": {
|
"kind": {
|
||||||
Type: "string",
|
Type: "string",
|
||||||
|
|
@ -131,16 +130,6 @@ var PostgresCRDResourceValidation = apiextv1.CustomResourceValidation{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"metadata": {
|
|
||||||
Type: "object",
|
|
||||||
Required: []string{"name"},
|
|
||||||
Properties: map[string]apiextv1.JSONSchemaProps{
|
|
||||||
"name": {
|
|
||||||
Type: "string",
|
|
||||||
MaxLength: &maxLength,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"spec": {
|
"spec": {
|
||||||
Type: "object",
|
Type: "object",
|
||||||
Required: []string{"numberOfInstances", "teamId", "postgresql", "volume"},
|
Required: []string{"numberOfInstances", "teamId", "postgresql", "volume"},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue