namespace: Radius.Resources
types:
  postgreSQL:
    apiVersions:
      '2023-10-01-preview':
        schema: 
          type: object
          properties:
            environment:
              type: string
            application:
              type: string
            size:
              type: string
              description: The size of the PostgreSQL database
            database:
              type: string
              description: The name of the database
              readOnly: true
            host:
              type: string
              description: The host name of the database
              readOnly: true
            port:
              type: string
              description: The port number of the database
              readOnly: true
            username:
              type: string
              description: The username for the database
              readOnly: true
            password:
              type: string
              description: The password for the database
              readOnly: true
  webServices:
    apiVersions:
      '2023-10-01-preview':
        schema: 
          type: object
          properties:
            environment:
              type: string
              description: The Radius environment, typically set by the rad CLI
            application:
              type: string
              description: The application which the resource is associated with
            connections:
              type: object
              description: The List of connections to other resources
              properties:
                name:
                  type: string
                  description: The name of the connection
                source: 
                  type: string
                  description: The id of the resource the webService is connecting to
            ingress:
              type: boolean
              description: When true, deployes an ingress gateway mapped to the port named web (MUST use web for the port name)
            container:
              type: object
              properties:
                image:
                  type: string
                  description: The container image
                env:
                  type: object
                  description: Environment variables injected into the application container
                  properties:
                    value:
                      type: string
                    valueFrom:
                      type: object
                      properties:
                        secretRef:
                          type: object
                          properties:
                            source:
                              type: string
                              description: The name of the secret
                            key:
                              type: string
                              description: The key in the secret
                command:
                  type: string
                  description: Overrides the container images ENTRYPOINT
                args:
                  type: string
                  description: Overrides the container images CMD
                imagePullPolicy:
                  type: string
                  description: The image pull policy for the container image (Always, IfNotPresent, Never)
                workingDir:
                  type: string
                  description: The working directory for the container
                ports:
                  type: object
                  properties:
                    containerPort:
                      type: string
                      description: The port the container is listening on
                    protocol:
                      type: string
                      description: The protocol the container listening on, defaults to tcp
                readinessProbe:
                  type: object
                  properties:
                    kind:
                      type: string
                      description: The kind of probe (exec, httpGet, tcp)
                    containerPort:
                      type: string
                      description: The listening port number, used when kind is httpGet or tcp
                    path:
                      type: string
                      description: The route to make the HTTP request on, used when kind is httpGet
                    command:
                      type: string
                      description: Command to execute to probe readiness, used when kind is exec
                    initialDelaySeconds:
                      type: integer
                      description: The number of seconds to wait before starting the probe
                    failureThreshold:
                      type: integer
                      description: The number of failed probes required to mark the container as not ready
                    periodSeconds:
                      type: integer
                      description: The number of seconds between each probe
                  required:
                  - kind
                livenessProbe:
                  type: object
                  properties:
                    kind:
                      type: string
                      description: The kind of probe (exec, httpGet, tcp)
                    containerPort:
                      type: string
                      description: The listening port number, used when kind is httpGet or tcp
                    path:
                      type: string
                      description: The route to make the HTTP request on, used when kind is httpGet
                    command:
                      type: string
                      description: Command to execute to probe readiness, used when kind is exec
                    initialDelaySeconds:
                      type: integer
                      description: The number of seconds to wait before starting the probe
                    failureThreshold:
                      type: integer
                      description: The number of failed probes required to mark the container as not ready
                    periodSeconds:
                      type: integer
                      description: The number of seconds between each probe
                  required:
                  - kind
                volumes:
                  type: object
                  properties:
                    name:
                      type: string
                      description: The name of the volume
                    kind:
                      type: string
                      description: The type of volume, either ephemeral or persistent
                    mountPath:
                      type: string
                      description: 	The container path to mount the volume to
                    managedStore:
                      type: string
                      description: The backing storage medium to use when kind is ephemeral, either disk or memory
                    source:
                      type: string
                      description: A volume resource to mount when kind is persistent
                    rbac:
                      type: string
                      description: The RBAC level when kind is persistent, allowed values are read and write, defaults to read
                  required:
                  - name
                  - kind
                  - mountPath
                  - managedStore
                  - source   
              required:
              - image
          required:
          - environment
          - container