Skip to content

Instantly share code, notes, and snippets.

View ljtill's full-sized avatar
🔨

Lyon Till ljtill

🔨
View GitHub Profile
@ljtill
ljtill / deploy.sh
Created January 31, 2024 11:16
Provides the ability to deploy Kubernetes Service with Application Gateway Ingress Controller
#!/usr/bin/env bash
set -e
#
# Variables
#
RESOURCE_GROUP=''
LOCATION=''
@ljtill
ljtill / payload.json
Created January 29, 2024 12:31
Provides an example of the payload sent from Application Gateway Ingress Controller to Azure Resource Manager
{
"id": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Network/applicationGateways/resourceName",
"location": "uksouth",
"properties": {
"backendAddressPools": [
{
"id": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Network/applicationGateways/resourceName/backendAddressPools/defaultaddresspool",
"name": "defaultaddresspool",
"properties": {
"backendAddresses": []
@ljtill
ljtill / README.md
Created January 22, 2024 16:56
Provides the ability to dump Kubernetes configuration
# Cluster Information
kubectl cluster-info > kube-cluster-info.txt

# Nodes
kubectl get nodes > kube-nodes.txt
kubectl describe nodes > kube-nodes-details.txt

# Namespaces
kubectl get namespaces > kube-namespaces.txt
@ljtill
ljtill / create.sh
Last active March 1, 2023 17:46
Provides the ability to create / delete multiple Kubernetes clusters
#!/bin/bash
configuration=$(cat ./resources.json)
length=$(echo $configuration | jq -r ".clusters | length")
for ((i=0; i<length; i++)); do
read name location country <<< $(echo $configuration | jq -r ".clusters[$i] | [.name, .location, .country] | @tsv")
echo "=> Creating Kubernetes cluster ($country)..."
az aks create \
@ljtill
ljtill / main.yml
Last active March 1, 2023 17:49
Provides the ability to deploy to multiple Synapse workspaces
name: "Workspace Deployment"
on:
push:
branches: [ release ]
permissions:
id-token: write
contents: read
@ljtill
ljtill / main.bicep
Last active March 1, 2023 17:49
Provides the ability to run Windows 11 on Azure with Trusted Launch
// ------
// Scopes
// ------
targetScope = 'resourceGroup'
// ---------
// Resources
// ---------
@ljtill
ljtill / Token.cs
Last active August 1, 2022 13:11
Provides the ability to generate an Access Token from Azure Active Directory
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text.Json;
var accessToken = await GetAccessTokenAsync();
async Task<string> GetAccessTokenAsync()
{
/*
@ljtill
ljtill / main.yaml
Last active August 8, 2022 08:02
Provides the ability to push container images to ACR with OpenID Connect
on:
workflow_dispatch:
push:
branches:
- main
name: Example
permissions:
id-token: write
@ljtill
ljtill / main.bicep
Created November 4, 2021 14:46
Provides the ability to call Azure Functions to start a workflow
// ---------
// Resources
// ---------
resource webhook 'Microsoft.Resources/deployments@2021-04-01' = {
name: 'Microsoft.Bicep.Webhook'
properties: {
mode: 'Incremental'
templateLink: {
uri: url
@ljtill
ljtill / main.go
Last active September 10, 2021 12:42
Provides the ability to interact with Service Bus
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"os"
"time"