From 601976a79a9262b4e24fb9911e15fb15dd7b53a2 Mon Sep 17 00:00:00 2001 From: Sebastian Widmer Date: Wed, 6 Dec 2023 10:51:16 +0100 Subject: [PATCH] Naming improvements --- controllers/cluster_controller.go | 4 ++-- main.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/controllers/cluster_controller.go b/controllers/cluster_controller.go index 46d63fc..3b6c66e 100644 --- a/controllers/cluster_controller.go +++ b/controllers/cluster_controller.go @@ -55,7 +55,7 @@ type ClusterReconciler struct { ClientTemplateFile string ClientRoleMappingTemplateFile string - TemplateLibraryPaths []string + JsonnetImportPaths []string KeycloakClientIgnorePaths []string } @@ -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 } diff --git a/main.go b/main.go index 53f6fad..2e9b6b2 100644 --- a/main.go +++ b/main.go @@ -40,7 +40,7 @@ var ( enableLegacyWildFlySupport bool clientTemplateFile, clientRoleMappingTemplateFile string - templateLibraryPaths stringSliceFlag + jsonnetImportPaths stringSliceFlag keycloakClientIgnorePaths stringSliceFlag ) @@ -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") @@ -185,7 +185,7 @@ func main() { ClientTemplateFile: clientTemplateFile, ClientRoleMappingTemplateFile: clientRoleMappingTemplateFile, - TemplateLibraryPaths: templateLibraryPaths, + JsonnetImportPaths: jsonnetImportPaths, KeycloakClientIgnorePaths: keycloakClientIgnorePaths, }).SetupWithManager(mgr); err != nil {