Skip to content

Instantly share code, notes, and snippets.

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

Baiju Muthukadan baijum

🏠
Working from home
  • Red Hat
  • India
View GitHub Profile

Spring PetClinic Application with AWS RDS PostgreSQL

First I created a container image repository in quay.io.

$ git clone https://github.com/spring-projects/spring-petclinic.git
$ spring-petclinic
$ sudo apt-get install openjdk-11-jdk -y
$ export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
$ ./mvnw spring-boot:build-image
package secret
import (
"encoding/base64"
"github.com/asaskevich/govalidator"
corev1 "k8s.io/api/core/v1"
)
func decode(msg []byte) string {
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: percona-server-mongodb-operator
namespace: percona
spec:
channel: stable
installPlanApproval: Automatic
name: percona-server-mongodb-operator
source: community-operators
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: spring-petclinic-rest
namespace: my-postgresql
labels:
app: spring-petclinic-rest
spec:
replicas: 1
#!/bin/bash
cat <<EOF | kubectl apply -f -
apiVersion: crunchydata.com/v1
kind: Pgcluster
metadata:
annotations:
current-primary: hippo
service.binding/database: path={.spec.name}
service.binding/host: path={.spec.name}
@baijum
baijum / postgres.md
Last active July 2, 2021 10:21
Setting PostgreSQL using Crunchy PostgreSQL for Kubernetes

Setting PostgreSQL using Crunchy PostgreSQL for Kubernetes

Crunchy PostgreSQL for Kubernetes operator is available through OperatorHub.io website.

Installing Operator Lifecycle Manager (OLM)

To install Operator Lifecycle Manager, run this command:

curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.18.2/install.sh | bash -s v0.18.2
@baijum
baijum / Liberal Regex Pattern for All URLs
Created April 25, 2021 03:26 — forked from gruber/Liberal Regex Pattern for All URLs
Liberal, Accurate Regex Pattern for Matching All URLs
The regex patterns in this gist are intended to match any URLs,
including "mailto:[email protected]", "x-whatever://foo", etc. For a
pattern that attempts only to match web URLs (http, https), see:
https://gist.github.com/gruber/8891611
# Single-line version of pattern:
(?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))