Skip to content

Common functions are duplicated across various scenarios #14

@Krishiv-Mahajan

Description

@Krishiv-Mahajan

All 4 scenario scripts (karmada-CLI-installtion-example, karmada-Failover-example, karmada-HA-workload-example1, karmada-HA-workload-example2) contain identical code for:

Common variable definitions (kind_version, IPs, paths)
Common functions (installKind(), createCluster(), cluster1Config(), cluster2Config(), copyConfigFilesToNode())
Common infrastructure setup steps
This resulted in ~300+ lines of duplicated code across 4 files, making maintenance difficult .

Solution
Extracted all common setup code into a single common-setup.sh file that all scenarios source and reuse.

part of karmada-io/karmada#7269

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions