cosmo icon indicating copy to clipboard operation
cosmo copied to clipboard

Feature helm template

Open jlandowner opened this issue 2 years ago • 0 comments

Support helm chart in Template spec

apiVersion: cosmo.cosmo-workspace.github.io/v1alpha1
kind: Template
metadata:
  labels:
    cosmo/type: workspace
  name: vscode
spec:
  requiredVars:
  - var: hoo.bar
    default: VAR_VALUE
  helm:
    chart:
      # select one of the options below
      # option1: chart file url
      url: http://s3.amazonaws.com/xxx/xxx/xxx/cosmo-vscode-vX.X.X.tgz
      # option2: chart file in config map
      configMap:
        name: charts
        namespace: default
        file: cosmo-vscode-vX.X.X.tgz
      # option3: set repo and search charts
      repo:
        url: http://charts.cosmo-workspace.github.io
        chart: cosmo/vscode
        version: vX.X.X
    values: # can be empty
      # option1: raw values.yaml
      raw: |
        this: 
           is:
             raw: values.yaml
      # option2: configMap
      configMap:
        name: charts
        namespace: default
        file: default.values.yaml
    # Template should exclude cluster scope resources such as PersistentVolume or ClusterRole
    # Deny applying when including the resources by default
    excludeClusterScope: false # if true, exclude the resources and force apply 

No change in Instance

apiVersion: cosmo.cosmo-workspace.github.io/v1alpha1
kind: Instance
metadata:
  name: my-workspace
  namespace: cosmo-user-sample
spec:
  template:
    name: vscode
  vars:
    # var is passed to helm values by `helm upgrade --install --set hoo.var=VAR_VALUE`
    service.type: NodePort
    hoo.bar: hoobar

jlandowner avatar Apr 13 '22 02:04 jlandowner