Skip to content

Instantly share code, notes, and snippets.

View jovemfelix's full-sized avatar

RENATO ALVES FELIX jovemfelix

View GitHub Profile
@jovemfelix
jovemfelix / Openshift-Deployment-busybox.yaml
Created July 5, 2024 12:49
Example to test with busybox
apiVersion: apps/v1
kind: Deployment
metadata:
name: busybox
spec:
replicas: 1
selector:
matchLabels:
app: test
@jovemfelix
jovemfelix / Containerfile
Created July 3, 2024 21:40
JQ-With-Redhat-UBI-8.10
FROM registry.access.redhat.com/ubi8/ubi:8.10
RUN dnf install -y jq \
&& jq -V
---
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: pipeline-agnostic
spec:
params:
- name: APP_NAME
type: string
default: 'react-openshift-example'
{
"actions": [
{
"type": "command",
"label": "Send to VSCode",
"command_line": "code ${PWD}",
"use_shell": true,
"cwd": "%f",
"max_items": 1,
"filetypes": ["directory"]
---
# Senha do banco de dados
apiVersion: v1
kind: Secret
metadata:
name: database-secret
type: Opaque
stringData:
username: 'my-username'
password: 'my-pass'
crc config set consent-telemetry no
crc config set cpus 12
crc config set memory 30971
crc config set kubeadmin-password xxxx
WILDCARD_DOMAIN=$(oc whoami --show-console 2> /dev/null | cut -d '.' -f2- | cut -d ':' -f1)
NAME_KEYCOAK=admin-rhbk
SECRET_NAME=keycloak-admin-tls-secret
openssl req -subj "/CN=${NAME_KEYCOAK}.${WILDCARD_DOMAIN}/O=Test RHBK./C=BR" -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out certificate.pem
oc create secret tls ${SECRET_NAME} --cert certificate.pem --key key.pem
oc create route passthrough rhbk-dev-admin --service=rhbk-dev-service --port=https --hostname="${NAME_KEYCOAK}.${WILDCARD_DOMAIN}"
echo "created secret ${SECRET_NAME} for host: https://${NAME_KEYCOAK}.${WILDCARD_DOMAIN}"
@jovemfelix
jovemfelix / crc-upgrade.sh
Created November 20, 2023 17:34
Upgrade CRC with URL sugested to upgrade
URL_TMP=$(crc version 2>&1 | grep -oP 'has been published on\s\K.*')
TAR_FILE=/home/rfelix/Downloads/crc-linux-amd64.tar.xz
OUTPUT_FILE=/home/rfelix/apps/crc-linux-amd64/crc
if [ ! -z "$URL_TMP" ]
then
URL=${URL_TMP::-1}
echo "Downloading: ${URL}"
curl -L -o $TAR_FILE $URL
@jovemfelix
jovemfelix / openapi.yaml
Last active November 7, 2023 12:17
Exemplo de Contrato para SPI com KEYCLOAK
openapi: 3.1.0
info:
title: CIAM
contact: {}
version: '1.0'
jsonSchemaDialect: https://spec.openapis.org/oas/3.1/dialect/base
servers:
- url: https://develop.example.com
variables: {}
- url: https://stage.example.com
@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