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

rename most of the sandbox vars, params, and references #15

Merged
merged 8 commits into from
Mar 22, 2024

Conversation

MatousJobanek
Copy link
Contributor

renaming most of the variables, parameters, and references containing "sandbox" word to either KubeSaw or ksctl related names.

@@ -110,92 +110,92 @@ type ClusterNamespaces map[string]string

// LoadClusterAccessDefinition loads ClusterAccessDefinition object from the config file and checks that all required parameters are set
func LoadClusterAccessDefinition(term ioutils.Terminal, clusterName string) (ClusterAccessDefinition, error) {
sandboxUserConfig, _, err := Load(term)
ksctlConfig, _, err := Load(term)
Copy link
Contributor

Choose a reason for hiding this comment

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

cfg would be enough here. It's a shorter name, and I guess that the ksctl prefix is superfluous here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that variable name is used at multiple places, I would keep it as it is to make it consistent and self-explanatory.
if you insist on making it shorter, I could rename the occurrences to ksctlCfg, but I'm not sure if 3 chars extra is a big deal.

Copy link
Contributor

Choose a reason for hiding this comment

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

as I said, I don't really see the value of the ksctl prefix but I will not insist on this ;)

type ClusterConfig struct {
ClusterAccessDefinition
AllClusterNames []string
ClusterName string
Token string
SandboxNamespace string
KubeSawNamespace string
Copy link
Contributor

Choose a reason for hiding this comment

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

the var name remains a bit ambiguous IMO. Is it the toolchain-host-operator namespace (as we still call it now)? What about Namespace (very generic, I admit) or OperatorNamespace instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, it's a bit tricky since it can be either toolchain-host-operator or toolchian-member-operator ns.
I was thinking about:

  1. KubeSawOperatorNamespace
  2. KubeSawOpNamespace
  3. KubeSawOperatorNs
  4. KubeSawOpNs

to make it clear which type of operator we are talking about.
But yeah, OperatorNamespace could be fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

or ksOperatorNamespace

Copy link
Contributor

Choose a reason for hiding this comment

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

having a comment on the field to explain that its value can be either toolchain-host-operator or toolchain-member-operator (depending on the type of cluster we're dealing with) would be nice, too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

renamed to operatorNamespace in 3abbff6

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added comment: 7c66812

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks @MatousJobanek!

Copy link
Contributor

@fbm3307 fbm3307 left a comment

Choose a reason for hiding this comment

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

Looks Good

Copy link

codecov bot commented Mar 21, 2024

Codecov Report

Merging #15 (cb3d985) into master (f92e184) will not change coverage.
The diff coverage is 75.60%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #15   +/-   ##
=======================================
  Coverage   65.28%   65.28%           
=======================================
  Files          38       38           
  Lines        1976     1976           
=======================================
  Hits         1290     1290           
  Misses        528      528           
  Partials      158      158           
Files Coverage Δ
pkg/cmd/add_space_users.go 76.92% <100.00%> (ø)
pkg/cmd/adm/unregister_member.go 51.42% <100.00%> (ø)
pkg/cmd/approve.go 72.09% <100.00%> (ø)
pkg/cmd/base_kubectl.go 88.88% <100.00%> (ø)
pkg/cmd/create_social_event.go 85.33% <100.00%> (ø)
pkg/cmd/delete.go 70.27% <100.00%> (ø)
pkg/cmd/remove_space_users.go 70.58% <100.00%> (ø)
pkg/cmd/retarget.go 73.21% <100.00%> (ø)
pkg/cmd/status.go 78.78% <100.00%> (ø)
pkg/client/sandbox_config_file.go 0.00% <0.00%> (ø)
... and 7 more

@MatousJobanek MatousJobanek merged commit bf4324c into kubesaw:master Mar 22, 2024
7 checks passed
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.

3 participants