feat: ⚠️ Important!⚠️ declarative GitOps configuration via Helm values + fsnotify watcher (Fixes #226, #360, #233)#441
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e9c02471cb
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7b4c632b38
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5c24f49d6d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 39f6529a38
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7655184886
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8946b27a70
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 12efcfd9e9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c86a1fb33
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
I have no objections to introducing declarative GitOps. However, I don’t expect Kite to maintain a CRD by itself. This would be too complicated. If this can be done using only Helm Values, then I would be very happy to accept that feature. |
Replace the CRD-based controller with a lightweight file-based approach
that reads YAML config from a ConfigMap mounted at /etc/kite/config.d/.
Key changes:
- pkg/config/types.go: KiteConfig schema (OAuth, RBAC, GeneralSettings)
- pkg/config/watcher.go: fsnotify watcher with conf.d merge, debounce,
ConfigMap symlink support, and polling fallback
- pkg/config/reconciler.go: full CRUD reconciliation to database with
orphan cleanup and managed-resource tracking
- main.go: replace CRD controller with file watcher startup
- pkg/model/{oauth,rbac}.go: add ManagedBy field for tracking
- charts/kite/: Helm templates for ConfigMap, volume mount, env var
- deploy/examples/: Entra ID and conf.d usage examples
Closes kite-org#226, kite-org#360, kite-org#233
Ref: maintainer feedback on PR kite-org#441 requesting Helm-only approach
49c5f19 to
79faef7
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 79faef736a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
@zxh326 I just modify with Helm chart values approach. I hope you like. Thank you!! |
Replace the CRD-based controller with a lightweight file-based approach
that reads YAML config from a ConfigMap mounted at /etc/kite/config.d/.
Key changes:
- pkg/config/types.go: KiteConfig schema (OAuth, RBAC, GeneralSettings)
- pkg/config/watcher.go: fsnotify watcher with conf.d merge, debounce,
ConfigMap symlink support, and polling fallback
- pkg/config/reconciler.go: full CRUD reconciliation to database with
orphan cleanup and managed-resource tracking
- main.go: replace CRD controller with file watcher startup
- pkg/model/{oauth,rbac}.go: add ManagedBy field for tracking
- charts/kite/: Helm templates for ConfigMap, volume mount, env var
- deploy/examples/: Entra ID and conf.d usage examples
Closes kite-org#226, kite-org#360, kite-org#233
Ref: maintainer feedback on PR kite-org#441 requesting Helm-only approach
79faef7 to
a20164c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a20164cc3e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Replace the CRD-based controller with a lightweight file-based approach
that reads YAML config from a ConfigMap mounted at /etc/kite/config.d/.
Key changes:
- pkg/config/types.go: KiteConfig schema (OAuth, RBAC, GeneralSettings)
- pkg/config/watcher.go: fsnotify watcher with conf.d merge, debounce,
ConfigMap symlink support, and polling fallback
- pkg/config/reconciler.go: full CRUD reconciliation to database with
orphan cleanup and managed-resource tracking
- main.go: replace CRD controller with file watcher startup
- pkg/model/{oauth,rbac}.go: add ManagedBy field for tracking
- charts/kite/: Helm templates for ConfigMap, volume mount, env var
- deploy/examples/: Entra ID and conf.d usage examples
Closes kite-org#226, kite-org#360, kite-org#233
Ref: maintainer feedback on PR kite-org#441 requesting Helm-only approach
a20164c to
f3fe55b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f3fe55b07e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Replace the CRD-based controller with a lightweight file-based approach
that reads YAML config from a ConfigMap mounted at /etc/kite/config.d/.
Key changes:
- pkg/config/types.go: KiteConfig schema (OAuth, RBAC, GeneralSettings)
- pkg/config/watcher.go: fsnotify watcher with conf.d merge, debounce,
ConfigMap symlink support, and polling fallback
- pkg/config/reconciler.go: full CRUD reconciliation to database with
orphan cleanup and managed-resource tracking
- main.go: replace CRD controller with file watcher startup
- pkg/model/{oauth,rbac}.go: add ManagedBy field for tracking
- charts/kite/: Helm templates for ConfigMap, volume mount, env var
- deploy/examples/: Entra ID and conf.d usage examples
Closes kite-org#226, kite-org#360, kite-org#233
Ref: maintainer feedback on PR kite-org#441 requesting Helm-only approach
f3fe55b to
f8e46a1
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f8e46a18f0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Replace the CRD-based controller with a lightweight file-based approach
that reads YAML config from a ConfigMap mounted at /etc/kite/config.d/.
Key changes:
- pkg/config/types.go: KiteConfig schema (OAuth, RBAC, GeneralSettings)
- pkg/config/watcher.go: fsnotify watcher with conf.d merge, debounce,
ConfigMap symlink support, and polling fallback
- pkg/config/reconciler.go: full CRUD reconciliation to database with
orphan cleanup and managed-resource tracking
- main.go: replace CRD controller with file watcher startup
- pkg/model/{oauth,rbac}.go: add ManagedBy field for tracking
- charts/kite/: Helm templates for ConfigMap, volume mount, env var
- deploy/examples/: Entra ID and conf.d usage examples
Closes kite-org#226, kite-org#360, kite-org#233
Ref: maintainer feedback on PR kite-org#441 requesting Helm-only approach
f8e46a1 to
16b4b39
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 16b4b39746
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Replace the CRD-based controller with a lightweight file-based approach
that reads YAML config from a ConfigMap mounted at /etc/kite/config.d/.
Key changes:
- pkg/config/types.go: KiteConfig schema (OAuth, RBAC, GeneralSettings)
- pkg/config/watcher.go: fsnotify watcher with conf.d merge, debounce,
ConfigMap symlink support, and polling fallback
- pkg/config/reconciler.go: full CRUD reconciliation to database with
orphan cleanup and managed-resource tracking
- main.go: replace CRD controller with file watcher startup
- pkg/model/{oauth,rbac}.go: add ManagedBy field for tracking
- charts/kite/: Helm templates for ConfigMap, volume mount, env var
- deploy/examples/: Entra ID and conf.d usage examples
Closes kite-org#226, kite-org#360, kite-org#233
Ref: maintainer feedback on PR kite-org#441 requesting Helm-only approach
16b4b39 to
ed582c1
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ed582c1a2e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 212ba7a57f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Replace the CRD-based controller with a lightweight file-based approach
that reads YAML config from a ConfigMap mounted at /etc/kite/config.d/.
Key changes:
- pkg/config/types.go: KiteConfig schema (OAuth, RBAC, GeneralSettings)
- pkg/config/watcher.go: fsnotify watcher with conf.d merge, debounce,
ConfigMap symlink support, and polling fallback
- pkg/config/reconciler.go: full CRUD reconciliation to database with
orphan cleanup and managed-resource tracking
- main.go: replace CRD controller with file watcher startup
- pkg/model/{oauth,rbac}.go: add ManagedBy field for tracking
- charts/kite/: Helm templates for ConfigMap, volume mount, env var
- deploy/examples/: Entra ID and conf.d usage examples
Closes kite-org#226, kite-org#360, kite-org#233
Ref: maintainer feedback on PR kite-org#441 requesting Helm-only approach
212ba7a to
729c227
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 729c227259
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Replace the CRD-based controller with a lightweight file-based approach
that reads YAML config from a ConfigMap mounted at /etc/kite/config.d/.
Key changes:
- pkg/config/types.go: KiteConfig schema (OAuth, RBAC, GeneralSettings)
- pkg/config/watcher.go: fsnotify watcher with conf.d merge, debounce,
ConfigMap symlink support, and polling fallback
- pkg/config/reconciler.go: full CRUD reconciliation to database with
orphan cleanup and managed-resource tracking
- main.go: replace CRD controller with file watcher startup
- pkg/model/{oauth,rbac}.go: add ManagedBy field for tracking
- charts/kite/: Helm templates for ConfigMap, volume mount, env var
- deploy/examples/: Entra ID and conf.d usage examples
Closes kite-org#226, kite-org#360, kite-org#233
Ref: maintainer feedback on PR kite-org#441 requesting Helm-only approach
729c227 to
de65b4b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de65b4b52c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Replace the CRD-based controller with a lightweight file-based approach
that reads YAML config from a ConfigMap mounted at /etc/kite/config.d/.
Key changes:
- pkg/config/types.go: KiteConfig schema (OAuth, RBAC, GeneralSettings)
- pkg/config/watcher.go: fsnotify watcher with conf.d merge, debounce,
ConfigMap symlink support, and polling fallback
- pkg/config/reconciler.go: full CRUD reconciliation to database with
orphan cleanup and managed-resource tracking
- main.go: replace CRD controller with file watcher startup
- pkg/model/{oauth,rbac}.go: add ManagedBy field for tracking
- charts/kite/: Helm templates for ConfigMap, volume mount, env var
- deploy/examples/: Entra ID and conf.d usage examples
Closes kite-org#226, kite-org#360, kite-org#233
Ref: maintainer feedback on PR kite-org#441 requesting Helm-only approach
de65b4b to
3c9f440
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3c9f440e4e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Replace the CRD-based controller with a lightweight file-based approach
that reads YAML config from a ConfigMap mounted at /etc/kite/config.d/.
Key changes:
- pkg/config/types.go: KiteConfig schema (OAuth, RBAC, GeneralSettings)
- pkg/config/watcher.go: fsnotify watcher with conf.d merge, debounce,
ConfigMap symlink support, and polling fallback
- pkg/config/reconciler.go: full CRUD reconciliation to database with
orphan cleanup and managed-resource tracking
- main.go: replace CRD controller with file watcher startup
- pkg/model/{oauth,rbac}.go: add ManagedBy field for tracking
- charts/kite/: Helm templates for ConfigMap, volume mount, env var
- deploy/examples/: Entra ID and conf.d usage examples
Closes kite-org#226, kite-org#360, kite-org#233
Ref: maintainer feedback on PR kite-org#441 requesting Helm-only approach
3c9f440 to
95c14e6
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 95c14e6ae3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Replace the CRD-based controller with a lightweight file-based approach
that reads YAML config from a ConfigMap mounted at /etc/kite/config.d/.
Key changes:
- pkg/config/types.go: KiteConfig schema (OAuth, RBAC, GeneralSettings)
- pkg/config/watcher.go: fsnotify watcher with conf.d merge, debounce,
ConfigMap symlink support, and polling fallback
- pkg/config/reconciler.go: full CRUD reconciliation to database with
orphan cleanup and managed-resource tracking
- main.go: replace CRD controller with file watcher startup
- pkg/model/{oauth,rbac}.go: add ManagedBy field for tracking
- charts/kite/: Helm templates for ConfigMap, volume mount, env var
- deploy/examples/: Entra ID and conf.d usage examples
Closes kite-org#226, kite-org#360, kite-org#233
Ref: maintainer feedback on PR kite-org#441 requesting Helm-only approach
95c14e6 to
9a8afae
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9a8afaec15
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Replace the CRD-based controller with a lightweight file-based approach
that reads YAML config from a ConfigMap mounted at /etc/kite/config.d/.
Key changes:
- pkg/config/types.go: KiteConfig schema (OAuth, RBAC, GeneralSettings)
- pkg/config/watcher.go: fsnotify watcher with conf.d merge, debounce,
ConfigMap symlink support, and polling fallback
- pkg/config/reconciler.go: full CRUD reconciliation to database with
orphan cleanup and managed-resource tracking
- main.go: replace CRD controller with file watcher startup
- pkg/model/{oauth,rbac}.go: add ManagedBy field for tracking
- charts/kite/: Helm templates for ConfigMap, volume mount, env var
- deploy/examples/: Entra ID and conf.d usage examples
Closes kite-org#226, kite-org#360, kite-org#233
Ref: maintainer feedback on PR kite-org#441 requesting Helm-only approach
9a8afae to
6df68be
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6df68bef14
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Replace the CRD-based controller with a lightweight file-based approach
that reads YAML config from a ConfigMap mounted at /etc/kite/config.d/.
Key changes:
- pkg/config/types.go: KiteConfig schema (OAuth, RBAC, GeneralSettings)
- pkg/config/watcher.go: fsnotify watcher with conf.d merge, debounce,
ConfigMap symlink support, and polling fallback
- pkg/config/reconciler.go: full CRUD reconciliation to database with
orphan cleanup and managed-resource tracking
- main.go: replace CRD controller with file watcher startup
- pkg/model/{oauth,rbac}.go: add ManagedBy field for tracking
- charts/kite/: Helm templates for ConfigMap, volume mount, env var
- deploy/examples/: Entra ID and conf.d usage examples
Closes kite-org#226, kite-org#360, kite-org#233
Ref: maintainer feedback on PR kite-org#441 requesting Helm-only approach
6df68be to
512ad6d
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 512ad6dee7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Replace the CRD-based controller with a lightweight file-based approach
that reads YAML config from a ConfigMap mounted at /etc/kite/config.d/.
Key changes:
- pkg/config/types.go: KiteConfig schema (OAuth, RBAC, GeneralSettings)
- pkg/config/watcher.go: fsnotify watcher with conf.d merge, debounce,
ConfigMap symlink support, and polling fallback
- pkg/config/reconciler.go: full CRUD reconciliation to database with
orphan cleanup and managed-resource tracking
- main.go: replace CRD controller with file watcher startup
- pkg/model/{oauth,rbac}.go: add ManagedBy field for tracking
- charts/kite/: Helm templates for ConfigMap, volume mount, env var
- deploy/examples/: Entra ID and conf.d usage examples
Closes kite-org#226, kite-org#360, kite-org#233
Ref: maintainer feedback on PR kite-org#441 requesting Helm-only approach
512ad6d to
1bdd45b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1bdd45ba24
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Replace the CRD-based controller with a lightweight file-based approach
that reads YAML config from a ConfigMap mounted at /etc/kite/config.d/.
Key changes:
- pkg/config/types.go: KiteConfig schema (OAuth, RBAC, GeneralSettings)
- pkg/config/watcher.go: fsnotify watcher with conf.d merge, debounce,
ConfigMap symlink support, and polling fallback
- pkg/config/reconciler.go: full CRUD reconciliation to database with
orphan cleanup and managed-resource tracking
- main.go: replace CRD controller with file watcher startup
- pkg/model/{oauth,rbac}.go: add ManagedBy field for tracking
- charts/kite/: Helm templates for ConfigMap, volume mount, env var
- deploy/examples/: Entra ID and conf.d usage examples
Closes kite-org#226, kite-org#360, kite-org#233
Ref: maintainer feedback on PR kite-org#441 requesting Helm-only approach
1bdd45b to
abb399b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: abb399b782
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Replace the CRD-based controller with a lightweight file-based approach
that reads YAML config from a ConfigMap mounted at /etc/kite/config.d/.
Key changes:
- pkg/config/types.go: KiteConfig schema (OAuth, RBAC, GeneralSettings)
- pkg/config/watcher.go: fsnotify watcher with conf.d merge, debounce,
ConfigMap symlink support, and polling fallback
- pkg/config/reconciler.go: full CRUD reconciliation to database with
orphan cleanup and managed-resource tracking
- main.go: replace CRD controller with file watcher startup
- pkg/model/{oauth,rbac}.go: add ManagedBy field for tracking
- charts/kite/: Helm templates for ConfigMap, volume mount, env var
- deploy/examples/: Entra ID and conf.d usage examples
Closes kite-org#226, kite-org#360, kite-org#233
Ref: maintainer feedback on PR kite-org#441 requesting Helm-only approach
abb399b to
95fc8e5
Compare
Declarative GitOps configuration via Helm values + fsnotify file watcher
Branch:
feat/crd-declarative-configCloses: #226, #360, #233
Hey maintainers! 👋
Following your feedback on PR #441 — "I don't expect Kite to maintain a CRD by itself. If this can be done using only Helm Values, then I would be very happy to accept that feature" — I've completely reworked the approach.
No CRDs. No controller-runtime. No operator. Just Helm values and a ConfigMap.
This PR adds declarative, GitOps-ready configuration for Kite using a simple pattern: Helm renders your config into a ConfigMap, Kite watches the mounted files with
fsnotify, and reconciles OAuth, RBAC, and settings to the database automatically. Onehelm upgrade(or one ArgoCD sync) and you're done.What does this actually solve?
Right now, configuring Kite after install is a fully imperative process. You either use the UI or call the REST API. That means:
With this feature, Kite configuration becomes just another section in your Helm values — versioned in Git, synced by ArgoCD/Flux, reviewed in PRs.
How it works
values.yamlunderkiteConfig:oauth.yaml,roles.yaml,settings.yaml)/etc/kite/config.d/as a volumefsnotifyand reconciles to the databaseWhat was done, step by step
1. Config schema types (
pkg/config/types.go, 85 lines)Clean Go structs for the declarative config —
KiteConfigcovers three top-level sections:oauth.providers[]— full OIDC provider config (issuer URL, client ID/secret, auth/token/userinfo URLs, scopes)roles[]— RBAC roles with cluster/namespace/resource scopes and subject assignments (users or groups)generalSettings— AI config, kubectl toggle, analytics, version check, node terminal image, etc.Used pointer types (
*bool,*int) for optional fields so the reconciler can distinguish "not set" from "set to zero/false".2. File watcher with fsnotify (
pkg/config/watcher.go, 308 lines)This is where the magic happens. The watcher:
KITE_CONFIG_DIR(default:/etc/kite/config.d/)*.yaml/*.ymlfiles, sorted alphabetically, and merges them. OAuth providers and roles are appended across files. General settings use last-write-wins per field. This lets teams split config across multiple files...data→..timestampsymlink swap pattern) by watching parent directoriesNewWatcher()returns nil and Kite runs normally without the feature3. Database reconciler (
pkg/config/reconciler.go, 383 lines)Full CRUD reconciliation against the Kite database:
managedBy: kite-declarative-config— your manually-created providers (UI/API) are never modified.admin/viewer) are protected — you can manage their assignments but can't redefine them.rbac.SyncNowafter role changes so the in-memory permission cache updates immediately.4. Model changes (
pkg/model/oauth.go,pkg/model/rbac.go)ManagedByfield toOAuthProvider,Role, andRoleAssignmentstructs. This is how the reconciler tracks which resources it owns vs. which were created manually.GetOAuthProviderByNameUnfiltered()to look up providers regardless of enabled status (needed for reconciliation).5. Wired into
main.go(+9 lines)Minimal integration:
The watcher only starts when
KITE_CONFIG_DIRexists and contains files. Everything degrades gracefully — if the directory doesn't exist, Kite runs exactly as before.6. Helm chart integration
charts/kite/templates/declarative-config.yaml— ConfigMap template that renderskiteConfigvalues into separate YAML filescharts/kite/templates/deployment.yaml— Added volume mount,KITE_CONFIG_DIRenv var, and achecksum/declarative-configannotation for automatic rollout on config changescharts/kite/values.yaml— DocumentedkiteConfigsection with sensible defaults (disabled by default), inline examples, and security guidance for OAuth secretsA typical Helm install:
7. Deploy examples
deploy/examples/kite-values-entra-id.yaml— Ready-to-use Azure Entra ID example with OAuth, group-based role assignments, and a custom project-scoped roledeploy/examples/declarative-config-confd.yaml— Shows how to use the conf.d pattern to split config across multiple files for team-based workflowsWhy this approach (vs. the previous CRD)
What this doesn't change
kiteConfig.enabledwork exactly as beforeLoadConfigFromEnv()still worksTesting
go build ./...— compiles cleango vet ./...— no issuesgo test ./pkg/...— all 8 suites passgo mod tidy— cleanhelm lint charts/kite— passeshelm templatewith kiteConfig enabled — renders correctly (ConfigMap, volume mount, env var, checksum annotation)Files changed
Happy to iterate on anything. Looking forward to feedback!