Repository: kubernetes-sigs/cloud-provider-azure
Pull request #5072 (2023-11-27 05:48:24)

Refactor: move CloudConfigType to configloader package
<!--  Thanks for sending a pull request!  Here are some tips for you:

1. If this is your first time, please read our contributor guidelines: https://git.k8s.io/community/contributors/guide/first-contribution.md#your-first-contribution and developer guide https://git.k8s.io/community/contributors/devel/development.md#development-guide
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request. For reference on required PR/issue labels, read here:
https://git.k8s.io/community/contributors/devel/sig-release/release.md#issuepr-kind-label
3. Ensure you have added or ran the appropriate tests for your PR: https://git.k8s.io/community/contributors/devel/sig-testing/testing.md
4. If you want *faster* PR reviews, read how: https://git.k8s.io/community/contributors/guide/pull-requests.md#best-practices-for-faster-reviews
5. If the PR is unfinished, see how to mark it: https://git.k8s.io/community/contributors/guide/pull-requests.md#marking-unfinished-pull-requests
-->

#### What type of PR is this?
/kind cleanup

<!--
Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind design

Optionally add one or more of the following kinds if applicable:
/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->

#### What this PR does / why we need it:
Refactor: move CloudConfigType to configloader package
Fix bug: loader will return error when fileconfig is not set, 
#### Which issue(s) this PR fixes:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
-->
Fixes #

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?
<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".

For more information on release notes see: https://git.k8s.io/community/contributors/guide/release-notes.md
-->
```release-note
NONE
```

#### Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

<!--
This section can be blank if this pull request does not require a release note.

When adding links which point to resources within git repositories, like
KEPs or supporting documentation, please reference a specific commit and avoid
linking directly to the master branch. This ensures that links reference a
specific point in time, rather than a document that may change over time.

See here for guidance on getting permanent links to files: https://help.github.com/en/articles/getting-permanent-links-to-files

Please use the following format for linking documentation:
- [KEP]: <link>
- [Usage]: <link>
- [Other doc]: <link>
-->
```docs

```


k8s-ci-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-sigs/cloud-provider-azure/pull/5072#" title="Author self-approved">MartinForReal</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubernetes-sigs%2Fcloud-provider-azure).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/kubernetes-sigs/cloud-provider-azure/blob/master/OWNERS)~~ [MartinForReal]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
k8s-ci-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-sigs/cloud-provider-azure/pull/5072#pullrequestreview-1749691102" title="LGTM">andyzhangx</a>*, *<a href="https://github.com/kubernetes-sigs/cloud-provider-azure/pull/5072#" title="Author self-approved">MartinForReal</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubernetes-sigs%2Fcloud-provider-azure).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/kubernetes-sigs/cloud-provider-azure/blob/master/OWNERS)~~ [MartinForReal,andyzhangx]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
k8s-ci-robot: @MartinForReal: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz | 6a3b5a0e6bddecb872e966964743287ab9d76add | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz/1729014296358162432) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=cloud-provider-azure&pr=5072). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AMartinForReal). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/cloud-provider-azure/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
MartinForReal: <html>
<body>
<!--StartFragment-->
/test pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz
--


