Skip to content

Instantly share code, notes, and snippets.

View csantanapr's full-sized avatar
🏠
Working from home

Carlos Santana csantanapr

🏠
Working from home
View GitHub Profile
@csantanapr
csantanapr / DNS_TO_LOCALHOST.markdown
Created February 20, 2024 14:20 — forked from tinogomes/DNS_TO_LOCALHOST.markdown
Public DNS Pointing to localhost (127.0.0.1)

Available Public Wildcard DNS Domains pointing to localhost (127.0.0.1)

The best way to safely and securely use local domains pointing to 127.0.0.1 is to edit your local settings (/etc/hosts) and add your own settings. Keep in mind if you want to use subdomains, you need to enter all variations.

Example:

# Adding bottom of your current file /etc/hosts
################# MY LOCAL DOMAINS
127.0.0.1 local.com admin.local.com
127.0.0.1 domain1.com
@csantanapr
csantanapr / deny-access-sidecar.yaml
Last active October 23, 2023 01:35
deny-access-sidecar
apiVersion: apps/v1
kind: Deployment
metadata:
name: test
spec:
replicas: 1
selector:
matchLabels:
app: test
template:
@csantanapr
csantanapr / README.md
Created March 1, 2023 14:49 — forked from vavdoshka/README.md
ArgoCD and ArgoWorkflows SSO config with AWS Cognito

ArgoCD and ArgoWorkflows SSO config with AWS Cognito

So you have fantastic ArgoCD or mind-boggling ArgoWorkflows (this guide covers both), and if you want to secure the Authentication with AWS Cognito, let's dive right in.

I found many different sources unveiling some pieces of the required configuration but no resources where one can see the whole picture. I hope this guide will be one of such places. This guide will mean no DEX usage, just rely on Argo's built-in OpenID Connect flow.

Table of contents

@csantanapr
csantanapr / eks-kube-api-flasgs-1.24.txt
Created November 29, 2022 01:34
EKS 1.24 kube-api flags
Setting GA feature gate CSIServiceAccountToken=true. It will be removed in a future release. |
Setting GA feature gate TTLAfterFinished=true. It will be removed in a future release. Flag --enable-logs-handler has been deprecated, This flag will be removed in v1.19 Flag --service-account-api-audiences has been deprecated, Use --api-audiences Flag --logtostderr has been deprecated, will be removed in a future release, see https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components
@csantanapr
csantanapr / setup-go.sh
Last active February 10, 2022 15:24
Linux Recipes
curl -LO https://go.dev/dl/go1.17.6.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.17.6.linux-amd64.tar.gz
echo 'export PATH=$PATH:$HOME/go/bin:/usr/local/go/bin' >> $HOME/.profile
echo 'export GOPATH=$HOME/go' >> $HOME/.profile
source $HOME/.profile
go version
minikube ssh <-- git bash window
sudo su - <-- within the minikube environment
cat << EOF > /etc/systemd/resolved.conf
> [Resolve]
> DNS=1.1.1.1
@csantanapr
csantanapr / install-knative-operator.sh
Last active December 16, 2021 23:38
Install Knative using Operator
#!/usr/bin/env bash
set -eo pipefail
set -u
## INSTALL OPERATOR (is install in default namespace, to use another namespace need to modify the yaml)
n=0
until [ $n -ge 3 ]; do
kubectl apply -f https://storage.googleapis.com/knative-nightly/operator/latest/operator.yaml > /dev/null && break
echo "Kourier failed to install on first try"
@csantanapr
csantanapr / deploy-svc-ingress-trivia.md
Created October 13, 2021 14:02
deploy-svc-ingress-trivia

Trivia on ingress

Refs: https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/

You are tasked to deploy an application to http://hello-world.info the software is package at gcr.io/google-samples/hello-app:1.0 the app team said the software listens on port 8080. web app responds to prefix path http://hello-world.info/* Deploy only using the 3 commands, complete the commands.

  1. kubectl create deployment --port **** ...
  2. kubectl expose ...
@csantanapr
csantanapr / git-stats-dux.sh
Last active December 7, 2022 20:08
Knative DUX WG git stats
#!/usr/bin/env sh
rm -rf docs
git clone https://github.com/knative/docs.git
pushd docs > /dev/null
git log --branches --pretty=format:"%ad,%an" --date=short > ../docs.raw.txt
popd > /dev/null
cat docs.raw.txt | awk -F',' '$0 >= "2022-03-14"' > 3months.raw.txt
cat 3months.raw.txt | cut -f2 -d, | sort | uniq -c | sort -k1 -n -r