Skip to content

Instantly share code, notes, and snippets.

View houstondapaz's full-sized avatar

Houston da Paz houstondapaz

View GitHub Profile

In Helm 2, changing the release status to deployed lets you bypass the issue:

kubectl -n kube-system patch configmap [release name].[release version] --type=merge -p '{"metadata":{"labels":{"STATUS":"DEPLOYED"}}}'

Where:

  • release name is the name of the release you want to update.
  • release version is the current version of your release.

Note: Keep in mind that the solution above only serves to bypass the issue. You still need to make manual adjustments to add the missing resources.

@houstondapaz
houstondapaz / reset_branch.sh
Created October 13, 2021 17:47
Recreate branch at all owner repos
#!/usr/bin/env bash
RESET_BRANCH=development
GITHUB_USER_NAME=houstondapaz
GITHUB_OWNER=houstondapaz
GITHUB_TOKEN=
declare repositories=(`
for ((i=0; ; i++)); do
current_repositories=$(curl -u $GITHUB_USER_NAME:$GITHUB_TOKEN https://api.github.com/orgs/$GITHUB_OWNER/repos\?page\=$i\&per_page\=100\&type\=private | jq -c 'map( { "name": .name , "main_branch": .default_branch } )')
@houstondapaz
houstondapaz / org_branchs.sh
Created November 26, 2021 20:41
get all org repos and main branch
#!/bin/bash
GITHUB_USERNAME=
GIT_TOKEN=
GITHUB_ORG_NAME=
declare repositories=(`
for ((i=0; ; i++)); do
current_repositories=$(curl -u ${GITHUB_USERNAME}:${GIT_TOKEN} https://api.github.com/orgs/${GITHUB_ORG_NAME}/repos\?page\=$i\&per_page\=100\&type\=private | jq -c 'map( { "name": .name , "main_branch": .default_branch } )')
length=$(jq length <<< $current_repositories)
@houstondapaz
houstondapaz / curltime.sh
Created June 7, 2022 17:38
execute curl and show times
#!/bin/bash
curl -w @- -o /dev/null -s "$@" <<'EOF'
time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n
time_pretransfer: %{time_pretransfer}\n
time_redirect: %{time_redirect}\n
time_starttransfer: %{time_starttransfer}\n
----------\n
@houstondapaz
houstondapaz / gist:abf5d52a8dab62df8797e38940dd9273
Created March 6, 2023 21:02
Update mongodb nested object arrays
// schema
// {
// "EnvironmentSettings": [
// {
// "ProductName": "Product",
// "Settings": [
// {
// "Key": "key1",
// "Value": "value1"
// }