<br class="Apple-interchange-newline"><!--EndFragment-->
</body>
</html>
k8s-ci-robot: @MartinForReal: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz | 6a3b5a0e6bddecb872e966964743287ab9d76add | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz/1729014296358162432) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz`
pull-cloud-provider-azure-e2e-ccm-capz | 6a3b5a0e6bddecb872e966964743287ab9d76add | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-capz/1729014296295247872) | true | `/test pull-cloud-provider-azure-e2e-ccm-capz`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=cloud-provider-azure&pr=5072). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AMartinForReal). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/cloud-provider-azure/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @MartinForReal: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz | 6a3b5a0e6bddecb872e966964743287ab9d76add | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz/1729014296358162432) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz`
pull-cloud-provider-azure-e2e-ccm-capz | 6a3b5a0e6bddecb872e966964743287ab9d76add | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-capz/1729014296295247872) | true | `/test pull-cloud-provider-azure-e2e-ccm-capz`
pull-cloud-provider-azure-e2e-ccm-vmss-capz | 6a3b5a0e6bddecb872e966964743287ab9d76add | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmss-capz/1729014296114892800) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmss-capz`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=cloud-provider-azure&pr=5072). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AMartinForReal). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/cloud-provider-azure/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @MartinForReal: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz | 6a3b5a0e6bddecb872e966964743287ab9d76add | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz/1729014296358162432) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz`
pull-cloud-provider-azure-e2e-ccm-capz | 6a3b5a0e6bddecb872e966964743287ab9d76add | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-capz/1729014296295247872) | true | `/test pull-cloud-provider-azure-e2e-ccm-capz`
pull-cloud-provider-azure-e2e-ccm-vmss-capz | 6a3b5a0e6bddecb872e966964743287ab9d76add | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmss-capz/1729014296114892800) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmss-capz`
pull-cloud-provider-azure-e2e-ccm-vmssflex-capz | 6a3b5a0e6bddecb872e966964743287ab9d76add | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmssflex-capz/1729014296173613056) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmssflex-capz`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=cloud-provider-azure&pr=5072). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AMartinForReal). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/cloud-provider-azure/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @MartinForReal: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-cloud-provider-azure-e2e-ccm-capz | 6a3b5a0e6bddecb872e966964743287ab9d76add | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-capz/1729014296295247872) | true | `/test pull-cloud-provider-azure-e2e-ccm-capz`
pull-cloud-provider-azure-e2e-ccm-vmss-capz | 6a3b5a0e6bddecb872e966964743287ab9d76add | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmss-capz/1729014296114892800) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmss-capz`
pull-cloud-provider-azure-e2e-ccm-vmssflex-capz | 6a3b5a0e6bddecb872e966964743287ab9d76add | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmssflex-capz/1729014296173613056) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmssflex-capz`
pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz | 6a3b5a0e6bddecb872e966964743287ab9d76add | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz/1729049213871853568) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=cloud-provider-azure&pr=5072). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AMartinForReal). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/cloud-provider-azure/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
MartinForReal: /retest
k8s-ci-robot: @MartinForReal: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-cloud-provider-azure-e2e-ccm-capz | 6a3b5a0e6bddecb872e966964743287ab9d76add | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-capz/1729014296295247872) | true | `/test pull-cloud-provider-azure-e2e-ccm-capz`
pull-cloud-provider-azure-e2e-ccm-vmss-capz | 6a3b5a0e6bddecb872e966964743287ab9d76add | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmss-capz/1729014296114892800) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmss-capz`
pull-cloud-provider-azure-e2e-ccm-vmssflex-capz | 6a3b5a0e6bddecb872e966964743287ab9d76add | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmssflex-capz/1729014296173613056) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmssflex-capz`
pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz | 6a3b5a0e6bddecb872e966964743287ab9d76add | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz/1729373042322182144) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=cloud-provider-azure&pr=5072). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AMartinForReal). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/cloud-provider-azure/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
MartinForReal: /retest
k8s-ci-robot: New changes are detected. LGTM label has been removed.
k8s-ci-robot: @MartinForReal: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz | 22e059491c48df6f816a888d7a6d42bdfaa420aa | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz/1729461028929933312) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=cloud-provider-azure&pr=5072). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AMartinForReal). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/cloud-provider-azure/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
MartinForReal: <html>
<body>
<!--StartFragment-->
/test pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz
--


<br class="Apple-interchange-newline"><!--EndFragment-->
</body>
</html>
k8s-ci-robot: @MartinForReal: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz | 22e059491c48df6f816a888d7a6d42bdfaa420aa | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz/1729461028929933312) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz`
pull-cloud-provider-azure-e2e-ccm-vmss-multi-slb-capz | 22e059491c48df6f816a888d7a6d42bdfaa420aa | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmss-multi-slb-capz/1729461028988653568) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmss-multi-slb-capz`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=cloud-provider-azure&pr=5072). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AMartinForReal). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/cloud-provider-azure/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
MartinForReal: /retest
k8s-ci-robot: @MartinForReal: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz | 22e059491c48df6f816a888d7a6d42bdfaa420aa | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz/1729686550247116800) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=cloud-provider-azure&pr=5072). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AMartinForReal). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/cloud-provider-azure/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
MartinForReal: <html>
<body>
<!--StartFragment-->
/test pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz
--


