Skip to content

Instantly share code, notes, and snippets.

View mjudeikis's full-sized avatar
👽
Brewing something new...

Mangirdas Judeikis mjudeikis

👽
Brewing something new...
View GitHub Profile
@mjudeikis
mjudeikis / xml.go
Created January 16, 2019 18:29 — forked from jim-minter/xml.go
package main
import (
"bytes"
"encoding/xml"
"os"
"text/template"
)
var tmpl = `
@mjudeikis
mjudeikis / Prometheus operator logs
Last active January 2, 2019 15:16
prometheus-operator-logs
ts=2019-01-02T14:32:09.335548784Z caller=main.go:130 msg="Starting Prometheus Operator version '0.23.2'."
level=info ts=2019-01-02T14:32:09.396327183Z caller=operator.go:176 component=alertmanageroperator msg="connection established" cluster-version=v1.11.0+d4cacc0
level=info ts=2019-01-02T14:32:09.401050498Z caller=operator.go:320 component=prometheusoperator msg="connection established" cluster-version=v1.11.0+d4cacc0
level=info ts=2019-01-02T14:32:09.509153252Z caller=operator.go:559 component=alertmanageroperator msg="CRD created" crd=Alertmanager
level=info ts=2019-01-02T14:32:09.516055775Z caller=operator.go:1351 component=prometheusoperator msg="CRD created" crd=Prometheus
level=info ts=2019-01-02T14:32:09.605917069Z caller=operator.go:1351 component=prometheusoperator msg="CRD created" crd=ServiceMonitor
level=info ts=2019-01-02T14:32:09.864429916Z caller=operator.go:1351 component=prometheusoperator msg="CRD created" crd=PrometheusRule
level=info ts=2019-01-02T14:32:12.54020268Z caller=operator.go:19
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
@mjudeikis
mjudeikis / cert_load.go
Created November 14, 2018 11:18 — forked from ukautz/cert_load.go
Go: Load all .pem files containing private key and certificate(s) from directory
package common
import (
"crypto"
"crypto/ecdsa"
"crypto/rsa"
"crypto/tls"
"crypto/x509"
"encoding/pem"
"fmt"
@mjudeikis
mjudeikis / update-vmss-ssh-key.sh
Created November 9, 2018 10:05 — forked from agolomoodysaada/update-vmss-ssh-key.sh
Azure Virtual Machine Scale Set(VMSS) Reset SSH KEY
az vmss extension set \
--vmss-name <vmss-name> \
-g <resource-group> \
-n VMAccessForLinux \
--publisher Microsoft.OSTCExtensions \
--version 1.4 \
--protected-settings "{\"username\":\"deploy_user\", \"ssh_key\":\"$(cat ~/.ssh/id_rsa.pub)\"}"
# Upgrade ALL instances in the scale set with the new key
az vmss update-instances --instance-ids '*'
-n <vmss-name>
apiVersion: v1
kind: Template
metadata:
creationTimestamp: null
name: project-request
objects:
- apiVersion: project.openshift.io/v1
kind: Project
metadata:
annotations:
masterConfig, err := Asset("master-config/master-config.yaml")
if err != nil {
panic(err)
}
log.Debug(string(masterConfig))
var o unstructured.Unstructured
err = yaml.Unmarshal(masterConfig, &o)
if err != nil {
panic(err)
https://storage.googleapis.com/origin-ci-test/pr-logs/pull/openshift_openshift-azure/264/pull-ci-openshift-azure/423/build-log.txt
https://storage.googleapis.com/origin-ci-test/pr-logs/pull/openshift_openshift-azure/268/pull-ci-openshift-azure/439/build-log.txt
https://storage.googleapis.com/origin-ci-test/pr-logs/pull/openshift_openshift-azure/268/pull-ci-openshift-azure/443/build-log.txt
https://storage.googleapis.com/origin-ci-test/pr-logs/pull/openshift_openshift-azure/276/pull-ci-openshift-azure/442/build-log.txt
https://storage.googleapis.com/origin-ci-test/pr-logs/pull/openshift_openshift-azure/283/pull-ci-openshift-azure/506/build-log.txt
https://storage.googleapis.com/origin-ci-test/pr-logs/pull/openshift_openshift-azure/291/pull-ci-openshift-azure/487/build-log.txt
https://storage.googleapis.com/origin-ci-test/pr-logs/pull/openshift_openshift-azure/323/pull-ci-openshift-azure/647/build-log.txt
https://storage.googleapis.com/origin-ci-test/pr-logs/pull/openshift_openshift-azure/323/pull-ci-openshift-
@mjudeikis
mjudeikis / gist:679fbc168ecce80082283faf9b0b9645
Last active September 13, 2018 12:33
storage-retry-kubernetes
#!/bin/bash -e
for i in `seq 1 50`; do
echo "Create pod $i"
echo ""
oc new-project storage-stress
cat <<EOF | oc create -f -
apiVersion: apps/v1
[mjudeiki@redhat origin]$ oc get is -n ci-op-l1fxyi0f
NAME DOCKER REPO TAGS UPDATED
pipeline registry.svc.ci.openshift.org/ci-op-l1fxyi0f/pipeline prometheus-sidecar,purge,bin + 3 more... 12 minutes ago
stable registry.svc.ci.openshift.org/ci-op-l1fxyi0f/stable prometheus-sidecar,purge,logging-fluentd + 36 more... 12 minutes ago