Skip to content

Commit

Permalink
Bugfix CRD re-enable validation (#2)
Browse files Browse the repository at this point in the history
* Rollback CRDs validation
* FIX: apiextensions.k8s.io/v1 does not accept metadata definition
  • Loading branch information
angelbarrera92 authored Mar 8, 2020
1 parent b6ea417 commit d22ae25
Showing 1 changed file with 87 additions and 2 deletions.
89 changes: 87 additions & 2 deletions deploy/crds.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apiextensions.k8s.io/v1beta1
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: organizations.grafana.k8spin.cloud
Expand All @@ -9,6 +9,55 @@ spec:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
status:
type: object
x-kubernetes-preserve-unknown-fields: true
spec:
type: object
properties:
datasources:
description: Grafana datasources
type: array
items:
type: object
required: [name, data]
properties:
name:
type: string
data:
type: string
dashboards:
description: Grafana dashboards
type: array
items:
type: object
required: [name, data]
properties:
name:
type: string
data:
type: string
additionalPrinterColumns:
- jsonPath: .spec.datasources[*].name
name: Datasources
type: string
- jsonPath: .spec.dashboards[*].name
name: Dashboards
type: string
names:
kind: Organization
plural: organizations
Expand All @@ -17,7 +66,7 @@ spec:
- orgs
- org
---
apiVersion: apiextensions.k8s.io/v1beta1
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: users.grafana.k8spin.cloud
Expand All @@ -28,6 +77,42 @@ spec:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
status:
type: object
x-kubernetes-preserve-unknown-fields: true
spec:
type: object
required: [email]
properties:
email:
description: User's email to access Grafana
type: string
organizations:
description: Organizations where the user belongs
type: array
items:
type: string
additionalPrinterColumns:
- jsonPath: .spec.email
name: Email
type: string
- jsonPath: .spec.organizations
name: Organizations
type: string
names:
kind: User
plural: users
Expand Down

0 comments on commit d22ae25

Please sign in to comment.