№ 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
№ 10240 В разделах: Programming
Sysadmin
от August 22nd, 2019,
В подшивках: Django, Go, Kubernetes, Kubernetes Operator, Operator SDK
You can run projects with collectstatic and migrations at init stage, provide ENVs, service and pods annotations.
https://git.blindage.org/21h/django-operator
Full Spec:
image specific settings
PullPolicy
: imagePullPolicy, default IfNotPresent
Image
: string, required, format “image:tag”
Replicas
: integer, default 1
manage resources
Read more about resources limiting here https://kubernetes.io/docs/concepts/policy/resource-quotas/
PodRequests
: default is empty
PodLimits
: default is empty
Affinity and antiaffinity manual https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
Affinity
: default is empty
set annotations to service and pod
ServiceAnnotations
: key: value dict, default is empty
PodAnnotations
: key: value dict, default is empty
application specific configuration
AppPort
: integer, internal application port, default 8000
AppEnv
: EnvVar array, default is empty
AppStaticPath
: string, path to static files, default /app/static
RunMigrate
: bool, run migrations at init stage, default False
RunCollectStatic
: bool, run collectstatic at init stage, default False
№ 10224 В разделах: Programming
Sysadmin
от August 18th, 2019,
В подшивках: Go, Kubernetes, Kubernetes Operator, Operator SDK, Wordpress
Run multiple WordPress instances in your Kubernetes cluster. Use internal or external database. Internal database means a single pod with MariaDB without any replication or clusterization, my WordPress operator is NOT MySQL operator. If you need database high availability use MySQL operator to create cluster.
Fortune cookie: Hunters make the best lovers; they go deeper into the bush, shoot more often and *always* eat what they shoot.