Skip to content

Feature helm template #297

Description

@jlandowner

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions