Skip to content

Instantly share code, notes, and snippets.

View verchol's full-sized avatar

Oleg Verhovsky verchol

View GitHub Profile
apiVersion: v1
kind: Pod
metadata:
namespace : oleg
name: myapp-pod
labels:
app: myapp
spec:
containers:
- name: myfirst-container
@verchol
verchol / gosetup
Last active May 28, 2019 22:43
Go Cache Setup
#!/bin/bash
export GOPATH=/codefresh/volume/.go
export GOCACHE=/codefresh/volume/caches/go-build
cf_export GOPATH=$GOPATH
cf_export GOCACHE=$GOCACHE
if [ ! -d "/codefresh/volume/.go" ]; then
mkdir -p /codefresh/volume/.go
echo "gopath folder has created , should not be created later"
fi
@verchol
verchol / languages->go
Created May 12, 2019 08:46
setup script for go setting in ci
#!/bin/bash
export GOPATH=/codefresh/volume/.go
export GOCACHE=/codefresh/volume/caches/go-build
cf_export GOPATH=$GOPATH
cf_export GOCACHE=$GOCACHE
if [ ! -d "/codefresh/volume/.go" ]; then
mkdir -p /codefresh/volume/.go
echo "gopath folder has created , should not be created later"
fi
@verchol
verchol / helm=>package
Last active March 13, 2018 13:57
helm package and export to chart museum
export PACKAGE=$(helm package $CF_VOLUME_PATH /cf-ui/cfui --version $CHRAT_FULL_SEMVER --destination $CF_VOLUME_PATH | cut -d " " -f 8 )
curl --user $BASIC_AUTH_USER:$BASIC_AUTH_PASS --fail --data-binary "@$PACKAGE" $HELM_REPO_FULL_PATH
@verchol
verchol / kubernetes_add_service_account_kubeconfig.sh
Created January 18, 2018 22:18 — forked from vdboor/kubernetes_add_service_account_kubeconfig.sh
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the user
#!/bin/bash
# Add user to k8s 1.6 using service account, no RBAC (must create RBAC after this script)
if [[ -z “$1” ]] || [[ -z “$2” ]];then
echo “usage: $0 <username> <environment (stg|prod)>”
exit 1
fi
USER=$1
environment=$2
@verchol
verchol / kubernetes_add_service_account_kubeconfig.sh
Created January 18, 2018 22:18 — forked from vdboor/kubernetes_add_service_account_kubeconfig.sh
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the user
#!/bin/bash
# Add user to k8s 1.6 using service account, no RBAC (must create RBAC after this script)
if [[ -z “$1” ]] || [[ -z “$2” ]];then
echo “usage: $0 <username> <environment (stg|prod)>”
exit 1
fi
USER=$1
environment=$2
@verchol
verchol / kubernetes_add_service_account_kubeconfig.sh
Created January 18, 2018 22:18 — forked from innovia/kubernetes_add_service_account_kubeconfig.sh
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the user
#!/bin/bash
# Add user to k8s 1.6 using service account, no RBAC (must create RBAC after this script)
if [[ -z “$1” ]] || [[ -z “$2” ]];then
echo “usage: $0 <username> <environment (stg|prod)>”
exit 1
fi
USER=$1
environment=$2
const yargs = require('yargs');
const assert = require('assert');
const _ = require('lodash');
const run = require('./run');
run.subCommand({
command: "pipeline",
description : "run pipeline",
handler : ()=>{
console.log('run pipeline ->');
const yargs = require('yargs');
const assert = require('assert');
const _ = require('lodash');
class TopCommand {
constructor(command){
this.command = command;
this.subCommands = [];
}
subCommand(command){
@verchol
verchol / gist:9b9005ecacef10ad8d518b72b44ff32f
Created November 14, 2017 18:44
using kefir and nodejs stream
const { Duplex } = require('stream');
const kefir = require('kefir');
class MyWritable extends Duplex {
constructor(options) {
// Calls the stream.Writable() constructor
super(options);
this.buffer = [];
// ...
}