Skip to content

Instantly share code, notes, and snippets.

# Get editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json'
# Inserts a blank line between shell prompts
add_newline = false
[line_break]
disabled = true
# Replace the '❯' symbol in the prompt with '➜'
tap "adoptopenjdk/openjdk"
tap "fairwindsops/tap"
tap "hashicorp/tap"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/core"
tap "int128/kubelogin"
brew "[email protected]"
brew "ansible"
brew "[email protected]"
import click
# Group for 'project' commands
@click.group()
def project():
pass
# Project commands
@project.command()
def list():
@asksven
asksven / backup-cronjob-config.yaml
Created April 2, 2023 14:49
Backup / Restore and error handling
apiVersion: v1
kind: ConfigMap
metadata:
name: backupcronjob-config
data:
backup.sh: |
#!/bin/bash
# Handler will be called if something fails
handler()
@asksven
asksven / deployment.yaml
Created March 19, 2023 16:22
simple statuspage for kubernetes
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: nginx
name: nginx-deployment
spec:
progressDeadlineSeconds: 600
replicas: 2
revisionHistoryLimit: 2
from os import environ
from jira import JIRA
# using jira : pip install jira==3.1.1
# Following env vars must be SET
# JIRA_URL
# JIRA_ACCESS_TOKEN
# JIRA_PROJECT
@asksven
asksven / deployment-final.yaml
Last active April 13, 2020 14:28
securing-kubernetes-configuration-result
kind: List
apiVersion: v1
items:
- apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: traefik
name: status
spec:
@asksven
asksven / deployment-start.yaml
Last active April 13, 2020 14:27
securing-kubernetes-configuration-starting-point
kind: List
apiVersion: v1
items:
- apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: traefik
name: status
spec:
hostname: k8s-rancher-vm
rancher:
network:
interfaces:
eth0:
dhcp: true
gateway: 192.168.178.1
docker:
engine: docker-18.09.6

Tips for faster feedback loops

lint your Dockerfile

  1. Install the hadolint binary: https://github.com/hadolint/hadolint/releases
  2. In VSCode install the hadolint extension
  3. Open a Dockerfile in VSCode and enjoy
  4. Add a lint job to your pipeline
lint_dockerfile: