remove validation for kind, apiVersion and metadata
This commit is contained in:
parent
ba528cba4b
commit
4d3dce2968
|
|
@ -57,37 +57,8 @@ spec:
|
||||||
validation:
|
validation:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
required:
|
required:
|
||||||
- kind
|
|
||||||
- apiVersion
|
|
||||||
- metadata
|
|
||||||
- spec
|
- spec
|
||||||
properties:
|
properties:
|
||||||
kind:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- postgresql
|
|
||||||
apiVersion:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- acid.zalan.do/v1
|
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
required:
|
|
||||||
- name
|
|
||||||
properties:
|
|
||||||
annotations:
|
|
||||||
type: object
|
|
||||||
additionalProperties:
|
|
||||||
type: string
|
|
||||||
labels:
|
|
||||||
type: object
|
|
||||||
additionalProperties:
|
|
||||||
type: string
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
# Note: the cluster name specified here must begin with the team name.
|
|
||||||
namespace:
|
|
||||||
type: string
|
|
||||||
spec:
|
spec:
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
|
|
@ -405,36 +376,8 @@ spec:
|
||||||
validation:
|
validation:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
required:
|
required:
|
||||||
- kind
|
|
||||||
- apiVersion
|
|
||||||
- metadata
|
|
||||||
- configuration
|
- configuration
|
||||||
properties:
|
properties:
|
||||||
kind:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- OperatorConfiguration
|
|
||||||
apiVersion:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- acid.zalan.do/v1
|
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
required:
|
|
||||||
- name
|
|
||||||
properties:
|
|
||||||
annotations:
|
|
||||||
type: object
|
|
||||||
additionalProperties:
|
|
||||||
type: string
|
|
||||||
labels:
|
|
||||||
type: object
|
|
||||||
additionalProperties:
|
|
||||||
type: string
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
namespace:
|
|
||||||
type: string
|
|
||||||
configuration:
|
configuration:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|
|
||||||
|
|
@ -17,36 +17,8 @@ spec:
|
||||||
validation:
|
validation:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
required:
|
required:
|
||||||
- kind
|
|
||||||
- apiVersion
|
|
||||||
- metadata
|
|
||||||
- configuration
|
- configuration
|
||||||
properties:
|
properties:
|
||||||
kind:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- OperatorConfiguration
|
|
||||||
apiVersion:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- acid.zalan.do/v1
|
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
required:
|
|
||||||
- name
|
|
||||||
properties:
|
|
||||||
annotations:
|
|
||||||
type: object
|
|
||||||
additionalProperties:
|
|
||||||
type: string
|
|
||||||
labels:
|
|
||||||
type: object
|
|
||||||
additionalProperties:
|
|
||||||
type: string
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
namespace:
|
|
||||||
type: string
|
|
||||||
configuration:
|
configuration:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|
|
||||||
|
|
@ -17,37 +17,8 @@ spec:
|
||||||
validation:
|
validation:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
required:
|
required:
|
||||||
- kind
|
|
||||||
- apiVersion
|
|
||||||
- metadata
|
|
||||||
- spec
|
- spec
|
||||||
properties:
|
properties:
|
||||||
kind:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- postgresql
|
|
||||||
apiVersion:
|
|
||||||
type: string
|
|
||||||
enum:
|
|
||||||
- acid.zalan.do/v1
|
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
required:
|
|
||||||
- name
|
|
||||||
properties:
|
|
||||||
annotations:
|
|
||||||
type: object
|
|
||||||
additionalProperties:
|
|
||||||
type: string
|
|
||||||
labels:
|
|
||||||
type: object
|
|
||||||
additionalProperties:
|
|
||||||
type: string
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
# Note: the cluster name specified here must begin with the team name.
|
|
||||||
namespace:
|
|
||||||
type: string
|
|
||||||
spec:
|
spec:
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
|
|
|
||||||
|
|
@ -109,53 +109,8 @@ var minDisable = -1.0
|
||||||
|
|
||||||
var postgresCRDResourceValidation = apiextv1beta1.JSONSchemaProps{
|
var postgresCRDResourceValidation = apiextv1beta1.JSONSchemaProps{
|
||||||
Type: "object",
|
Type: "object",
|
||||||
Required: []string{"kind", "apiVersion", "metadata", "spec"},
|
Required: []string{"spec"},
|
||||||
Properties: map[string]apiextv1beta1.JSONSchemaProps{
|
Properties: map[string]apiextv1beta1.JSONSchemaProps{
|
||||||
"kind": {
|
|
||||||
Type: "string",
|
|
||||||
Enum: []apiextv1beta1.JSON{
|
|
||||||
{
|
|
||||||
Raw: []byte(`"postgresql"`),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"apiVersion": {
|
|
||||||
Type: "string",
|
|
||||||
Enum: []apiextv1beta1.JSON{
|
|
||||||
{
|
|
||||||
Raw: []byte(`"acid.zalan.do/v1"`),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"metadata": {
|
|
||||||
Type: "object",
|
|
||||||
Required: []string{"name"},
|
|
||||||
Properties: map[string]apiextv1beta1.JSONSchemaProps{
|
|
||||||
"annotations": {
|
|
||||||
Type: "object",
|
|
||||||
AdditionalProperties: &apiextv1beta1.JSONSchemaPropsOrBool{
|
|
||||||
Schema: &apiextv1beta1.JSONSchemaProps{
|
|
||||||
Type: "string",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"labels": {
|
|
||||||
Type: "object",
|
|
||||||
AdditionalProperties: &apiextv1beta1.JSONSchemaPropsOrBool{
|
|
||||||
Schema: &apiextv1beta1.JSONSchemaProps{
|
|
||||||
Type: "string",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
Type: "string",
|
|
||||||
Description: "The cluster name specified here must begin with the team name",
|
|
||||||
},
|
|
||||||
"namespace": {
|
|
||||||
Type: "string",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"spec": {
|
"spec": {
|
||||||
Type: "object",
|
Type: "object",
|
||||||
Required: []string{"numberOfInstances", "teamId", "postgresql"},
|
Required: []string{"numberOfInstances", "teamId", "postgresql"},
|
||||||
|
|
@ -567,52 +522,8 @@ var postgresCRDResourceValidation = apiextv1beta1.JSONSchemaProps{
|
||||||
|
|
||||||
var operatorConfigCRDResourceValidation = apiextv1beta1.JSONSchemaProps{
|
var operatorConfigCRDResourceValidation = apiextv1beta1.JSONSchemaProps{
|
||||||
Type: "object",
|
Type: "object",
|
||||||
Required: []string{"kind", "apiVersion", "metadata", "configuration"},
|
Required: []string{"configuration"},
|
||||||
Properties: map[string]apiextv1beta1.JSONSchemaProps{
|
Properties: map[string]apiextv1beta1.JSONSchemaProps{
|
||||||
"kind": {
|
|
||||||
Type: "string",
|
|
||||||
Enum: []apiextv1beta1.JSON{
|
|
||||||
{
|
|
||||||
Raw: []byte(`"OperatorConfiguration"`),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"apiVersion": {
|
|
||||||
Type: "string",
|
|
||||||
Enum: []apiextv1beta1.JSON{
|
|
||||||
{
|
|
||||||
Raw: []byte(`"acid.zalan.do/v1"`),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"metadata": {
|
|
||||||
Type: "object",
|
|
||||||
Required: []string{"name"},
|
|
||||||
Properties: map[string]apiextv1beta1.JSONSchemaProps{
|
|
||||||
"annotations": {
|
|
||||||
Type: "object",
|
|
||||||
AdditionalProperties: &apiextv1beta1.JSONSchemaPropsOrBool{
|
|
||||||
Schema: &apiextv1beta1.JSONSchemaProps{
|
|
||||||
Type: "string",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"labels": {
|
|
||||||
Type: "object",
|
|
||||||
AdditionalProperties: &apiextv1beta1.JSONSchemaPropsOrBool{
|
|
||||||
Schema: &apiextv1beta1.JSONSchemaProps{
|
|
||||||
Type: "string",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
Type: "string",
|
|
||||||
},
|
|
||||||
"namespace": {
|
|
||||||
Type: "string",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"configuration": {
|
"configuration": {
|
||||||
Type: "object",
|
Type: "object",
|
||||||
Properties: map[string]apiextv1beta1.JSONSchemaProps{
|
Properties: map[string]apiextv1beta1.JSONSchemaProps{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue