Skip to content

Instantly share code, notes, and snippets.

View rafaeltuelho's full-sized avatar
🎯
Focusing

Rafael T. C. Soares (A.K.A Tuelho) rafaeltuelho

🎯
Focusing
  • Red Hat Inc.
  • Frisco, TX, USA
  • 23:39 (UTC -05:00)
View GitHub Profile
@rafaeltuelho
rafaeltuelho / openshift-devspaces-32-checluster-crd.yaml
Created November 7, 2022 18:30
Openshift DevSpaces 3.2 CRD sample
apiVersion: org.eclipse.che/v2
kind: CheCluster
metadata:
name: devspaces
namespace: ocp-devspaces
spec:
components:
cheServer:
debug: false
logLevel: INFO
@rafaeltuelho
rafaeltuelho / podman-tips.md
Last active September 21, 2023 07:59
Notes to run podman

When on MacOS

  • add a new alias to your shell (bash or zsh) to create a temporary Unix Domain Socket for podman

you need jq installed confirm the path for podman.sock with podman system connection list --format=json

podman-sock='rm -f /tmp/podman.sock && ssh -i ~/.ssh/podman-machine -p $(podman system connection list --format=json | jq ''.[0].URI'' | sed -E ''s|.+://.+@.+:([[:digit:]]+)/.+|\1|'') -L''/tmp/podman.sock:/run/user/501/podman/podman.sock'' -N core@localhost'
  • set the following env vars to configure Test Containers for podman

Warning this procedure was tested in Fedora 34 using Fish shell.

Requirements:

podman-3.4.0-1.fc34.x86_64
podman-docker-3.4.0-1.fc34.noarch

Disable the registry prompt by setting the short-name-mode="disabled" configuration property of Podman in /etc/containers/registries.conf

package org.acme.rest.json;
import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerRequestFilter;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.UriInfo;
import javax.ws.rs.ext.Provider;
import org.jboss.logging.Logger;
ServiceBinding Operator
apiVersion: binding.operators.coreos.com/v1alpha1
kind: ServiceBinding
metadata:
name: quarkus-postgresql-servicebinding
spec:
application:
group: apps.openshift.io
kind: DeploymentConfig
name: devspaces-quarkus-crud-demo
@rafaeltuelho
rafaeltuelho / maven-build-plugins.md
Created March 10, 2022 13:30
Useful/helpful maven build plugins

Used when working with vscode-java to enable javadoc hover

  <build>
    <plugins>
      <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>3.1.2</version>
          <executions> 
@rafaeltuelho
rafaeltuelho / onBoarding-Communication.dmn
Last active September 15, 2021 20:07
onBoarding-Communication.dmn
<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/" xmlns="https://kiegroup.org/dmn/_B4A03463-180C-4273-A42A-B92E29D3A3B6" xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/" xmlns:kie="http://www.drools.org/kie/dmn/1.2" xmlns:dmndi="http://www.omg.org/spec/DMN/20180521/DMNDI/" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" id="_D4F18A6C-F440-4209-A727-BE55FECE1703" name="onBoarding Communication" typeLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" namespace="https://kiegroup.org/dmn/_B4A03463-180C-4273-A42A-B92E29D3A3B6">
<dmn:extensionElements/>
<dmn:itemDefinition id="_CED93661-58AA-4815-9462-8EC2942A00BE" name="tMember" isCollection="false">
<dmn:itemComponent id="_51E5D91B-564D-47E4-BF08-51AE4432D722" name="name" isCollection="false">
<dmn:typeRef>string</dmn:typeRef>
</dmn:itemComponent>
<dmn:itemComponent id="_465695EF-00B5-44B3-BACF-52DFBDF9F723" name="id" isCollection="false">
<dmn:type
@rafaeltuelho
rafaeltuelho / image-build-push-to-openshift-registry.md
Last active September 8, 2021 19:07
Building and pushing a custom image to Openshift internal registry

Write your custom Dockerfile

FROM ....
	...

Build the image locally

docker build -t <your username>/custom-image-name-here .
apiVersion: app.kiegroup.org/v2
kind: KieApp
spec:
commonConfig:
adminPassword: 'sec_pwd_here'
adminUser: dmAdmin
environment: rhdm-production-immutable
objects:
servers:
- id: demo-ks
apiVersion: sonatype.com/v1alpha1
kind: NexusRepo
metadata:
name: my-nexusrepo
spec:
config:
enabled: false
mountPath: /sonatype-nexus-conf
deployment:
annotations: {}