rancher / fleet

Deploy workloads from Git to large fleets of Kubernetes clusters
https://fleet.rancher.io/
Apache License 2.0
1.51k stars 229 forks source link

how to provide/override public helm chart values using GitRepo #663

Open riuvshyn opened 2 years ago

riuvshyn commented 2 years ago

Question: How do I override/provide public helm chart values with GitRepo? I am creating GitRepo CR like this one:

apiVersion: fleet.cattle.io/v1alpha1
kind: GitRepo
metadata:
  name: ext-dns
  namespace: fleet-local
spec:
  branch: master
  insecureSkipTLSVerify: false
  paths:
    - charts/external-dns
  repo: https://github.com/kubernetes-sigs/external-dns
  targets:
  - clusterSelector:
      matchExpressions:
      - key: provider.cattle.io
        operator: NotIn
        values:
        - harvester

How do I pass values for this chart?

ron1 commented 2 years ago

For future reference, suggest you ask this type of question in Rancher Users #fleet slack channel.

You need a git repo with a fleet.yaml file to specify your helm chart url, custom values, etc. See https://github.com/rancher/fleet/blob/master/docs/gitrepo-structure.md#fleetyaml for the expected Git Repo structure including the fleet.yaml file.

riuvshyn commented 2 years ago

@ron1 yeah I;ve tried that but that looks weird to create a repo for fleet.yaml can't it be part GitRepo CR? something like

apiVersion: fleet.cattle.io/v1alpha1
kind: GitRepo
metadata:
  name: ext-dns
  namespace: fleet-local
spec:
....
  fleet:
    ....
ron1 commented 2 years ago

The goal is to drive management of the desired workload state from git. Since the GitRepo CR itself is not managed in git, it should be lightweight and have the least amount of configuration possible. Storing workload configuration in the GitRepo CR itself seems to defeat the purpose.

Fleet excels at managing workloads running on multiple clusters. Here is the minimalist example: https://github.com/rancher/fleet-examples/blob/master/multi-cluster/helm-external.