Skip to content

Commit

Permalink
feat: Allow konnectivity parameter override
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Witkowski committed Feb 8, 2024
1 parent 6123d9a commit a949dc2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/resources/konnectivity/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)

Check failure on line 177 in internal/resources/konnectivity/agent.go

View workflow job for this annotation

GitHub Actions / lint

no new variables on left side of := (typecheck)

Check failure on line 177 in internal/resources/konnectivity/agent.go

View workflow job for this annotation

GitHub Actions / lint

no new variables on left side of :=) (typecheck)

Check failure on line 177 in internal/resources/konnectivity/agent.go

View workflow job for this annotation

GitHub Actions / lint

no new variables on left side of :=) (typecheck)

r.resource.Spec.Template.Spec.Containers[0].Args = utilities.ArgsFromMapToSlice(args)
r.resource.Spec.Template.Spec.Containers[0].VolumeMounts = []corev1.VolumeMount{
{
Expand Down

0 comments on commit a949dc2

Please sign in to comment.