Add Realm ressource
This commit is contained in:
parent
19936251d0
commit
720a47fd86
17 changed files with 493 additions and 0 deletions
21
config/crd/kustomization.yaml
Normal file
21
config/crd/kustomization.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
# This kustomization.yaml is not intended to be run by itself,
|
||||
# since it depends on service name and namespace that are out of this kustomize package.
|
||||
# It should be run by config/default
|
||||
resources:
|
||||
- bases/keycloak.bitmask.me_keycloakrealms.yaml
|
||||
# +kubebuilder:scaffold:crdkustomizeresource
|
||||
|
||||
patchesStrategicMerge:
|
||||
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
|
||||
# patches here are for enabling the conversion webhook for each CRD
|
||||
#- patches/webhook_in_keycloakrealms.yaml
|
||||
# +kubebuilder:scaffold:crdkustomizewebhookpatch
|
||||
|
||||
# [CERTMANAGER] To enable webhook, uncomment all the sections with [CERTMANAGER] prefix.
|
||||
# patches here are for enabling the CA injection for each CRD
|
||||
#- patches/cainjection_in_keycloakrealms.yaml
|
||||
# +kubebuilder:scaffold:crdkustomizecainjectionpatch
|
||||
|
||||
# the following config is for teaching kustomize how to do kustomization for CRDs.
|
||||
configurations:
|
||||
- kustomizeconfig.yaml
|
19
config/crd/kustomizeconfig.yaml
Normal file
19
config/crd/kustomizeconfig.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
# This file is for teaching kustomize how to substitute name and namespace reference in CRD
|
||||
nameReference:
|
||||
- kind: Service
|
||||
version: v1
|
||||
fieldSpecs:
|
||||
- kind: CustomResourceDefinition
|
||||
version: v1
|
||||
group: apiextensions.k8s.io
|
||||
path: spec/conversion/webhook/clientConfig/service/name
|
||||
|
||||
namespace:
|
||||
- kind: CustomResourceDefinition
|
||||
version: v1
|
||||
group: apiextensions.k8s.io
|
||||
path: spec/conversion/webhook/clientConfig/service/namespace
|
||||
create: false
|
||||
|
||||
varReference:
|
||||
- path: metadata/annotations
|
7
config/crd/patches/cainjection_in_keycloakrealms.yaml
Normal file
7
config/crd/patches/cainjection_in_keycloakrealms.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
# The following patch adds a directive for certmanager to inject CA into the CRD
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
|
||||
name: keycloakrealms.keycloak.bitmask.me
|
14
config/crd/patches/webhook_in_keycloakrealms.yaml
Normal file
14
config/crd/patches/webhook_in_keycloakrealms.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
# The following patch enables a conversion webhook for the CRD
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: keycloakrealms.keycloak.bitmask.me
|
||||
spec:
|
||||
conversion:
|
||||
strategy: Webhook
|
||||
webhook:
|
||||
clientConfig:
|
||||
service:
|
||||
namespace: system
|
||||
name: webhook-service
|
||||
path: /convert
|
24
config/rbac/keycloakrealm_editor_role.yaml
Normal file
24
config/rbac/keycloakrealm_editor_role.yaml
Normal file
|
@ -0,0 +1,24 @@
|
|||
# permissions for end users to edit keycloakrealms.
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: keycloakrealm-editor-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- keycloak.bitmask.me
|
||||
resources:
|
||||
- keycloakrealms
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- keycloak.bitmask.me
|
||||
resources:
|
||||
- keycloakrealms/status
|
||||
verbs:
|
||||
- get
|
20
config/rbac/keycloakrealm_viewer_role.yaml
Normal file
20
config/rbac/keycloakrealm_viewer_role.yaml
Normal file
|
@ -0,0 +1,20 @@
|
|||
# permissions for end users to view keycloakrealms.
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: keycloakrealm-viewer-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- keycloak.bitmask.me
|
||||
resources:
|
||||
- keycloakrealms
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- keycloak.bitmask.me
|
||||
resources:
|
||||
- keycloakrealms/status
|
||||
verbs:
|
||||
- get
|
7
config/samples/keycloak_v1alpha1_keycloakrealm.yaml
Normal file
7
config/samples/keycloak_v1alpha1_keycloakrealm.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
apiVersion: keycloak.bitmask.me/v1alpha1
|
||||
kind: KeycloakRealm
|
||||
metadata:
|
||||
name: keycloakrealm-sample
|
||||
spec:
|
||||
# Add fields here
|
||||
foo: bar
|
4
config/samples/kustomization.yaml
Normal file
4
config/samples/kustomization.yaml
Normal file
|
@ -0,0 +1,4 @@
|
|||
## Append samples you want in your CSV to this file as resources ##
|
||||
resources:
|
||||
- keycloak_v1alpha1_keycloakrealm.yaml
|
||||
# +kubebuilder:scaffold:manifestskustomizesamples
|
Loading…
Add table
Add a link
Reference in a new issue