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