Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:
sysctl -a | grep machdep.cpu.features | grep VMX
If there's output, you're good!
/* ========================================================================== | |
10 SASS (SCSS) mixins you should be using in your projects | Engage | |
http://engageinteractive.co.uk/blog/top-10-scss-mixins | |
========================================================================== */ | |
/* ========================================================================== | |
To quickly centre a block element without having to worry about if there is any top or bottom margin already applied. | |
========================================================================== */ |
import functools | |
from django.db.models import Prefetch, QuerySet | |
import attr | |
import graphene | |
from cursor_pagination import CursorPaginator | |
from graphene.utils.str_converters import to_snake_case | |
from graphql_relay import connection_from_list |
Kafka 0.11.0.0 (Confluent 3.3.0) added support to manipulate offsets for a consumer group via cli kafka-consumer-groups
command.
kafka-consumer-groups --bootstrap-server <kafkahost:port> --group <group_id> --describe
Note the values under "CURRENT-OFFSET" and "LOG-END-OFFSET". "CURRENT-OFFSET" is the offset where this consumer group is currently at in each of the partitions.
Hopefully helped another k8s newbie with the following. The question was, how do you update a single key in a secret in k8s? I don't know anything about secrets but I will probably want to know this in the future, so here we go.
First, to create a dummy secret:
apiVersion: v1
kind: Secret
metadata:
name: test-secret
data:
Multiple inheritance can lead to multi level diamond diagram. In Python it is solved by C3 linearization.
Python doesn't need DI because it has super()
. It doesn't work like parent()
in other Typed programming languages such as Java or PHP.
In multiple inheritance super()
doesn't call the parents but the ancestors:
class Adam(): pass
A lot of people land when trying to find out how to calculate CPU usage metric correctly in prometheus, myself included! So I'll post what I eventually ended up using as I think it's still a little difficult trying to tie together all the snippets of info here and elsewhere.
This is specific to k8s and containers that have CPU limits set.
To show CPU usage as a percentage of the limit given to the container, this is the Prometheus query we used to create nice graphs in Grafana:
sum(rate(container_cpu_usage_seconds_total{name!~".*prometheus.*", image!="", container_name!="POD"}[5m])) by (pod_name, container_name) /