che-incubator / kubernetes-image-puller

Kubernetes Image Puller is used for caching images on a cluster. It creates a DaemonSet downloading and running the relevant container images on each node.
https://www.eclipse.org/che/docs/che-7/administration-guide/caching-images-for-faster-workspace-start/
Eclipse Public License 2.0
191 stars 30 forks source link

[feature request] - support for multiple node selectors #94

Open vikas027 opened 2 years ago

vikas027 commented 2 years ago

It would be good to have support for multiple node selectors with a map like this

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: k8s-image-puller
data:
  NODES:
    - IMAGES: "alpine=alpine:3.12; alpine13=alpine:3.13; alpine-minimal=vikas027/alpine:minimal;"
      DAEMONSET_NAME: "kubernetes-image-puller"
      CACHING_INTERVAL_HOURS: "1"
      NAMESPACE: "k8s-image-puller""
      NODE_SELECTOR:
        app: abcd1
      IMAGE_PULL_SECRETS: "some secret"
    - IMAGES: "alpine3=alpine:3.0;"
      DAEMONSET_NAME: "kubernetes-image-puller"
      CACHING_INTERVAL_HOURS: "1"
      NAMESPACE: "k8s-image-puller""
      NODE_SELECTOR:
        app: abcd2
ibuziuk commented 2 years ago

@vikas027 contributions are most welcome ;-)