INT 21h

Hi, I am Vladimir Smagin, SysAdmin, DevOps and barely good guy. Telegram Email / GIT / Микроблог / Thingiverse / GPG

Django operator for Kubernetes

№ 10240 В разделах: Администрирование Программирование от August 22nd, 2019,

You can run projects with collectstatic and migrations at init stage, provide ENVs, service and pods annotations.

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

PodRequests: default is empty
PodLimits: default is empty

Affinity and antiaffinity manual

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

Нет комментариев »

WordPress operator for Kubernetes

№ 10224 В разделах: Администрирование Программирование от August 18th, 2019,

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.

Нет комментариев »

scheme.AddGeneratedDeepCopyFuncs undefined

№ 10195 В разделе "Программирование" от August 9th, 2019,

pkg/apis/redis/v1/zz_generated.deepcopy.go:22:15: scheme.AddGeneratedDeepCopyFuncs undefined 
(type *"".Scheme has 
no field or method AddGeneratedDeepCopyFuncs)

pkg/apis/redis/v1/zz_generated.deepcopy.go:23:3: undefined: conversion.GeneratedDeepCopyFunc
pkg/apis/redis/v1/zz_generated.deepcopy.go:27:3: undefined: conversion.GeneratedDeepCopyFunc
pkg/apis/redis/v1/zz_generated.deepcopy.go:31:3: undefined: conversion.GeneratedDeepCopyFunc
pkg/apis/redis/v1/zz_generated.deepcopy.go:35:3: undefined: conversion.GeneratedDeepCopyFunc
pkg/apis/redis/v1/zz_generated.deepcopy.go:39:3: undefined: conversion.GeneratedDeepCopyFunc
pkg/apis/redis/v1/zz_generated.deepcopy.go:43:3: undefined: conversion.GeneratedDeepCopyFunc
pkg/apis/redis/v1/zz_generated.deepcopy.go:47:3: undefined: conversion.GeneratedDeepCopyFunc
pkg/apis/redis/v1/zz_generated.deepcopy.go:51:3: undefined: conversion.GeneratedDeepCopyFunc
pkg/apis/redis/v1/zz_generated.deepcopy.go:55:3: undefined: conversion.GeneratedDeepCopyFunc
pkg/apis/redis/v1/zz_generated.deepcopy.go:55:3: too many errors
^Cmake: *** [Makefile:14: bin/redis] Interrupt 

Update versions of client-go, api and apimachinery. Install code generation tools.

go get
go get
cd ~/go/src/
go install ./cmd/{defaulter-gen,client-gen,lister-gen,informer-gen,deepcopy-gen}

Now rebuild project.

Нет комментариев »

Splash: how to change user-agent with Lua in Bash

№ 10157 В разделах: Администрирование Программирование от August 3rd, 2019,

Before start install jq application, required to work with JSON, used to prepare lua script for sending to Splash API.

Create file named splash.lua

function main(splash, args)
  splash:set_user_agent('Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_2_1 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5H11 Safari/525.20')
  splash:set_viewport_size(800, 600)
  return splash:png()

Create bash script


JSON="{\"lua_source\":$(jq -Rs . < script.lua)}"

curl -s -X POST -H "Content-Type: application/json" -d "${JSON}" \
   "" -o out.png

Check result image

Нет комментариев »

Микроблог перейти

# 2019-09-12 07:54:26 все еще не работает, но можно фиксануть go mod с помощью replace => v0.0.0-20180902110319-2566ecd5

# 2019-09-10 13:58:22

офигенное хранилище абсолютно бесплатных svg

# 2019-09-09 16:29:21

Цикл статей тщательно разжевывающих Amazon IAM, очень рекомендую для прочтения

© Vladimir Smagin, 2005-2019. Копирование материалов без разрешения запрещено. GPG DA4CD0F5E222EA727D6A40C413BCE12E5618F071 *

Fortune cookie: Today's spam: Tired of being lonely? With a 9 inch monster, women will want you and men will envy you.