<br class="Apple-interchange-newline"><!--EndFragment-->
</body>
</html>
k8s-ci-robot: PR needs rebase.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
</details>
k8s-ci-robot: New changes are detected. LGTM label has been removed.
k8s-ci-robot: @MartinForReal: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz | a5f186e400278cfbe592a0179005ca6952eb5413 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz/1730057703574736896) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz`
pull-cloud-provider-azure-e2e-ccm-vmssflex-capz | a5f186e400278cfbe592a0179005ca6952eb5413 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmssflex-capz/1730057703411159040) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmssflex-capz`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=cloud-provider-azure&pr=5072). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AMartinForReal). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/cloud-provider-azure/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
MartinForReal: /retest
k8s-ci-robot: @MartinForReal: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz | a5f186e400278cfbe592a0179005ca6952eb5413 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz/1730057703574736896) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz`
pull-cloud-provider-azure-e2e-ccm-vmssflex-capz | a5f186e400278cfbe592a0179005ca6952eb5413 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmssflex-capz/1730057703411159040) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmssflex-capz`
pull-cloud-provider-azure-e2e-ccm-vmss-capz | a5f186e400278cfbe592a0179005ca6952eb5413 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmss-capz/1730057703352438784) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmss-capz`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=cloud-provider-azure&pr=5072). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AMartinForReal). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/cloud-provider-azure/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @MartinForReal: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz | a5f186e400278cfbe592a0179005ca6952eb5413 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz/1730057703574736896) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz`
pull-cloud-provider-azure-e2e-ccm-vmssflex-capz | a5f186e400278cfbe592a0179005ca6952eb5413 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmssflex-capz/1730057703411159040) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmssflex-capz`
pull-cloud-provider-azure-e2e-ccm-vmss-capz | a5f186e400278cfbe592a0179005ca6952eb5413 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmss-capz/1730057703352438784) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmss-capz`
pull-cloud-provider-azure-e2e-ccm-vmss-multi-slb-capz | a5f186e400278cfbe592a0179005ca6952eb5413 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmss-multi-slb-capz/1730057703629262848) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmss-multi-slb-capz`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=cloud-provider-azure&pr=5072). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AMartinForReal). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/cloud-provider-azure/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
MartinForReal: /retest
k8s-ci-robot: @MartinForReal: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz | a5f186e400278cfbe592a0179005ca6952eb5413 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz/1730057703574736896) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz`
pull-cloud-provider-azure-e2e-ccm-vmssflex-capz | a5f186e400278cfbe592a0179005ca6952eb5413 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmssflex-capz/1730057703411159040) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmssflex-capz`
pull-cloud-provider-azure-e2e-ccm-vmss-multi-slb-capz | a5f186e400278cfbe592a0179005ca6952eb5413 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmss-multi-slb-capz/1730057703629262848) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmss-multi-slb-capz`
pull-cloud-provider-azure-e2e-ccm-vmss-capz | a5f186e400278cfbe592a0179005ca6952eb5413 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cloud-provider-azure/5072/pull-cloud-provider-azure-e2e-ccm-vmss-capz/1730107518174105600) | true | `/test pull-cloud-provider-azure-e2e-ccm-vmss-capz`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=cloud-provider-azure&pr=5072). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3AMartinForReal). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/cloud-provider-azure/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
MartinForReal: /test
k8s-ci-robot: @MartinForReal: The `/test` command needs one or more targets.
The following commands are available to trigger required jobs:
* `/test pull-cloud-provider-azure-check`
* `/test pull-cloud-provider-azure-e2e-capz`
* `/test pull-cloud-provider-azure-e2e-ccm-capz`
* `/test pull-cloud-provider-azure-e2e-ccm-dualstack-capz`
* `/test pull-cloud-provider-azure-e2e-ccm-dualstack-vmss-capz`
* `/test pull-cloud-provider-azure-e2e-ccm-ipv6-capz`
* `/test pull-cloud-provider-azure-e2e-ccm-ipv6-vmss-capz`
* `/test pull-cloud-provider-azure-e2e-ccm-vmss-capz`
* `/test pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz`
* `/test pull-cloud-provider-azure-e2e-ccm-vmss-multi-slb-capz`
* `/test pull-cloud-provider-azure-e2e-ccm-vmssflex-capz`
* `/test pull-cloud-provider-azure-unit`

