Skip to content

Instantly share code, notes, and snippets.

View jovemfelix's full-sized avatar

RENATO ALVES FELIX jovemfelix

View GitHub Profile
@jovemfelix
jovemfelix / credential-rhsso.yaml
Created May 15, 2023 15:36
Example of RHSSO CRD Credential
apiVersion: v1
kind: Secret
metadata:
labels:
app: keycloak
keycloak: rhsso
name: credential-rhsso
namespace: my-namespace
stringData:
ADMIN_USERNAME: my-super-user

To get oh-my-zsh

Modify prompt without theme support

Append at the final of your ~/.zshrc file the code bellow

function ocp_prompt_info() {
  WILDCARD_DOMAIN=$(oc whoami --show-console 2> /dev/null | cut -d '.' -f2- | cut -d ':' -f1)
 local result=''
@jovemfelix
jovemfelix / generate-docx-from-adoc.sh
Created April 10, 2023 12:45
Convert AsciiDoc into DOCX
#!/usr/bin/env bash
INPUT_ADOC=README.adoc
GIT_DATE=$(TZ=UTC git log -1 --pretty=format:%cd --date=format-local:%Y-%m-%d-%H-%M-%S)
# get customer short name
CUSTOMER_SHORT_NAME=$(sed -En 's/^:cust: (.*)/\1/p' vars/customer-vars.adoc)
CLEAN_CUSTOMER_SHORT_NAME=$(echo "${CUSTOMER_SHORT_NAME}" | sed 's/ /_/g')
THIS_SCRIPT=$(basename -- "$0")
WORKDIR=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
echo Running $THIS_SCRIPT at $WORKDIR
alias mta='/Users/rfelix/redhat/products/MTA/mta-cli-6.0.1.GA-redhat-00006/bin/windup-cli'
INPUT_DIR=${WORKDIR}/jars
OUTPUT_DIR=${WORKDIR}/report
CLOUD_DIR=${OUTPUT_DIR}/cloud-readiness
@jovemfelix
jovemfelix / Ansible-host-local-install-Kubernetes_Python_Client.md
Created March 16, 2023 18:04
Resolved: "Failed to import the required Python library (kubernetes) on rfelix-mac's Python /usr/local/opt/[email protected]/bin/python3.11. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansibl…

To resolve the error Failed to import the required Python library (kubernetes) on rfelix-mac's Python /usr/local/opt/[email protected]/bin/python3.11. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter" I had just to install Kubernetes Python Client like bellow:

Solution

➜  pip3 install kubernetes
Collecting kubernetes
  Downloading kubernetes-26.1.0-py2.py3-none-any.whl (1.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 385.9 kB/s eta 0:00:00
Collecting certifi>=14.05.14
@jovemfelix
jovemfelix / deployment-ose-cli.yaml
Created March 15, 2023 20:15
Testar Conectividade no Openshift 4.11
apiVersion: apps/v1
kind: Deployment
metadata:
name: ose-cli
namespace: openshift-migration
spec:
replicas: 1
selector:
matchLabels:
app: support-tools
@jovemfelix
jovemfelix / Run-AsciidocFX-From-Command-Line-on-Mac.sh
Last active February 1, 2023 14:50
Using the https://asciidocfx.com/ to manage .adoc files from the command line
# To install a used: https://asciidocfx.com/#how-to-install-asciidocfx
# After installation a created this alias
alias ascii='/Applications/AsciidocFX/AsciidocFX.app/Contents/MacOS/JavaApplicationStub -q $PWD/README.adoc'
# now go to folder that has your README.adoc files

Deploy the imagem to test your gRPC connections

Remember to select the namespace you desire to deploy!

Deployment

---
apiVersion: apps/v1
kind: Deployment
metadata:

Example to Purge Backend Errors from 3scale

Enviroment version used

Openshift 4.10.22

Red Hat 3scale : 2.11

VARIABLES

entrar num projeto

oc project XXX

criar um pod para executar as atividades

cat <<EOF | oc apply -f -
---
apiVersion: v1