added keycloak deployment with psql operator

This commit is contained in:
Sebastian Wendel 2022-07-27 17:42:30 +02:00
parent dff188bbd2
commit a5d6d222d3
No known key found for this signature in database
GPG key ID: 1422B7DF78144640
10 changed files with 1952 additions and 44 deletions

View file

@ -0,0 +1,36 @@
---
apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
metadata:
name: fcos-keycloak
spec:
postgresVersion: 14
instances:
- replicas: 1
dataVolumeClaimSpec:
accessModes:
- "ReadWriteOnce"
resources:
requests:
storage: 1Gi
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
podAffinityTerm:
topologyKey: kubernetes.io/hostname
labelSelector:
matchLabels:
postgres-operator.crunchydata.com/cluster: keycloak-db
postgres-operator.crunchydata.com/instance-set: "00"
backups:
pgbackrest:
repos:
- name: repo1
volume:
volumeClaimSpec:
accessModes:
- "ReadWriteOnce"
resources:
requests:
storage: 1Gi

View file

@ -3,9 +3,14 @@ apiVersion: k8s.keycloak.org/v2alpha1
kind: Keycloak
metadata:
name: fcos-keycloak
labels:
app: sso
spec:
instances: 1
hostname: id.localhost
serverConfiguration:
- name: db
value: postgres
- name: db-url
secret:
name: fcos-keycloak-pguser-fcos-keycloak
key: jdbc-uri
tlsSecret: INSECURE-DISABLE

View file

@ -1,5 +1,9 @@
---
namespace: keycloak
resources:
- namespace.yaml
- operatorgroup.yaml
- subscription.yaml
- database.yaml
- instance.yaml
- realm.yaml

1851
apps/keycloak/realm.yaml Normal file

File diff suppressed because it is too large Load diff

View file

@ -10,3 +10,15 @@ spec:
source: operatorhubio-catalog
sourceNamespace: olm
installPlanApproval: Automatic
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: postgresql
namespace: keycloak
spec:
channel: v5
name: postgresql
source: operatorhubio-catalog
sourceNamespace: olm
installPlanApproval: Automatic

View file

@ -1,3 +0,0 @@
---
resources:
- instances.yaml

View file

@ -1,7 +1,6 @@
---
resources:
- ../../base
- ./apps/keycloak
patches:
- target:
kind: Ingress

View file

@ -1,25 +0,0 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: gitea-server-ingress
namespace: gitea
annotations:
kubernetes.io/ingress.class: nginx
kubernetes.io/tls-acme: "true"
spec:
rules:
- host: code.fabcity.hamburg
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: gitea-http
port:
name: http
tls:
- hosts:
- code.fabcity.hamburg
secretName: gitea-secret-prod

View file

@ -1,11 +0,0 @@
---
apiVersion: k8s.keycloak.org/v2alpha1
kind: Keycloak
metadata:
name: fcos-keycloak
labels:
app: sso
spec:
instances: 2
hostname: id.fabcity.hamburg
tlsSecret: fcos-keycloak-tls-secret

View file

@ -1,3 +1,43 @@
---
resources:
- instances.yaml
patches:
- target:
kind: PostgresCluster
group: postgres-operator.crunchydata.com
version: v1beta1
patch: |-
- op: replace
path: /spec/instances
value:
- replicas: 2
dataVolumeClaimSpec:
accessModes:
- "ReadWriteOnce"
resources:
requests:
storage: 1Gi
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
podAffinityTerm:
topologyKey: kubernetes.io/hostname
labelSelector:
matchLabels:
postgres-operator.crunchydata.com/cluster: keycloak-db
postgres-operator.crunchydata.com/instance-set: "00"
- target:
kind: Keycloak
group: k8s.keycloak.org
version: v2alpha1
patch: |-
- op: replace
path: /spec/instances
value: 2
- target:
kind: Keycloak
group: k8s.keycloak.org
version: v2alpha1
patch: |-
- op: replace
path: /spec/hostname
value: id.fabcity-hamburg.de