Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings #146

Merged
merged 48 commits into from
Jun 20, 2023
Merged

Settings #146

merged 48 commits into from
Jun 20, 2023

Conversation

ebauman
Copy link
Member

@ebauman ebauman commented Jun 1, 2023

This PR adds support for Settings in HobbyFarm. Settings can be used for things like user preferences (e.g. dark mode), global settings (e.g. registration disabled)
This also lays the groundwork for upcoming 3rd party integrations that can leverage settings to integrate w/ HobbyFarm

  • setting type, generated clients
  • added CRD, settingserver
  • updated settings, re-gen'ed clients
  • more work
  • dot escaping, jsonPath for setting
  • Changed to using new kube_codegen.sh as recommended by upstream
  • regenerated code
  • added setting and property to gargantua
  • missed generated code?
  • changed Id to Name
  • register setting, list in scheme
  • fixed some json handling
  • fixed up some validation
  • validation webhook
  • moved servicereference to outside package
  • fixed up handling
  • validating webhook handling
  • type conversion error
  • version bumps for CVEs, features
  • moved deserializer codec out

What this PR does / why we need it:

Which issue(s) this PR fixes:

ebauman added 20 commits April 10, 2023 14:54
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
var ok = false
for _, e := range enum {
if value == e {
ok = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

early break possible

ebauman added 11 commits June 12, 2023 12:52
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
@ebauman
Copy link
Member Author

ebauman commented Jun 12, 2023

This can be tried live via ebauman/gargantua:12june2023

pkg/crd/crd.go Outdated
@@ -148,6 +156,43 @@ func GenerateCRDs(caBundle string, reference apiextv1.ServiceReference) []crder.
IsNamespaced(true).
AddVersion("v1", &v1.DynamicBindConfiguration{}, nil)
}),
hobbyfarmCRD(&v1.Scope{}, func(c *crder.CRD) {
c.IsNamespaced(true).AddVersion("v1", &v1.Scope{}, func(cv *crder.Version) {
cv.WithColumn("Name", ".displayName").IsServed(true).IsStored(true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would rename this column to "Display Name", otherwise it can be confused with the default column "Name" that prints the metadata.name

Same for the Setting CRD

ebauman added 10 commits June 13, 2023 10:14
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
Signed-off-by: Eamon Bauman <eamon@eamonbauman.com>
@ebauman ebauman merged commit 148a910 into hobbyfarm:master Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants