Skip to content

Instantly share code, notes, and snippets.

Avatar
🌴
On vacation

abdennour abdennour

🌴
On vacation
View GitHub Profile
@abdennour
abdennour / 00-infra.yaml
Last active Jan 20, 2021
Jenkins declarative Pipeline in Kubernetes with Parallel and Sequential steps
View 00-infra.yaml
apiVersion: v1
kind: Pod
spec:
# dnsConfig:
# options:
# - name: ndots
# value: "1"
containers:
- name: dind
image: abdennour/docker:19-dind-bash
@abdennour
abdennour / README.md
Last active Nov 25, 2020
Nginx Reverse Proxy for Nexus Docker Registries
View README.md

Overview

This is a solution of a common problem with Nexus Docker repositories. The administrator has to expose port for "pull", another port for "push", other ports for each hosted repository. This solution is about leveraging Nginx reverse proxy to avoid using these ports.

How it works ?

Given :

  • Nexus hostname is "nexus.example.com"
  • Nexus web port is 8081
@abdennour
abdennour / expand-pvc.md
Last active Aug 26, 2020
Expand kubernetes PVC - Fix No space left on device
View expand-pvc.md

0. Collect these info

  • What's your PVC which has space issue ?
  • What's the StorageClassName of that PVC ?

1. Make sure StorageClassName has the following prop :

allowVolumeExpansion: true
@abdennour
abdennour / vault-auth-k8s-method.sh
Last active Aug 4, 2020
Vault - Enable Kubernetes Auth Method
View vault-auth-k8s-method.sh
# $1: vault namespace
# $2: Vault Token Reviewer Service Account
vault_namespace=${1:-"vault"}
token_reviewer_sa=${2:-"vault"}
if [ -z "${VAULT_TOKEN}" ] || [ -z "${VAULT_ADDR}" ]; then
echo "ERROR: VAULT_TOKEN and VAULT_ADDR env vars are required"
exit 404
fi
cat <<EOF | kubectl apply -f -
@abdennour
abdennour / README.md
Created Jul 26, 2020
README.md how to write it following Best practices
View README.md

Overview

This gist is about a collection of lectures about how to write a good README

01. introduction

https://youtu.be/zYyRDFx3e28

02. What's documentation

@abdennour
abdennour / README.md
Created Jul 26, 2020
README.md how to write it following Best practices
View README.md

Overview

This gist is about a collection of lectures about how to write a good README

01. introduction

https://youtu.be/zYyRDFx3e28

02. What's documentation

@abdennour
abdennour / vault-read-write-yaml.sh
Last active Jul 23, 2020
vault read write utils
View vault-read-write-yaml.sh
read_vault_data()
{
vault read -field=value $VAULT_SECRET_PATH/config > config.yaml
}
write_vault_data()
{
vault write $VAULT_SECRET_PATH/config value=@config.yaml
}
@abdennour
abdennour / 00-about.html
Last active Jul 15, 2020
Vault AppRole Auth Method - Grant Access To App (Jenkins) to get secrets from Vault
View 00-about.html
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAysAAAFUCAYAAAAkvKNhAAAAAXNSR0IArs4c6QAAQABJREFUeAHsnQeAFMXSgIuckyJJRESfAUQUlIwkQREUJUlQAUHMOef0zPmZE4qBjAqKJFEQJCmKYlYEURAVERAkM3997d/L3HJ3XNi9292r1mVnZ3o6fDM309UVulCgSSwZASNgBIyAETACRsAIGAEjYAQSjEDhBGuPNccIGAEjYASMgBEwAkbACBgBI+AImLBiN4IRMAJGwAgYASNgBIyAETACCUnAhJWEvCzWKCNgBIyAETACRsAIGAEjYARMWLF7wAgYASNgBIyAETACRsAIGIGEJGDCSkJeFmuUETACRsAIGAEjYASMgBEwAias2D1gBIyAETACRsAIGAEjYASMQEISMGElIS9LajXq119/le+++0527NiRWh3T3vz222/y9ddfy/bt2+Patz/++EO++uor2bZtW0zq2bRpk8yePVumTJki33zzjezcuTMm5VohRsAIGAEjYASMgBGIJYGisSwskcv6+eef3WDvhx9+kH79+knFihVj0lzK/fDDD+Wzzz6T33//Xfbaay857LDD5Oijj5b69etLoUKFYlJPMhfy4IMPyoQJExynffbZR7Zu3SpTp06VGjVqSMOGDZO5a/LUU0/Jc889JwsXLpRq1arFrS/Dhg2Tu+66S7744gvHLTcVrV69Wvr06ePu2UqVKsl+++0nr7/+upQvXz43xdq5RsAIGAEjYASMgBGIOYGUF1YYGA8YMEDmzJkjzPAzODv11FNzLawwE/3aa6/J1Vdf7QbfCCYVKlSQzz//XJ555hmpXbu2zJs3T0qXLh3zi5ZegcyUFy9eXIoUKZLe4Xzd988//8i6devErz/6999/S+/evaV79+7CIDyZE9zXrl0bd83E5s2bY1bP2LFj5d1335WZM2fKkUceKWvWrMmz+zSZr7W13QgYASNgBIyAEch7Aikv