From a949dc28bde39c32b71e873dc13371c54107dc79 Mon Sep 17 00:00:00 2001 From: Jason Witkowski Date: Thu, 8 Feb 2024 16:24:40 -0500 Subject: [PATCH] feat: Allow konnectivity parameter override --- internal/resources/konnectivity/agent.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/resources/konnectivity/agent.go b/internal/resources/konnectivity/agent.go index c99113bf..7e91eca0 100644 --- a/internal/resources/konnectivity/agent.go +++ b/internal/resources/konnectivity/agent.go @@ -164,8 +164,7 @@ func (r *Agent) mutate(ctx context.Context, tenantControlPlane *kamajiv1alpha1.T r.resource.Spec.Template.Spec.Containers[0].Name = AgentName r.resource.Spec.Template.Spec.Containers[0].Command = []string{"/proxy-agent"} - args := utilities.ArgsFromSliceToMap(tenantControlPlane.Spec.Addons.Konnectivity.KonnectivityAgentSpec.ExtraArgs) - + args := make(map[string]string) args["-v"] = "8" args["--logtostderr"] = "true" args["--ca-cert"] = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt" @@ -175,6 +174,8 @@ func (r *Agent) mutate(ctx context.Context, tenantControlPlane *kamajiv1alpha1.T args["--health-server-port"] = "8134" args["--service-account-token-path"] = "/var/run/secrets/tokens/konnectivity-agent-token" + args := utilities.ArgsFromSliceToMap(tenantControlPlane.Spec.Addons.Konnectivity.KonnectivityAgentSpec.ExtraArgs) + r.resource.Spec.Template.Spec.Containers[0].Args = utilities.ArgsFromMapToSlice(args) r.resource.Spec.Template.Spec.Containers[0].VolumeMounts = []corev1.VolumeMount{ {