I use bash and jq to create that script.
#!/usr/bin/env bash
reg=$1
repo=$2
import java.security.MessageDigest | |
/** | |
* This code is based on https://medium.com/rayn-studios/generating-sha-512-checksum-of-a-file-in-android-42ae135b0a52 | |
* https://gist.github.com/rajat1saxena/738da60a88413a8c5b0bb8f41e31e796 | |
* https://gist.github.com/rajat1saxena/ddd6301fd6564954e204eed23dcce2f4 | |
*/ | |
class Checksum(private val data: ByteArray) { |
MY_OLD_PASS="oldpass"; | |
MY_NEW_PASS="newpass"; | |
kubectl get secret sg -o yaml | sed -e "s,$(echo $MY_OLD_PASS | tr -d \\n | base64 -w 0),$(echo $MY_NEW_PASS | tr -d \\n | base64 -w 0)," | kubectl apply -f -; |
#!/bin/bash | |
# In honor of the remarkable Windson | |
#/bin/bash | |
namespace=$1 | |
if [[ -z "$namespace" ]]; then | |
echo "Use "$(basename "$0")" NAMESPACE"; | |
exit 1; | |
fi |