Native Shell
Native Shell:AI 生成的 UI,在你的应用中原生呈现,覆盖每个平台。iOS、Android、macOS、Windows 与 Linux 上的应用、GPUI 应用与网页在运行时加载已签名、沙箱隔离的 TSX 模块并绘制 th
AI 翻译
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗A lightweight Kubernetes operator that provisions Keycloak realms, groups, users, and OAuth clients declaratively via CRDs.
Applications can request their own Keycloak configuration without manual Keycloak admin access or pre-deploy scripts.
The operator manages four CRD kinds:
| Kind | What it provisions |
|---|---|
KeycloakRealm | A Keycloak realm |
KeycloakRealmGroup | A group within a realm, with optional realm-role assignments |
KeycloakUser | A user within a realm, with optional group membership and role assignments |
KeycloakClient | An OAuth client within a realm, with a generated secret stored in a K8s Secret |
All resources are reconciled continuously — the operator detects and repairs out-of-band drift every 5 minutes.
KeycloakRealm
└── KeycloakRealmGroup (ownerRef → Realm; cascade-deleted with realm)
└── KeycloakUser (ownerRef → Realm; cascade-deleted with realm)
└── KeycloakClient (ownerRef → Realm; cascade-deleted with realm)
└── K8s Secret (ownerRef → Client; GC'd with client)
Deleting a KeycloakRealm CR triggers K8s garbage collection of all child CRs, which in turn clean up their Keycloak resources before the realm itself is deleted.
Add the Helm repository:
helm repo add keycloak-provisioner https://drewsonne.github.io/keycloak-provisioner
helm repo update
Install the chart:
helm install keycloak-provisioner keycloak-provisioner/keycloak-provisioner \
--namespace keycloak \
--set keycloak.url=http://keycloak.keycloak.svc.cluster.local \
--set keycloak.adminSecret.name=keycloak-admin-credentials
apiVersion: v1
kind: Secret
metadata:
name: keycloak-admin-credentials
namespace: keycloak
stringData:
username: admin
password: <admin-password>
Default values:
image:
repository: drewsonne/keycloak-provisioner
tag: latest
keycloak:
url: http://keycloak-keycloakx-http.keycloak.svc.cluster.local
adminSecret:
name: keycloak-admin-credentials
namespace: keycloak
Creates a Keycloak realm with configurable login, security, and SSL settings.
apiVersion: keycloak.drewsonne.github.io/v1
kind: KeycloakRealm
metadata:
name: my-realm
namespace: keycloak
spec:
realm: my-realm
displayName: My Realm
enabled: true
loginWithEmailAllowed: true
bruteForceProtected: true
sslRequired: external # none | external | all
sslRequired values:
| Value | Behaviour |
|---|---|
none | SSL is not required for any client IP address |
external | Non-private IP addresses must use SSL |
all | All IP addresses must use SSL |
Creates a group within a realm, with optional realm-role assignments and custom attributes.
apiVersion: keycloak.drewsonne.github.io/v1
kind: KeycloakRealmGroup
metadata:
name: my-realm-admins
namespace: keycloak
spec:
realm: my-realm
name: admins
realmRoles:
- admin
attributes:
team: ["platform"]
Creates a user within a realm, with optional group membership and realm-role assignments.
apiVersion: keycloak.drewsonne.github.io/v1
kind: KeycloakUser
metadata:
name: alice
namespace: keycloak
spec:
realm: my-realm
username: alice
email: [email protected]
firstName: Alice
lastName: Smith
enabled: true
emailVerified: true
groups:
- admins
realmRoles:
- offline_access
Creates an OAuth client within a realm, with a generated secret stored in a K8s Secret. Supports protocol mappers for token claim customisation.
apiVersion: keycloak.drewsonne.github.io/v1
kind: KeycloakClient
metadata:
name: my-app
namespace: my-app
spec:
clientId: my-app
realm: my-realm
redirectUris:
- https://my-app.example.com/oauth-callback
webOrigins:
- https://my-app.example.com
secretName: keycloak-my-app-secret
secretNamespace: my-app # optional; defaults to CR namespace
protocolMappers:
- name: realm-roles
mapperType: oidc-usermodel-realm-role-mapper
config:
multivalued: "true"
userinfo.token.claim: "true"
id.token.claim: "true"
access.token.claim: "true"
claim.name: "realm_access.roles"
jsonType.label: "String"
Every CR accepts an optional keycloakAdminSecret field to use a different Keycloak admin account (useful for multi-tenant setups):
spec:
keycloakAdminSecret:
name: my-other-admin-secret
namespace: keycloak
KeycloakClient creates a Secret containing:
client_id — the Keycloak client IDclient_secret — the OAuth client secretkubectl get secret keycloak-my-app-secret -n my-app -o yaml
KeycloakClient Secret already exists, the client_secret is preserved rather than regeneratedkubectl describe as a K8s Warning event and in the Drift printer columnKeycloakRealm CR triggers cleanup of all child CRs (groups, users, clients) before the realm is removed from KeycloakKeycloakUser references a group that doesn't exist yet, the controller retries automatically until the group is readykubectl get keycloakrealms
kubectl get keycloakclients
kubectl get keycloakrealmgroups
kubectl get keycloakusers
Printer columns include Ready, Drift, and Age. Drift events are also emitted as Kubernetes Warning events visible via kubectl describe.
Build locally:
docker build -t drewsonne/keycloak-provisioner:dev .
Run locally (requires cluster access):
docker run --rm \
-e KEYCLOAK_URL=http://keycloak.keycloak.svc.cluster.local \
-e KEYCLOAK_ADMIN_USERNAME=admin \
-e KEYCLOAK_ADMIN_PASSWORD=... \
drewsonne/keycloak-provisioner:dev
GPLv3