❯ git clone [email protected]:RedHatInsights/ccx-notification-writer.git
❯ cd ccx-notification-writer
❯ make build
❯ ./ccx-notification-writer db-init
❯ cd ..
❯ export PGPASSWORD=postgres
❯ psql --username=postgres --host=localhost --port=5432 --dbname notification -f init.sql; done
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Delete cronjob history | |
oc delete jobs -l parent=$CRONJOB_NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.dat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/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 |
I'm using zsh's git
plugin for the alias like gp
.
- Check out the
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"
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.env |