Skip to content

Instantly share code, notes, and snippets.

View DWSR's full-sized avatar

Brandon McNama DWSR

  • Ford Motor Company
  • Toronto, Ontario, Canada
View GitHub Profile
@DWSR
DWSR / rant.md
Created November 22, 2022 17:01
For the love of all things sacred, please stop using Helm

Helm attempts to solve a specific problem: How do you package up a bunch of Kubernetes manifests in a way that's (relatively) easy to consume.

For simple applications, this works out pretty well. You get a few knobs to tweak on the installation (such as whether or not you want the Chart to create RBAC resources), Helm renders a stream of YAML and then applies it to your cluster. Where this breaks down is when you try to do anything more complex, and that break down happens in 2 areas: Maintenance and Usability

Sufficiently complex (read: any) Helm charts can be thought of as a piece of software. It takes a series of inputs (the values) and produces a series of outputs (the YAML stream of Kubernetes objects). With "traditional" languages, there's facilities for syntax checking, static analysis, testing, etc. that help ensure the software both functions correctly now and in the future. The Helm ecosystem has some of those same things (e.g. helm lint) as well, however they're generally limited to treating th

Keybase proof

I hereby claim:

  • I am dwsr on github.
  • I am dwsr (https://keybase.io/dwsr) on keybase.
  • I have a public key whose fingerprint is 2EAC D8FE CD3B 3DD7 83A9 0545 40F7 6262 AFD9 82E3

To claim this, I am signing this object:

@DWSR
DWSR / generate_known_hosts.rb
Created September 17, 2019 13:59
Generate an SSH known_hosts file from all nodes on a Chef Server
#!/opt/chef/embedded/bin/ruby
require 'chef'
require 'logger'
config_file = '/etc/chef/client.rb'
known_hosts_file = "#{ENV['HOME']}/known_hosts"
known_hosts = []
logger = Logger.new(STDOUT)
# Change to Logger::DEBUG for debug output
@DWSR
DWSR / LICENSE.txt
Last active December 4, 2022 17:52
CloudSQL MySQL instance with scheduled exports via Cloud Function. Licensed under Apache 2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
function Import-GoogleToEXOGroup {
<#
.SYNOPSIS
Import CSV of Google Groups into Office 365 as Distribution Groups
.DESCRIPTION
Import CSV of Google Groups into Office 365 as Distribution Groups
.PARAMETER Group
# Get the ID and security principal of the current user account
$myWindowsID=[System.Security.Principal.WindowsIdentity]::GetCurrent()
$myWindowsPrincipal=new-object System.Security.Principal.WindowsPrincipal($myWindowsID)
# Get the security principal for the Administrator role
$adminRole=[System.Security.Principal.WindowsBuiltInRole]::Administrator
# Check to see if we are currently running "as Administrator"
if ($myWindowsPrincipal.IsInRole($adminRole))
{
# Get the ID and security principal of the current user account
$myWindowsID=[System.Security.Principal.WindowsIdentity]::GetCurrent()
$myWindowsPrincipal=new-object System.Security.Principal.WindowsPrincipal($myWindowsID)
# Get the security principal for the Administrator role
function Get-LAFolderSize {
Param(
[Parameter(
Mandatory = $true,
ValueFromPipelineByPropertyName = $true,
ValueFromPipeline = $true
)]
[String]$upn
)
Begin {
$SSO=get-content '.\Take out list (jay).txt'
$csv=import-csv .\MobileIron_Report_May_9_2017.csv
$CSV | ?{$SSO -contains $CSV."User ID"}
#Sample excel db
User ID Display Name
200000058 Monfiglio, Carlos (SSGA, Non-GE)
200000385 Golden, Hugh (SSGA, Non-GE)
#Sample SSO txt
function Check-EmailAddress {
[CmdletBinding()]
[OutputType([Boolean])]
Param(
[Parameter(Mandatory = $true,Position = 0)
[String]$EmailAddress
)
Begin {
#nothing
}