generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add syncer Co-authored-by: Kensei Nakada <handbomusic@gmail.com> * add syncer to the di container and invoke it from the entry point --------- Co-authored-by: Kensei Nakada <handbomusic@gmail.com>
- Loading branch information
1 parent
f041ac5
commit 79850fb
Showing
11 changed files
with
1,079 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,35 @@ | ||
### [Beta] Import your real cluster's resources | ||
|
||
The simulator can import resources from your cluster. | ||
There are two ways to import resources from your cluster. These methods cannot be used simultaneously. | ||
- Import resources from your cluster once when initializing the simulator. | ||
- Keep importing resources from your cluster. | ||
|
||
To use this, you need to follow these two steps | ||
- Set to `true` the `externalImportEnabled` value in the simulator server configuration. | ||
- Set the path of the kubeconfig file of the your cluster to `KubeConfig` value in the Simulator Server Configuration. | ||
#### Import resources once when initializing the simulator | ||
|
||
To use this, you need to follow these two steps in the simulator configuration: | ||
- Set `true` to `externalImportEnabled`. | ||
- Set the path of the kubeconfig file for the your cluster to `KubeConfig`. | ||
- This feature only requires the read permission for resources. | ||
|
||
```yaml | ||
externalImportEnabled: true | ||
kubeConfig: "/path/to/your-cluster-kubeconfig" | ||
``` | ||
#### Keep importing resources | ||
To use this, you need to follow these two steps in the scheduler configuration: | ||
- Set `true` to `resourceSyncEnabled`. | ||
- Set the path of the kubeconfig file for the your cluster to `KubeConfig`. | ||
- This feature only requires the read permission for resources. | ||
|
||
```yaml | ||
externalImportEnabled: false | ||
resourceSyncEnabled: true | ||
kubeConfig: "/path/to/your-cluster-kubeconfig" | ||
``` | ||
|
||
Then, the simulator imports resources from your cluster once when it's initialized. | ||
> [!NOTE] | ||
> When you enable `resourceSyncEnabled`, adding/updating/deleting resources directly in the simulator cluster could cause a problem of syncing. | ||
> You can do them for debugging etc purposes though, make sure you reboot the simulator and the fake source cluster afterward. | ||
|
||
See also [simulator/docs/simulator-server-config.md](simulator-server-config.md). | ||
See [simulator/docs/simulator-server-config.md](simulator/docs/simulator-server-config.md) for more information about the simulator configuration. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.