vendir icon indicating copy to clipboard operation
vendir copied to clipboard

add kubernetes source

Open cppforlife opened this issue 4 years ago • 3 comments

cppforlife avatar Nov 13 '20 17:11 cppforlife

I am curious about this feature. Are there any more details to add on what a Kubernetes source for vendir means? Does this mean fetching resources from a cluster, or something different?

danielhelfand avatar Nov 17 '20 19:11 danielhelfand

Does this mean fetching resources from a cluster

yeah something like this what i had in mind:

kubernetesResources:
  resources:
  - apiVersion: v1
    kind: Pod
    namespace: ""
    fieldSelector:
    labelSelector:
    path: all-pods.yml

  - apiVersion: v1
    kind: Secret
    namespace: ...
    fieldSelector:
    labelSelector:
      matchLabels:
        foo: ""
      matchExpressions:
      - ...
    path: svc.yml

main use case you be when vendir is being used by kapp-controller. it would give ability for App CR to take k8s resources in the cluster as inputs to ytt templates.

cppforlife avatar Nov 17 '20 20:11 cppforlife

One caveat that needs to be taken into account, specially when using this in combination with kapp-controller's packages is that we need to make sure that inputs that are fetched via vendir are not used as outputs (as they are) as you might be trying to install resources that another package installed and then getting owner conflicts.

jorgemoralespou avatar May 20 '21 15:05 jorgemoralespou