Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexey Igrychev alexey-igrychev

View GitHub Profile
View multiwerf-1.json
{
"multiwerf": [
{
"group": "0.0",
"channels": [
{
"name": "alpha",
"version": "v0.0.1"
},
{
View cleanup_test_k8s.sh
#!/bin/bash
namespacePrefix=${1:-test-}
deltaTS=${2:-$((60 * 60 * 24))}
namespaces=$(kubectl get namespace -o json | jq -r "[.items[] | {name: .metadata.name, startTime: .metadata.creationTimestamp | fromdate } | select(.startTime < (now | . - $deltaTS))]" | jq -r ".[].name" | grep $namespacePrefix)
for namespace in $namespaces; do
kubectl delete ns $namespace
done
View cleanup_test_docker_registry.sh
#!/bin/bash
docker exec ${1:-registry} sh -c " \
find /var/lib/registry/docker/registry/v2/repositories/ -type d -maxdepth 1 -mindepth 1 -mtime +1 -exec rm -rf {} \; && \
/entrypoint.sh bin/registry garbage-collect /etc/docker/registry/config.yml"
View helm_adopter.sh
#!/bin/bash
function helm::adopt() {
local chart_name=${1}
local release_name=${2}
local manifest_file_path=${3}
local tiller_namespace=${4:-kube-system}
# Check that the release has not been created yet
if [[ "$(kubectl get -n ${tiller_namespace} cm -l NAME=${release_name},OWNER=TILLER -o name)" != "" ]] ; then
You can’t perform that action at this time.