№ 11010 В разделе "Sysadmin"
от May 28th, 2020,
В подшивках: Go, Kubernetes, Kubernetes Operator, Operator SDK
For example, you have huge image with your software and running POD on node. When POD moving to another node your image downloads to new node minute or two. This operator forces nodes to download image before rescheduling, so POD starts faster.
It runs /bin/sh with infinite loop on specified image as DaemonSet with additional options like NodeSelector, Affinity or resource limits. You can specify custom command if your image not contains /bin/sh interpreter or you want to run own script.
Your first warmer:
apiVersion: blindage.org/v1alpha1 kind: WarmImage metadata: name: mongo4 spec: image: mongo version: "4" nodeSelector: node-role.kubernetes.io/master: ""
Now you warmed mongo:4 on all master nodes.
Repository here https://git.blindage.org/21h/warm-image-operator
Fortune cookie: "I threw out all the bath water, and there was no baby there." [Dan Barker, referring to the Bible in a debate, 1989]
Leave a Reply