Use `/test all` to run the following jobs that were automatically triggered:
* `pull-cloud-provider-azure-check`
* `pull-cloud-provider-azure-e2e-capz`
* `pull-cloud-provider-azure-e2e-ccm-capz`
* `pull-cloud-provider-azure-e2e-ccm-vmss-capz`
* `pull-cloud-provider-azure-e2e-ccm-vmss-ip-lb-capz`
* `pull-cloud-provider-azure-e2e-ccm-vmss-multi-slb-capz`
* `pull-cloud-provider-azure-e2e-ccm-vmssflex-capz`
* `pull-cloud-provider-azure-unit`



<details>

In response to [this](https://github.com/kubernetes-sigs/cloud-provider-azure/pull/5072#issuecomment-1833187204):

>/test


Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
</details>
MartinForReal: /test pull-cloud-provider-azure-e2e-ccm-vmss-capz
k8s-ci-robot: PR needs rebase.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
</details>

Patch:
diff --git a/go.mod b/go.mod
index 3855757ad..9b1c891cf 100644
--- a/go.mod
+++ b/go.mod
@@ -40,7 +40,7 @@ require (
 	k8s.io/kubelet v0.28.4
 	k8s.io/utils v0.0.0-20230505201702-9f6742963106
 	sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.0.0-20231026070501-3da8dcab4c0d
-	sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader v0.0.0-20231114011710-4192b264611a
+	sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader v0.0.0-20231127051539-860b1f095d2b
 	sigs.k8s.io/yaml v1.4.0
 )
 
diff --git a/go.sum b/go.sum
index bdf1c7e2e..e016d1d3a 100644
--- a/go.sum
+++ b/go.sum
@@ -594,8 +594,8 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 h1:trsWhjU5jZrx6U
 sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2/go.mod h1:+qG7ISXqCDVVcyO8hLn12AKVYYUjM7ftlqsqmrhMZE0=
 sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.0.0-20231026070501-3da8dcab4c0d h1:gPX8lv9laJc9cr1WRloKjdLryZMUjDjaigVObwH8frc=
 sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.0.0-20231026070501-3da8dcab4c0d/go.mod h1:E2qeqG3LlhLyxv664uSxJcHiXjZOoIKYLbohPgp5ssM=
-sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader v0.0.0-20231114011710-4192b264611a h1:/ExXin7Q7TWxfbP2lv7W9v0EcLR7d1LjPnmUCM8bkO0=
-sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader v0.0.0-20231114011710-4192b264611a/go.mod h1:nVj5nwFp7BylDi46NpGWcK9eMHLmMXAcGmLutuypgRE=
+sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader v0.0.0-20231127051539-860b1f095d2b h1:VZgnzf0Zfjvf8HIR26fL9mNFYcg8O/6rcIRrgSRVgFY=
+sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader v0.0.0-20231127051539-860b1f095d2b/go.mod h1:JY+50qlRnEpQGhcw8fem/o9E/Q8OvmWSJPov+SpxTXM=
 sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
 sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
 sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE=
diff --git a/pkg/provider/azure.go b/pkg/provider/azure.go
index c9a751108..97561461e 100644
--- a/pkg/provider/azure.go
+++ b/pkg/provider/azure.go
@@ -112,7 +112,7 @@ type Config struct {
 	ratelimitconfig.CloudProviderRateLimitConfig `json:",inline" yaml:",inline"`
 
 	// The cloud configure type for Azure cloud provider. Supported values are file, secret and merge.
-	CloudConfigType cloudConfigType `json:"cloudConfigType,omitempty" yaml:"cloudConfigType,omitempty"`
+	CloudConfigType configloader.CloudConfigType `json:"cloudConfigType,omitempty" yaml:"cloudConfigType,omitempty"`
 
 	// The name of the resource group that the cluster is deployed in
 	ResourceGroup string `json:"resourceGroup,omitempty" yaml:"resourceGroup,omitempty"`
@@ -565,12 +565,12 @@ func (az *Cloud) InitializeCloudFromConfig(ctx context.Context, config *Config,
 
 	if config.CloudConfigType == "" {
 		// The default cloud config type is cloudConfigTypeMerge.
-		config.CloudConfigType = cloudConfigTypeMerge
+		config.CloudConfigType = configloader.CloudConfigTypeMerge
 	} else {
 		supportedCloudConfigTypes := sets.New(
-			string(cloudConfigTypeMerge),
-			string(cloudConfigTypeFile),
-			string(cloudConfigTypeSecret))
+			string(configloader.CloudConfigTypeMerge),
+			string(configloader.CloudConfigTypeFile),
+			string(configloader.CloudConfigTypeSecret))
 		if !supportedCloudConfigTypes.Has(string(config.CloudConfigType)) {
 			return fmt.Errorf("cloudConfigType %v is not supported, supported values are %v", config.CloudConfigType, supportedCloudConfigTypes.UnsortedList())
 		}
@@ -677,7 +677,7 @@ func (az *Cloud) InitializeCloudFromConfig(ctx context.Context, config *Config,
 		// No credentials provided, useInstanceMetadata should be enabled for Kubelet.
 		// TODO(feiskyer): print different error message for Kubelet and controller-manager, as they're
 		// requiring different credential settings.
-		if !config.UseInstanceMetadata && config.CloudConfigType == cloudConfigTypeFile {
+		if !config.UseInstanceMetadata && config.CloudConfigType == configloader.CloudConfigTypeFile {
 			return fmt.Errorf("useInstanceMetadata must be enabled without Azure credentials")
 		}
 
diff --git a/pkg/provider/azure_config.go b/pkg/provider/azure_config.go
deleted file mode 100644
index ccfac7184..000000000
--- a/pkg/provider/azure_config.go
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-Copyright 2020 The Kubernetes Authors.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package provider
-
-// The config type for Azure cloud provider secret. Supported values are:
-// * file   : The values are read from local cloud-config file.
-// * secret : The values from secret would override all configures from local cloud-config file.
-// * merge  : The values from secret would override only configurations that are explicitly set in the secret. This is the default value.
-type cloudConfigType string
-
-const (
-	cloudConfigTypeFile   cloudConfigType = "file"
-	cloudConfigTypeSecret cloudConfigType = "secret"
-	cloudConfigTypeMerge  cloudConfigType = "merge"
-)
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 7a3d4f546..c0b6d00d2 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1465,7 +1465,7 @@ sigs.k8s.io/cloud-provider-azure/pkg/azclient/virtualmachineclient
 sigs.k8s.io/cloud-provider-azure/pkg/azclient/virtualmachinescalesetclient
 sigs.k8s.io/cloud-provider-azure/pkg/azclient/virtualmachinescalesetvmclient
 sigs.k8s.io/cloud-provider-azure/pkg/azclient/virtualnetworkclient
-# sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader v0.0.0-20231114011710-4192b264611a
+# sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader v0.0.0-20231127051539-860b1f095d2b
 ## explicit; go 1.20
 sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader
 # sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd
diff --git a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/config_loader.go b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/config_loader.go
index a2b878f43..5832ac42c 100644
--- a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/config_loader.go
+++ b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/config_loader.go
@@ -20,6 +20,6 @@ import (
 	"context"
 )
 
-type ConfigLoader[Type any] interface {
+type configLoader[Type any] interface {
 	Load(ctx context.Context) (*Type, error)
 }
diff --git a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/load.go b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/load.go
index be30a4cc9..efa79c52b 100644
--- a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/load.go
+++ b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/load.go
@@ -18,13 +18,12 @@ package configloader
 
 import (
 	"context"
-	"fmt"
 	"strings"
 
 	clientset "k8s.io/client-go/kubernetes"
 )
 
-type decoderFactory[Type any] func(content []byte, loader ConfigLoader[Type]) ConfigLoader[Type]
+type decoderFactory[Type any] func(content []byte, loader configLoader[Type]) configLoader[Type]
 type K8sSecretLoaderConfig struct {
 	K8sSecretConfig
 	KubeClient clientset.Interface
@@ -38,45 +37,42 @@ type FileLoaderConfig struct {
 // * file   : The values are read from local cloud-config file.
 // * secret : The values from secret would override all configures from local cloud-config file.
 // * merge  : The values from secret would override only configurations that are explicitly set in the secret. This is the default value.
-type cloudConfigType string
+type CloudConfigType string
 
 const (
-	CloudConfigTypeFile   cloudConfigType = "file"
-	CloudConfigTypeSecret cloudConfigType = "secret"
-	CloudConfigTypeMerge  cloudConfigType = "merge"
+	CloudConfigTypeFile   CloudConfigType = "file"
+	CloudConfigTypeSecret CloudConfigType = "secret"
+	CloudConfigTypeMerge  CloudConfigType = "merge"
 )
 
 type ConfigMergeConfig struct {
 	// The cloud configure type for Azure cloud provider. Supported values are file, secret and merge.
-	CloudConfigType cloudConfigType `json:"cloudConfigType,omitempty" yaml:"cloudConfigType,omitempty"`
+	CloudConfigType CloudConfigType `json:"cloudConfigType,omitempty" yaml:"cloudConfigType,omitempty"`
 }
 
 func Load[Type any](ctx context.Context, secretLoaderConfig *K8sSecretLoaderConfig, fileLoaderConfig *FileLoaderConfig) (*Type, error) {
-
-	if fileLoaderConfig == nil {
-		return nil, fmt.Errorf("config file load config is nil")
-	}
-	//by default the config load type  is merge
-	loadConfigloader := NewEmptyLoader[ConfigMergeConfig](&ConfigMergeConfig{CloudConfigType: CloudConfigTypeMerge})
-	loadConfigloader = NewFileLoader(fileLoaderConfig.FilePath, loadConfigloader, NewYamlByteLoader[ConfigMergeConfig])
-	loadConfig, err := loadConfigloader.Load(ctx)
-	if err != nil {
-		return nil, err
-	}
-
-	configloader := NewFileLoader(fileLoaderConfig.FilePath, nil, NewYamlByteLoader[Type])
-	if strings.EqualFold(string(loadConfig.CloudConfigType), string(CloudConfigTypeFile)) {
-		return configloader.Load(ctx)
+	configloader := newEmptyLoader[Type](nil)
+	var loadConfig *ConfigMergeConfig
+	var err error
+	if fileLoaderConfig != nil {
+		loadConfigloader := newEmptyLoader[ConfigMergeConfig](&ConfigMergeConfig{CloudConfigType: CloudConfigTypeMerge})
+		loadConfigloader = newFileLoader(fileLoaderConfig.FilePath, loadConfigloader, newYamlByteLoader[ConfigMergeConfig])
+		//by default the config load type  is merge
+		loadConfig, err = loadConfigloader.Load(ctx)
+		if err != nil {
+			return nil, err
+		}
+		configloader = newFileLoader(fileLoaderConfig.FilePath, nil, newYamlByteLoader[Type])
+		if strings.EqualFold(string(loadConfig.CloudConfigType), string(CloudConfigTypeFile)) {
+			return configloader.Load(ctx)
+		}
 	}
-
-	if secretLoaderConfig == nil {
-		return nil, fmt.Errorf("secret load config is nil")
-	}
-
-	if strings.EqualFold(string(loadConfig.CloudConfigType), string(CloudConfigTypeSecret)) {
-		configloader = NewK8sSecretLoader(&secretLoaderConfig.K8sSecretConfig, secretLoaderConfig.KubeClient, nil, NewYamlByteLoader[Type])
-		return configloader.Load(ctx)
+	if secretLoaderConfig != nil {
+		if loadConfig != nil && strings.EqualFold(string(loadConfig.CloudConfigType), string(CloudConfigTypeSecret)) {
+			configloader = newK8sSecretLoader(&secretLoaderConfig.K8sSecretConfig, secretLoaderConfig.KubeClient, nil, newYamlByteLoader[Type])
+		} else {
+			configloader = newK8sSecretLoader(&secretLoaderConfig.K8sSecretConfig, secretLoaderConfig.KubeClient, configloader, newYamlByteLoader[Type])
+		}
 	}
-	configloader = NewK8sSecretLoader(&secretLoaderConfig.K8sSecretConfig, secretLoaderConfig.KubeClient, configloader, NewYamlByteLoader[Type])
 	return configloader.Load(ctx)
 }
diff --git a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/loader_empty.go b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/loader_empty.go
index 70b9ee0d5..894490bbb 100644
--- a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/loader_empty.go
+++ b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/loader_empty.go
@@ -20,19 +20,19 @@ import (
 	"context"
 )
 
-type EmptyLoader[Type any] struct {
+type emptyLoader[Type any] struct {
 	Data *Type
 }
 
-func (e *EmptyLoader[Type]) Load(ctx context.Context) (*Type, error) {
+func (e *emptyLoader[Type]) Load(ctx context.Context) (*Type, error) {
 	return e.Data, nil
 }
 
-func NewEmptyLoader[Type any](config *Type) ConfigLoader[Type] {
+func newEmptyLoader[Type any](config *Type) configLoader[Type] {
 	if config == nil {
 		config = new(Type)
 	}
-	return &EmptyLoader[Type]{
+	return &emptyLoader[Type]{
 		Data: config,
 	}
 }
diff --git a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/loader_file.go b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/loader_file.go
index bc33b0f9d..44baddf89 100644
--- a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/loader_file.go
+++ b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/loader_file.go
@@ -18,46 +18,35 @@ package configloader
 
 import (
 	"context"
-	"io"
 	"os"
 )
 
 type FileLoader[Type any] struct {
 	filePath string
-	ConfigLoader[Type]
+	configLoader[Type]
 	decoderFactory[Type]
 }
 
-func NewFileLoader[Type any](filePath string, loader ConfigLoader[Type], decoder decoderFactory[Type]) ConfigLoader[Type] {
+// newFileLoader creates a FileLoader with the specified file path and loader.
+// decoderFactory is a function that creates a new loader from the content of the file. it should never be nil.
+func newFileLoader[Type any](filePath string, loader configLoader[Type], decoder decoderFactory[Type]) configLoader[Type] {
 	return &FileLoader[Type]{
 		filePath:       filePath,
-		ConfigLoader:   loader,
+		configLoader:   loader,
 		decoderFactory: decoder,
 	}
 }
 
 func (f *FileLoader[Type]) Load(ctx context.Context) (*Type, error) {
-	if f.ConfigLoader == nil {
-		f.ConfigLoader = NewEmptyLoader[Type](nil)
+	if f.configLoader == nil {
+		f.configLoader = newEmptyLoader[Type](nil)
 	}
 
-	var content []byte
-	if err := func() error {
-		file, err := os.Open(f.filePath)
-		if err != nil {
-			return err
-		}
-		defer file.Close()
-
-		content, err = io.ReadAll(file)
-		if err != nil {
-			return err
-		}
-		return nil
-	}(); err != nil {
+	content, err := os.ReadFile(f.filePath)
+	if err != nil {
 		return nil, err
 	}
 
-	loader := f.decoderFactory(content, f.ConfigLoader)
+	loader := f.decoderFactory(content, f.configLoader)
 	return loader.Load(ctx)
 }
diff --git a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/loader_secret.go b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/loader_secret.go
index b8cf9e564..6e114f14c 100644
--- a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/loader_secret.go
+++ b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/loader_secret.go
@@ -25,9 +25,9 @@ import (
 	clientset "k8s.io/client-go/kubernetes"
 )
 
-type K8sSecretLoader[Type any] struct {
+type k8sSecretLoader[Type any] struct {
 	KubeClient clientset.Interface
-	ConfigLoader[Type]
+	configLoader[Type]
 	*K8sSecretConfig
 	decoderFactory[Type]
 }
@@ -50,7 +50,10 @@ type K8sSecretConfig struct {
 	CloudConfigKey  string `json:"cloudConfigKey,omitempty" yaml:"cloudConfigKey,omitempty"`
 }
 
-func NewK8sSecretLoader[Type any](config *K8sSecretConfig, KubeClient kubernetes.Interface, loader ConfigLoader[Type], decoder decoderFactory[Type]) ConfigLoader[Type] {
+// newK8sSecretLoader returns a config loader which load config from k8s secret.
+// If KubeClient is nil, it will return nil.
+// decoderFactory is a function that creates a new loader from the content of the secret. it should never be nil.
+func newK8sSecretLoader[Type any](config *K8sSecretConfig, KubeClient kubernetes.Interface, loader configLoader[Type], decoder decoderFactory[Type]) configLoader[Type] {
 	if KubeClient == nil {
 		return nil
 	}
@@ -66,17 +69,17 @@ func NewK8sSecretLoader[Type any](config *K8sSecretConfig, KubeClient kubernetes
 	if config.CloudConfigKey == "" {
 		config.CloudConfigKey = DefaultCloudProviderConfigSecKey
 	}
-	return &K8sSecretLoader[Type]{
-		ConfigLoader:    loader,
+	return &k8sSecretLoader[Type]{
+		configLoader:    loader,
 		K8sSecretConfig: config,
 		decoderFactory:  decoder,
 		KubeClient:      KubeClient,
 	}
 }
 
-func (k *K8sSecretLoader[Type]) Load(ctx context.Context) (*Type, error) {
-	if k.ConfigLoader == nil {
-		k.ConfigLoader = NewEmptyLoader[Type](nil)
+func (k *k8sSecretLoader[Type]) Load(ctx context.Context) (*Type, error) {
+	if k.configLoader == nil {
+		k.configLoader = newEmptyLoader[Type](nil)
 	}
 
 	if k.KubeClient == nil {
@@ -95,6 +98,6 @@ func (k *K8sSecretLoader[Type]) Load(ctx context.Context) (*Type, error) {
 	if content, ok = secret.Data[k.CloudConfigKey]; !ok {
 		return nil, ErrNoData
 	}
-	loader := k.decoderFactory([]byte(content), k.ConfigLoader)
+	loader := k.decoderFactory([]byte(content), k.configLoader)
 	return loader.Load(ctx)
 }
diff --git a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/loader_yaml.go b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/loader_yaml.go
index 5de8b4acc..c5a8a1f30 100644
--- a/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/loader_yaml.go
+++ b/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader/loader_yaml.go
@@ -23,18 +23,18 @@ import (
 	"sigs.k8s.io/yaml"
 )
 
-// YamlByteLoader is a FactoryConfigLoader that loads a YAML file from a byte array.
-type YamlByteLoader[Type any] struct {
+// yamlByteLoader is a FactoryConfigLoader that loads a YAML file from a byte array.
+type yamlByteLoader[Type any] struct {
 	content []byte
-	ConfigLoader[Type]
+	configLoader[Type]
 }
 
 // Load loads the YAML file from the byte array and returns the client factory config.
-func (s *YamlByteLoader[Type]) Load(ctx context.Context) (*Type, error) {
-	if s.ConfigLoader == nil {
-		s.ConfigLoader = NewEmptyLoader[Type](nil)
+func (s *yamlByteLoader[Type]) Load(ctx context.Context) (*Type, error) {
+	if s.configLoader == nil {
+		s.configLoader = newEmptyLoader[Type](nil)
 	}
-	config, err := s.ConfigLoader.Load(ctx)
+	config, err := s.configLoader.Load(ctx)
 	if err != nil {
 		return nil, err
 	}
@@ -45,10 +45,10 @@ func (s *YamlByteLoader[Type]) Load(ctx context.Context) (*Type, error) {
 	return config, nil
 }
 
-// NewYamlByteLoader creates a YamlByteLoader with the specified content and loader.
-func NewYamlByteLoader[Type any](content []byte, loader ConfigLoader[Type]) ConfigLoader[Type] {
-	return &YamlByteLoader[Type]{
+// newYamlByteLoader creates a YamlByteLoader with the specified content and loader.
+func newYamlByteLoader[Type any](content []byte, loader configLoader[Type]) configLoader[Type] {
+	return &yamlByteLoader[Type]{
 		content:      content,
-		ConfigLoader: loader,
+		configLoader: loader,
 	}
 }


Test patch:
diff --git a/pkg/provider/azure_test.go b/pkg/provider/azure_test.go
index a95099f52..3582b8f86 100644
--- a/pkg/provider/azure_test.go
+++ b/pkg/provider/azure_test.go
@@ -45,6 +45,7 @@ import (
 	"k8s.io/utils/pointer"
 
 	"sigs.k8s.io/cloud-provider-azure/pkg/azclient"
+	"sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader"
 	"sigs.k8s.io/cloud-provider-azure/pkg/azureclients/interfaceclient/mockinterfaceclient"
 	"sigs.k8s.io/cloud-provider-azure/pkg/azureclients/loadbalancerclient/mockloadbalancerclient"
 	"sigs.k8s.io/cloud-provider-azure/pkg/azureclients/privatelinkserviceclient/mockprivatelinkserviceclient"
@@ -3846,7 +3847,7 @@ func TestInitializeCloudFromConfig(t *testing.T) {
 				Cloud: "AZUREPUBLICCLOUD",
 			},
 		},
-		CloudConfigType: cloudConfigTypeFile,
+		CloudConfigType: configloader.CloudConfigTypeFile,
 	}
 	err = az.InitializeCloudFromConfig(context.Background(), &config, false, true)
 	expectedErr = fmt.Errorf("useInstanceMetadata must be enabled without Azure credentials")