Skip to content

Commit

Permalink
Settings (#146)
Browse files Browse the repository at this point in the history
* setting type, generated clients

Signed-off-by: Eamon Bauman <[email protected]>

* added CRD, settingserver

Signed-off-by: Eamon Bauman <[email protected]>

* updated settings, re-gen'ed clients

Signed-off-by: Eamon Bauman <[email protected]>

* more work

* dot escaping, jsonPath for setting

* Changed to using new kube_codegen.sh as recommended by upstream

Signed-off-by: Eamon Bauman <[email protected]>

* regenerated code

Signed-off-by: Eamon Bauman <[email protected]>

* added setting and property to gargantua

Signed-off-by: Eamon Bauman <[email protected]>

* missed generated code?

Signed-off-by: Eamon Bauman <[email protected]>

* changed Id to Name

Signed-off-by: Eamon Bauman <[email protected]>

* register setting, list in scheme

Signed-off-by: Eamon Bauman <[email protected]>

* fixed some json handling

Signed-off-by: Eamon Bauman <[email protected]>

* fixed up some validation

Signed-off-by: Eamon Bauman <[email protected]>

* validation webhook

Signed-off-by: Eamon Bauman <[email protected]>

* moved servicereference to outside package

Signed-off-by: Eamon Bauman <[email protected]>

* fixed up handling

Signed-off-by: Eamon Bauman <[email protected]>

* validating webhook handling

Signed-off-by: Eamon Bauman <[email protected]>

* type conversion error

Signed-off-by: Eamon Bauman <[email protected]>

* version bumps for CVEs, features

Signed-off-by: Eamon Bauman <[email protected]>

* moved deserializer codec out

Signed-off-by: Eamon Bauman <[email protected]>

* use label const

Signed-off-by: Eamon Bauman <[email protected]>

* json tags for settingvalidation

* added displayname and group

* restructured validation, added kubconfig to .gitignore

* removed debugging router walk

* beginning work on scope crd

* Revert "beginning work on scope crd"

This reverts commit 3057c93.

* public scope settings are.. public.

Signed-off-by: Eamon Bauman <[email protected]>

* Revert "Revert "beginning work on scope crd""

This reverts commit d7e62dd.

* regenerated clients incl new scope resource

Signed-off-by: Eamon Bauman <[email protected]>

* added list scopes endpoint

Signed-off-by: Eamon Bauman <[email protected]>

* more clientgen stuff

Signed-off-by: Eamon Bauman <[email protected]>

* reorganized validation and added scope checking

Signed-off-by: Eamon Bauman <[email protected]>

* use hfclient and not kclient

Signed-off-by: Eamon Bauman <[email protected]>

* missing some scope files from clientgen

Signed-off-by: Eamon Bauman <[email protected]>

* removing unused _ cuz goland told me to

Signed-off-by: Eamon Bauman <[email protected]>

* added CRD for scopes

Signed-off-by: Eamon Bauman <[email protected]>

* name, not namespace!

Signed-off-by: Eamon Bauman <[email protected]>

* remove quotes from string scalars

Signed-off-by: Eamon Bauman <[email protected]>

* preinstall of settings and scopes

Signed-off-by: Eamon Bauman <[email protected]>

* continue instead of return

Signed-off-by: Eamon Bauman <[email protected]>

* internal setting client

Signed-off-by: Eamon Bauman <[email protected]>

* register scope, scopelist into schema

Signed-off-by: Eamon Bauman <[email protected]>

* settingclient startup, preinstall resources

Signed-off-by: Eamon Bauman <[email protected]>

* formatting fix

Signed-off-by: Eamon Bauman <[email protected]>

* added checking for disabled registration

Signed-off-by: Eamon Bauman <[email protected]>

* cleaned up loop logic

Signed-off-by: Eamon Bauman <[email protected]>

* proper naming of displayname columns

Signed-off-by: Eamon Bauman <[email protected]>

---------

Signed-off-by: Eamon Bauman <[email protected]>
  • Loading branch information
ebauman authored Jun 20, 2023
1 parent b5cfc75 commit 148a910
Show file tree
Hide file tree
Showing 67 changed files with 3,698 additions and 589 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ artifacts/testing

# docker-compose enviornment variables
/.env

kubeconfig
37 changes: 32 additions & 5 deletions generate-client.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,34 @@
#!/bin/bash

$(pwd)/generate-groups.sh all \
github.com/hobbyfarm/gargantua/pkg/client \
github.com/hobbyfarm/gargantua/pkg/apis \
"hobbyfarm.io:v1,v2 terraformcontroller.cattle.io:v1" \
--go-header-file ./hack/boilerplate.go.txt
source kube_codegen.sh

mkdir -p pkg/client/clientset
mkdir -p pkg/client/listers
mkdir -p pkg/client/informers

kube::codegen::gen_helpers \
--input-pkg-root github.com/hobbyfarm/gargantua/pkg/apis \
--output-base "${GOPATH}"/src

kube::codegen::gen_client \
--input-pkg-root github.com/hobbyfarm/gargantua/pkg/apis \
--output-pkg-root github.com/hobbyfarm/gargantua/pkg/client \
--boilerplate ./hack/boilerplate.go.txt \
--output-base "${GOPATH}"/src \
--clientset-name clientset \
--versioned-name versioned \
--listers-name listers \
--informers-name informers \
--with-watch

kube::codegen::gen_helpers \
--input-pkg-root github.com/hobbyfarm/gargantua/pkg/property \
--output-base "${GOPATH}"/src 2>&1 | grep -v -e "GenericType"

# The previous command ignores any lines w/ string GenericType
# This is to suppress a warning about deepcopy-gen not being able to support a generic type
# used as a type constraint. This shouldn't affect anything and is only cosmetic for developers
# to not worry about the error.
# The error is logged below for posterity.
#
# W0523 16:50:47.161458 74104 parse.go:862] Making unsupported type entry "GenericType" for: &types.TypeParam{check:(*types.Checker)(nil), id:0x2, obj:(*types.TypeName)(0x140086f8f00), index:0, bound:(*types.Interface)(0x140000c0aa0)}
95 changes: 0 additions & 95 deletions generate-groups.sh

This file was deleted.

14 changes: 10 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ replace k8s.io/client-go => k8s.io/client-go v0.25.2

require (
github.com/dgrijalva/jwt-go v3.2.1-0.20200107013213-dc14462fd587+incompatible
github.com/ebauman/crder v0.0.17
github.com/ebauman/crder v0.1.0
github.com/golang/glog v1.0.0
github.com/gorilla/handlers v1.4.0
github.com/gorilla/mux v1.8.0
github.com/gorilla/websocket v1.4.2
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
github.com/peterhellberg/duration v0.0.2
github.com/pkg/errors v0.9.1
github.com/rancher/terraform-controller v0.0.10-alpha1
github.com/rancher/wrangler v1.0.0
github.com/rancher/wrangler v1.0.1
github.com/xeipuuv/gojsonschema v1.2.0
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
k8s.io/api v0.25.2
Expand All @@ -27,6 +30,7 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
Expand All @@ -42,17 +46,18 @@ require (
github.com/mailru/easyjson v0.7.7 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rancher/lasso v0.0.0-20210616224652-fc3ebd901c08 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.0.0-20221002022538-bcab6841153b // indirect
golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect
golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec // indirect
golang.org/x/term v0.0.0-20220919170432-7a66f970e087 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/text v0.3.8 // indirect
golang.org/x/time v0.0.0-20220922220347-f3bd1da661af // indirect
golang.org/x/tools v0.1.12 // indirect
google.golang.org/appengine v1.6.7 // indirect
Expand All @@ -64,6 +69,7 @@ require (
k8s.io/klog/v2 v2.80.1 // indirect
k8s.io/kube-openapi v0.0.0-20220928191237-829ce0c27909 // indirect
k8s.io/utils v0.0.0-20220922133306-665eaaec4324 // indirect
sigs.k8s.io/controller-runtime v0.13.0 // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
Expand Down
Loading

0 comments on commit 148a910

Please sign in to comment.