Skip to content

Instantly share code, notes, and snippets.

View ervinb's full-sized avatar

Ervin Barta ervinb

View GitHub Profile
@ervinb
ervinb / kustomize_vars.md
Created August 24, 2022 09:05 — forked from hermanbanken/kustomize_vars.md
Kustomize Vars example

This was initially posted in an kubernetes-sigs/kustomize issue.

We are using Kustomize's vars feature. Initially we didn't understand how to use it for our purpose, but it is a 100% fit. One example is our Ingress resource, which looks like this:

# file: base/ingress.yaml
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: services
@ervinb
ervinb / how-to-download-gzipped-file-request-node.js
Created January 3, 2020 07:53
How to download gzipped file with request and Node.js
const request = require('request-promise-native');
const os = require('os');
const fs = require('fs-extra');
const res = await request.get('http://link.to/some-gzipped-image.jpg', {
gzip: true,
resolveWithFullResponse: true, // optional, otherwise replace `res.body` with just `res` below
encoding: null
});
@ervinb
ervinb / Jenkinsfile
Created October 30, 2019 09:34 — forked from jonico/Jenkinsfile
Example for a full blown Jenkins pipeline script with multiple stages, kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, stage timeouts, stage c…
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
spec:
containers:
- name: mvn
image: maven:3.3.9-jdk-8-alpine
@ervinb
ervinb / devops_best_practices.md
Created November 18, 2017 18:27 — forked from jpswade/devops_best_practices.md
Devops Best Practices

DevOps started out as "Agile Systems Administration". In 2008, Andrew Shafer did a talk called "Agile Infrastucture" addressing issues around involving more of the company in the same disciplines as programmers.

In 2009, Patrick Debois created "DevOpsDays" conference to help to bring it to light. However, it wouldn't begin to trend until about 2010, when people would begin to describe it as a standalone discipline.

Today, DevOps goes beyond just developers, systems administration and infrastructure, its about [dev, ops, agile, cloud, open source and business](https://blogs.the451group.com/opensource/2010/03/03/devops-mixing-dev-ops-agile-cloud-open-source-and-busi

DEB="thrift_0.9.3-1_amd64.deb"
URL="https://s3-us-west-2.amazonaws.com/container-libraries/$DEB"
if ! [ -e $SEMAPHORE_CACHE_DIR/$DEB ]; then (cd $SEMAPHORE_CACHE_DIR; wget $URL); fi
sudo dpkg -i $SEMAPHORE_CACHE_DIR/$DEB
echo "$(thrift --version) installed"