labels:
  io.cattle.role: project # options are cluster/project
questions:
- variable: defaultImage
  default: true
  description: "Use default Docker image"
  label: Use Default Image
  type: boolean
  show_subquestion_if: false
  group: "Container Images"
  subquestions:
  - variable: image.repository
    default: "ranchercharts/chartmuseum-chartmuseum"
    description: "Docker image repository"
    type: string
    label: Image Repository
    required: true
  - variable: image.tag
    default: "v0.9.0"
    description: "Docker image tag"
    type: string
    label: Image Tag
    required: true
# storage settings
- variable: env.open.STORAGE
  required: true
  default: "local"
  description: "Storage Backend to use"
  type: enum
  label: Storage Backend To Use
  group: "Storage Options"
  options:
    - "local"
    - "alibaba"
    - "amazon"
    - "google"
    - "microsoft"
    - "openstack"
- variable: env.open.STORAGE_AMAZON_BUCKET
  default: ""
  type: string
  description: "S3 bucket to store charts for amazon storage backend"
  label: S3 Bucket Name
  group: "Storage Options"
  required: true
  show_if: "env.open.STORAGE=amazon"
- variable: env.open.STORAGE_AMAZON_PREFIX
  default: ""
  type: string
  description: "prefix to store charts for amazon storage backend"
  label: Prefix To Store Charts Under for AWS S3 (Optional)
  group: "Storage Options"
  show_if: "env.open.STORAGE=amazon"
- variable: env.open.STORAGE_AMAZON_REGION
  default: ""
  required: true
  type: string
  description: "Region to use for bucket access for AWS	"
  label: Region for S3 Bucket Storage
  group: "Storage Options"
  show_if: "env.open.STORAGE=amazon"
# Alibaba Cloud Storage Options
- variable: env.open.STORAGE_ALIBABA_BUCKET
  default: ""
  type: string
  description: "OSS bucket to store charts for alibaba storage backend"
  label: OSS Bucket Name
  group: "Storage Options"
  show_if: "env.open.STORAGE=alibaba"
  required: true
- variable: env.open.STORAGE_ALIBABA_ENDPOINT
  default: ""
  type: string
  description: "OSS endpoint to store charts for alibaba storage backend"
  label: Alternative OSS Storage Endpoint
  group: "Storage Options"
  show_if: "env.open.STORAGE=alibaba"
  required: true
- variable: env.open.STORAGE_ALIBABA_PREFIX
  default: ""
  type: string
  description: "Prefix to store charts for alibaba storage backend"
  label: OSS Bucket Prefix
  group: "Storage Options"
  show_if: "env.open.STORAGE=alibaba"
  required: true
# Google Storage Options
- variable: env.open.STORAGE_GOOGLE_BUCKET
  default: ""
  type: string
  description: "GCS bucket to store charts for google storage backend"
  label: GCS Bucket Name
  group: "Storage Options"
  show_if: "env.open.STORAGE=google"
  required: true
- variable: env.open.STORAGE_GOOGLE_PREFIX
  default: ""
  type: string
  description: "Prefix to store charts for google storage backend"
  label: GCS Bucket Prefix
  group: "Storage Options"
  show_if: "env.open.STORAGE=google"
  required: true
# Microsoft Azure Storage Options
- variable: env.open.STORAGE_MICROSOFT_CONTAINER
  default: ""
  type: string
  description: "Container to store charts for microsoft storage backend"
  label: Microsoft Azure Blob Storage Name
  group: "Storage Options"
  show_if: "env.open.STORAGE=microsoft"
  required: true
- variable: env.open.STORAGE_MICROSOFT_PREFIX
  default: ""
  type: string
  description: "Prefix to store charts for microsoft storage backend"
  label: Microsoft Azure Blob Storage Prefix
  group: "Storage Options"
  show_if: "env.open.STORAGE=microsoft"
  required: true
