This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cat logins.json | jq ".logins[].hostname" | uniq | xargs nss-passwords -d . | grep direct |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| variant: fcos | |
| version: 1.0.0 | |
| storage: | |
| files: | |
| - path: /opt/file | |
| contents: | |
| inline: | | |
| #!/bin/bash | |
| set +x | |
| _prefix=${CONTAINER_INFRA_PREFIX:-docker.io/openstackmagnum/} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: nginx-deployment | |
| labels: | |
| app: nginx | |
| spec: | |
| replicas: 2 | |
| selector: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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} | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: manypods-deployment | |
| labels: | |
| app: manypods | |
| spec: | |
| replicas: 2 | |
| selector: | |
| matchLabels: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| +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") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| runc exec -t kube-apiserver bash |