apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: helmdeploys.publish.kunstack.com
spec:
  group: publish.kunstack.com
  versions:
    - name: v1beta1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          description: HelmRelease is the Schema for the helmReleases API
          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
            metadata:
              type: object
            spec:
              description: HelmReleaseSpec defines the desired state of HelmRelease
              properties:
                description:
                  description: Message for helm description
                  type: string
                wait:
                  description: 'if set, will wait until all Pods, PVCs, Services,
                    and minimum number of Pods of a Deployment, StatefulSet, or 
                    ReplicaSet are in a ready state before marking the release as successful.'
                  type: boolean
                force:
                  description: if set, will delete/recreate resource when necessary
                  type: boolean
                timeout:
                  description: Timeout to wait for installation/update to complete
                  type: integer
                disableHooks:
                  description: disable pre/post upgrade hooks
                  type: boolean
                values:
                  description: helm release values.yaml
                  format: byte
                  type: string
              required:
                - values
                - name
                - timeout
              type: object
            status:
              description: HelmReleaseStatus defines the observed state of HelmRelease
              properties:
                deployStatus:
                  description: deploy status list of history, which will store at most 10 state
                  items:
                    properties:
                      deployTime:
                        description: deploy time, upgrade time or check status time
                        format: date-time
                        type: string
                      message:
                        description: A human readable message indicating details about
                          why the release is in this state.
                        type: string
                      version:
                        description: current release version
                        type: integer
                      state:
                        description: current state of the release
                        type: string
                    required:
                      - deployTime
                      - state
                    type: object
                  type: array
                lastDeployed:
                  description: last deploy  time
                  format: date-time
                  type: string
                lastUpdate:
                  description: last update time
                  format: date-time
                  type: string
                message:
                  description: A human readable message indicating details about why the release is in this state.
                  type: string
                state:
                  description: current release state
                  type: string
                manifest:
                  description: helm release manifest
                  format: byte
                  type: string
                version:
                  description: current release version
                  type: integer
              required:
                - state
              type: object
  names:
    kind: HelmDeploy
    listKind: HelmDeployList
    plural: helmdeploys
    singular: helmdeploy
  scope: Namespaced
