Ansible role for kubectl command with resource checking
Get list of required kubernetes resources on cluster
tasks:
- hosts: localhost | |
vars: | |
k8s_namespaces: | |
- argocd-system | |
- monitoring-system | |
tasks: | |
- include_tasks: fetcher-role-v2.yaml | |
- include_tasks: kubectl-role.yaml |
Simple kubernetes namespace context switcher (with autocompletion)
functions.sh
function kn {
kubectl config set-context --current --namespace=$1
}
function knx {
#!/usr/bin/env python3.7 | |
""" | |
Auto_Dark_Mode_Colors auto set profile colors based on iTerm2 theme. | |
To configure, update the mapping in `PROFILE_PRESETS` such that the profile | |
name maps to the light and dark presets you'd like to use. | |
""" | |
import asyncio | |
import iterm2 |
from exchangelib import Credentials, Account, Configuration, ServiceAccount, FileAttachment, ItemAttachment, Message, CalendarItem, HTMLBody, NTLM, DELEGATE, IMPERSONATION | |
from exchangelib.protocol import BaseProtocol, NoVerifyHTTPAdapter | |
import os.path | |
credentials = Credentials('DOMAIN\\DOMAIN_USER', 'PASSWORD') | |
config = Configuration(server='mail.server.cz', | |
credentials=credentials, auth_type=NTLM) | |
account = Account('user@server.cz', autodiscover=True, | |
credentials=credentials) |
SELECT obec.nazev, momc.nazev, cast_obce.nazev, COUNT(DISTINCT ulice.nazev) AS pocet_ulic FROM adresni_bod | |
INNER JOIN obec ON adresni_bod.obec_kod = obec.kod AND obec.nazev = 'Praha' | |
INNER JOIN ulice ON adresni_bod.ulice_kod = ulice.kod | |
INNER JOIN cast_obce ON adresni_bod.cast_obce_kod = cast_obce.kod | |
INNER JOIN momc ON adresni_bod.momc_kod = momc.kod | |
GROUP BY obec.nazev, momc.nazev, cast_obce.nazev WITH ROLLUP; |