Edit any variable in the shell script. Then run it this way:
./add-file-to-repos.sh 2>&1 | tee out.log
.env |
Get all the Helm resources that are deployed in the cluster
echo "KIND,NAME,NAMESPACE,HELM_RELEASE" > resources.csv
source main.sh
namespaces=("ccx-prod" "ccx-qa" "ccx-supplementary"); for ns in "${namespaces[@]}";
get_resources "$ns" | awk '{$1=$1; OFS=",";} 1' |
grep -v -E 'Pod|Job|ReplicationController|ReplicaSet' | awk -F, '$1 != "Build"' >> resources.csv
I'm using zsh's git
plugin for the alias like gp
.
master/main
(default) branch for the repo and pull the latest changes.DEFAULT_BRANCH=$(git remote show origin | grep "HEAD branch" | sed 's/.*: //') && \
git checkout "$DEFAULT_BRANCH" && \
git pull origin "$DEFAULT_BRANCH"
#/bin/bash | |
namespaces=$(oc get projects -o template --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}') | |
echo "Namespace,Name,Type,Limits CPU,Limits Memory,PersistentVolumeClaims,Pods,Requests Storage" | |
for namespace in $namespaces | |
do | |
for type in "hard" "used" | |
do |
*.dat |
In order to quickly check the status of your Merge Request, you can run these two commands.
Note that a MR needs to be reviewed before entering the merge queue. That's why checking both is sometimes needed.
Install glow or use your favourite markdown renderer.
version: "3" | |
services: | |
# Auxiliar services the external data pipeline needs | |
db: | |
ports: | |
- 5432:5432 | |
image: registry.redhat.io/rhscl/postgresql-13-rhel7 | |
environment: | |
- POSTGRESQL_USER=user | |
- POSTGRESQL_PASSWORD=password |
# Delete cronjob history | |
oc delete jobs -l parent=$CRONJOB_NAME |