
Ссылка на PDF: http://amp.gs/iJu6
И в эту же тему статья «The Service Mesh: What Every Software Engineer Needs to Know about the World's Most Over-Hyped Technology» http://amp.gs/iJJI и ее перевод http://amp.gs/iJuQ
#servicemesh #books
Size: a a a
don't actually upgrade [Kubernetes] clusters in place -- we spin up new clusters and migrate the workloads over.
Since we treat our clusters as throaway, we don't really have any hard dependencies on etcd persistence, so we have tended to not really need to do alot of etcd-specific management as a result.
LD PRELOAD
LD PRELOAD
тоже может пригодиться.ipython
In [1]: from string import Template
In [2]: t = Template('Where is my fucking $x')
In [3]: print (t.substitute({'x' : 'beer!'}))
Where is my fucking beer!
server host-1 host-1:1488 check maxconn "${HOST_MAXCONN}"
server host-2 host-2:1488 check maxconn "${HOST_MAXCONN}"
server host-3 host-3:1488 check maxconn "${HOST_MAXCONN}"
In [1]: from jinja2 import Template
In [2]: hosts = ['host-1', 'host-2', 'host-3']
In [3]: tpl = '''{% for host in hosts %}
...: server {{ host }} {{ host }}:1488 check maxconn "${HOST_MAXCONN}"
...: {% endfor %}'''
In [4]: template = Template(tpl)
In [6]: print(template.render(hosts=hosts))
server host-1 host-1:1488 check maxconn "${HOST_MAXCONN}"
server host-2 host-2:1488 check maxconn "${HOST_MAXCONN}"
server host-3 host-3:1488 check maxconn "${HOST_MAXCONN}"
In [1]: from jinja2 import Template
In [2]: variable = 1
In [3]: tpl = '''{% if variable == 1 %}Переменная равна одному!{% else %}Переменная = {{ variable }}{% endif %}'''
In [4]: template = Template(tpl)
In [5]: template.render(variable=variable)
Out[5]: 'Переменная равна одному!'
In [6]: variable = 4
In [7]: template.render(variable=variable)
Out[7]: 'Переменная = 4’