<#7526 refactor: dedup k8s config onto app.K8sConf...
# flyte-github
a
#7526 refactor: dedup k8s config onto app.K8sConfig and remove redundant manager config section Pull request opened by pingsutw Tracking issue N/A — internal config cleanup. Why are the changes needed? Two related sources of config duplication in the v2 services: 1.
manager
,
actions
, and
secret
each defined their own near-duplicate
KubernetesConfig
struct for their
kubernetes
config section, even though
flytestdlib/app.K8sConfig
(the input to
InitKubernetesClient
) already defines that exact shape. 2. The
manager
package then carried a whole
manager
config section (
server
,
kubernetes
,
executor.healthProbePort
) that just duplicated config already owned by the
runs
and
actions
services. The unified binary listens on the run service's port and shares the actions service's k8s client, so a separate
manager
section was redundant. What changes were proposed in this pull request? Promote
app.K8sConfig
to the shared, config-loadable type:
•
flytestdlib/app/k8s.go
— add `json`/`pflag` tags to
K8sConfig
. It also carries
ClusterName
(used by the secret service for status reporting), so the secret section keeps its previous
secret.kubernetes.clusterName
shape. •
manager
/
actions
/
secret
— use
app.K8sConfig
directly as the
kubernetes
field and delete their local `KubernetesConfig`;
main.go
passes
cfg.Kubernetes
straight to
InitKubernetesClient
(no convert step). Remove the
manager
config section entirely:
• Delete
manager/config/
(
config.go
+ generated
config_flags
). •
manager/cmd/main.go
now reuses
runs.Server
for the HTTP listen address and
actions.Kubernetes
for the shared k8s client, instead of a manager-specific section. • The dead
Executor.HealthProbePort
field (defined but never read) is dropped. • The manager's previous k8s client tuning (
qps=1000
,
burst=2000
,
timeout=30s
) is preserved by setting it on the
actions
kubernetes
defaults, so the shared client behaves identically. •
manager/config.yaml
updated to match:
server
under
runs.server
,
kubernetes
under
actions.kubernetes
. Schema change The
manager
config section is removed; the unified binary reads
runs.server
and
actions.kubernetes
instead. The secret section is unchanged (
secret.kubernetes.*
including
clusterName
). How was this patch tested? •
go build ./...
,
go vet
,
gofmt
clean. • Regenerated
config_flags
for the affected sections; all flags present (
kubernetes.{namespace,kubeconfig,qps,burst,timeout,clusterName}
);
go test ./secret/... ./actions/config/... ./manager/...
passes. •
helm template
renders the secret section with
kubernetes.*
(including
clusterName
) for the client config. Labels changed Check all the applicable boxes • I updated the documentation accordingly. • All new and existing tests passed. • All commits are signed-off. flyteorg/flyte