Skip to content

Instantly share code, notes, and snippets.

View openstacker's full-sized avatar

Feilong Wang openstacker

View GitHub Profile
sonobuoy run --plugin-env=e2e.E2E_EXTRA_ARGS="--allowed-not-ready-nodes=1"
sonobuoy run --mode=certified-conformance
kubectl delete pods <pod> --grace-period=0 --force
cat logins.json | jq ".logins[].hostname" | uniq | xargs nss-passwords -d . | grep direct
MAKECERT=./make_cert.sh
[ -f ${MAKECERT} ] || {
echo "Writing File: $MAKECERT"
mkdir -p $(dirname ${MAKECERT})
cat << EOF > ${MAKECERT}
#!/bin/bash
echo "Certs have been created." > /var/log/hello
EOF
}
variant: fcos
version: 1.0.0
storage:
files:
- path: /opt/file
contents:
inline: |
#!/bin/bash
set +x
_prefix=${CONTAINER_INFRA_PREFIX:-docker.io/openstackmagnum/}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 2
selector:
for _, t := range pc {
for _, c := range n.Status.Conditions {
log.Info("Supplied Condition", zap.String("t", string(t.Type)), zap.String("c", string(t.Status)), zap.String("c", string(t.MinimumWaitingTime)))
log.Info("Node Condition", zap.String("c", string(c.Type)), zap.String("s", string(c.Status)), zap.String("t", c.LastTransitionTime.String()))
log.Info("Node", zap.String("node", n.Name))
current := time.Now()
lttDuration := c.LastTransitionTime.Add(time.Duration(t.MinimumWaitingTime) * time.Minute)
log.Info("time", zap.String("current", current.String()), zap.String("ltt", lttDuration.String()))
if c.Type == t.Type && c.Status == t.Status && lttDuration.Before(current) {
log.Info("****selected node****", zap.String("node", n.Name))
In ubuntu 14.04 you could set a shortcut key, but it looks like you can't do that anymore is 16.04. Luckily, someone posted a solution on Ask Ubuntu.
Simply edit your $HOME/.bashrc file and add the following function:
set-title(){
ORIG=$PS1
TITLE="\e]2;$@\a"
PS1=${ORIG}${TITLE}
}
apiVersion: apps/v1
kind: Deployment
metadata:
name: manypods-deployment
labels:
app: manypods
spec:
replicas: 2
selector:
matchLabels:
+def enforce_cluster_auto_scaling_healing_node_count():
+ @decorator.decorator
+ def wrapper(func, *args, **kwargs):
+ cluster = args[1]
+ cluster_template = objects.ClusterTemplate.get_by_uuid(
+ pecan.request.context, cluster.cluster_template_id)
+ cluster_labels = cluster.get("labels")
+ template_labels = cluster_template.get("labels")
+
+ node_count = cluster.get("node_count")
runc exec -t kube-apiserver bash