Skip to content

Commit

Permalink
Naming improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
bastjan committed Dec 6, 2023
1 parent 39bee5c commit 601976a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions controllers/cluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type ClusterReconciler struct {

ClientTemplateFile string
ClientRoleMappingTemplateFile string
TemplateLibraryPaths []string
JsonnetImportPaths []string

KeycloakClientIgnorePaths []string
}
Expand Down Expand Up @@ -390,7 +390,7 @@ func (r *ClusterReconciler) jsonnetVMWithContext(instance *lieutenantv1alpha1.Cl
jvm := jsonnet.MakeVM()
jvm.ExtCode("context", string(jcr))
jvm.Importer(&jsonnet.FileImporter{
JPaths: r.TemplateLibraryPaths,
JPaths: r.JsonnetImportPaths,
})
return jvm, nil
}
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var (
enableLegacyWildFlySupport bool

clientTemplateFile, clientRoleMappingTemplateFile string
templateLibraryPaths stringSliceFlag
jsonnetImportPaths stringSliceFlag

keycloakClientIgnorePaths stringSliceFlag
)
Expand Down Expand Up @@ -77,7 +77,7 @@ func main() {

flag.StringVar(&clientTemplateFile, "client-template-file", "templates/client.jsonnet", "The file containing the client template to use.")
flag.StringVar(&clientRoleMappingTemplateFile, "client-role-mapping-template-file", "templates/client-roles.jsonnet", "The file containing the client role mapping template to use.")
flag.Var(&templateLibraryPaths, "template-library-path", "A list of paths to search for Jsonnet libraries. Can be specified multiple times.")
flag.Var(&jsonnetImportPaths, "jsonnet-import-path", "A list of paths to search for Jsonnet libraries when using `import`. Can be specified multiple times.")

flag.Var(&keycloakClientIgnorePaths, "keycloak-client-ignore-paths", "A list of JSON Pointer strings (RFC 6901) to ignore when checking if changes to the Keycloak client are relevant. Can be specified multiple times. See https://pkg.go.dev/github.com/wI2L/jsondiff@v0.5.0#Ignores")

Expand Down Expand Up @@ -185,7 +185,7 @@ func main() {

ClientTemplateFile: clientTemplateFile,
ClientRoleMappingTemplateFile: clientRoleMappingTemplateFile,
TemplateLibraryPaths: templateLibraryPaths,
JsonnetImportPaths: jsonnetImportPaths,

KeycloakClientIgnorePaths: keycloakClientIgnorePaths,
}).SetupWithManager(mgr); err != nil {
Expand Down

0 comments on commit 601976a

Please sign in to comment.