apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
    name: applications.microsoft.com
    namespace: default # For easier deployment and avoid permissions collisions on most clusters, the resource is namespace-scoped. More information at: https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/
spec:
    group: microsoft.com
    names:
        kind: Application
        plural: applications
        singular: application
        shortNames:
            - a
    scope: Namespaced
    versions:
        - name: v1alpha1
          served: true
          storage: true
          schema:
              openAPIV3Schema:
                  type: object
                  properties:
                      spec:
                          type: object
                          properties:
                              template: # templates define the resources that are deployed
                                  type: string
                              values:
                                  x-kubernetes-preserve-unknown-fields: true
                                  type: object
                          required: ["template"]
