diff --git a/deploy/crds.yaml b/deploy/crds.yaml index 2f44ea2..2560c7e 100644 --- a/deploy/crds.yaml +++ b/deploy/crds.yaml @@ -1,4 +1,4 @@ -apiVersion: apiextensions.k8s.io/v1beta1 +apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: organizations.grafana.k8spin.cloud @@ -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 @@ -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 @@ -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