Skip to content

Instantly share code, notes, and snippets.

Avatar
🌴
On vacation

abdennour abdennour

🌴
On vacation
View GitHub Profile
@abdennour
abdennour / ingress-kube-apiserver.yaml
Created Apr 18, 2021
expose kube-apiserver thru ingress
View ingress-kube-apiserver.yaml
kind: Ingress
metadata:
name: kubeapi
namespace: default
annotations:
nginx.ingress.kubernetes.io/secure-backends: "true"
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
spec:
rules:
- host: "api.devops.example.com"
View go-lang-sheet-cheat.md

Value Types vs Reference Types

When using Value types, Use pointers to modify these things in a function

Value Types Reference Types
int slices
float maps
string channels
boot pointers
View README.md
server:
  config:
    # https://github.com/argoproj/argo-cd/blob/master/docs/user-guide/config-management-plugins.md#plugins

    configManagementPlugins: |
      - name: vault
        init:
          command: ["/bin/sh", "-c"]
@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