№ 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
№ 10306 В разделах: Programming
Sysadmin
от September 17th, 2019,
В подшивках: Go, Kubernetes, Kubernetes Operator, Operator SDK
Helps to control multiple cronjobs with same image, but different commands.
Checkout code and documentation https://git.blindage.org/21h/cron-operator
№ 10268 В разделе "Programming"
от August 30th, 2019,
В подшивках: Go, Operator SDK
1) Install operator-sdk on your computer https://github.com/operator-framework/operator-sdk/blob/master/doc/user/install-operator-sdk.md. I prefer to install into $GOPATH/bin
.
2) create script somewhere like /opt/bootstrap_operator.sh
#!/bin/bash set -e REPO="git.blindage.org/21h/redis-operator" API_VERSION="blindage.org/v1alpha1" KIND="Redis" NAME="redis-operator" # operator sdk export GO111MODULE=on echo "Bootstraping ${NAME}" operator-sdk new ${NAME} --git-init --repo ${REPO} --verbose cd ${NAME} echo "Adding API ${API_VERSION}" operator-sdk add api --api-version=${API_VERSION} --kind=${KIND} --verbose echo "Creating controller" operator-sdk add controller --api-version=${API_VERSION} --kind=${KIND} --verbose
3) change directory to your “~/dev
” and run script bash /opt/bootstrap_operator.sh
, it will create new directory “~/dev/redis-operator
”
4) build your new operator, pack to image operator-sdk build redis-operator
5) push new image to registry with docker push myregistry.ru/redis-operator
№ 10254 В разделах: Programming
Sysadmin
от August 27th, 2019,
В подшивках: Go, Kubernetes, Kubernetes Operator, Operator SDK, Redis
Redis operator runs Sentinel and Redis, makes Redis high available with HAProxy.
№ 10248 В разделах: Programming
Sysadmin
от August 23rd, 2019,
В подшивках: Go, Kubernetes, Kubernetes Operator, MQTT, Operator SDK
Run multiple MQTT instances in your Kubernetes cluster. Can store persistent database.
Documentation and download here https://git.blindage.org/21h/mqtt-operator
Fortune cookie: Old Mother Hubbard, Went to the cubbard, To get her poor doggie a bone. But when she stooped over, Old Rover, he drove her. You see, he had a bone of his own.