# OpenStack Storage Options
- variable: env.open.STORAGE_OPENSTACK_CONTAINER
  default: ""
  type: string
  description: "Prefix to store charts for openstack storage backend"
  label: Openstack Object Storage Container Name
  group: "Storage Options"
  show_if: "env.open.STORAGE=openstack"
  required: true
- variable: env.open.STORAGE_OPENSTACK_PREFIX
  default: ""
  type: string
  description: "Prefix to store charts for openstack storage backend"
  label: Prefix To Openstack Object Storage Container
  group: "Storage Options"
  show_if: "env.open.STORAGE=openstack"
  required: true
- variable: env.open.STORAGE_OPENSTACK_REGION
  default: ""
  type: string
  description: "Region of openstack container"
  label: Region Of Openstack Object Storage Container	
  group: "Storage Options"
  show_if: "env.open.STORAGE=openstack"
  required: true
# Storage Secret
- variable: env.existingSecret
  default: ""
  type: secret
  description: "Name of an existing secret to get the secret values from"
  label: Select the Existing Secret
  group: "Storage Secret"
# Local Storage Settings
- variable: persistence.enabled
  default: false
  type: boolean
  description: "use a PVC for persistent storage for local storage"
  label: Enable Persistent Storage For Local Storage
  group: "Storage Options"
  show_if: "env.open.STORAGE=local"
  show_subquestion_if: true
  subquestions:
  - variable: persistence.size
    default: "10Gi"
    type: string
    description: "Local Storage Persistent Volume Size"
    label: Local Storage Volume Size
    group: "Storage Options"
    show_if: "env.open.STORAGE=local&&persistence.enabled=true"
  - variable: persistence.storageClass
    default: ""
    description: "If undefined or null, uses the default StorageClass. Default to null"
    type: storageclass
    group: "Storage Options"
    label: Default StorageClass for Local Storage
    show_if: "env.open.STORAGE=local&&persistence.enabled=true"
  - variable: persistence.existingClaim
    default: ""
    description: "If not empty, uses the specified existing PVC instead of creating new one"
    type: pvc
    label: Uses Existing Persistent Volume Cliam for LocalStorage
# Service and L7 LoadBalancer
- variable: ingress.enabled
  default: false
  description: "Expose app using Layer 7 Load Balancer - ingress"
  type: boolean
  label: Expose app using Layer 7 Load Balancer
  show_subquestion_if: true
  group: "Services and Load Balancing"
  subquestions:
  - variable: ingress.hosts[0].name
    default: "xip.io"
    description: "Hostname to your app installation"
    type: hostname
    required: true
    label: Hostname
- variable: service.type
  required: true
  default: "NodePort"
  description: "ChartMuseum Service Type"
  type: enum
  label: Service Type For ChartMuseum 
  group: "Services and Load Balancing"
  show_if: "ingress.enabled=false"
  options:
    - "ClusterIP"
    - "NodePort"
# chartmuseum options
- variable: env.open.SHOW_ADVANCED
  default: false
  description: "Show advanced ChartMuseum settings"
  type: boolean
  label: Show Advanced ChartMuseum Settings
  group: "ChartMuseum Settings"
  show_subquestion_if: true
  subquestions:
  - variable: env.open.CHART_URL
    default: ""
    description: "Absolute url for .tgzs in index.yaml"
    type: string
    label: Absolute URL For .tgzs In index.yaml
  - variable: env.open.DEPTH
    default: 0
    description: "Levels of nested repos for multitenancy."
    type: int
    label: Levels Of Nested Repos For Multitenancy
  - variable: env.open.ALLOW_OVERWRITE
    default: false
    description: "Allow chart versions to be re-uploaded"
    type: boolean
    label: Allow Chart Versions To Be Re-uploaded
  - variable: env.open.AUTH_ANONYMOUS_GET
    default: false
    description: "Allow anonymous GET operations when auth is used"
    type: boolean
    label: Allow Anonymous GET Operations When Auth Is Used
  - variable: env.open.DISABLE_METRICS
    default: true
    description: "Disable Prometheus metrics of Chartmuseum"
    type: boolean
    label: Disable Prometheus Metrics
