Skip to content

Commit

Permalink
adds information about IM configuration and usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Disper committed Nov 15, 2023
1 parent 9ef7ad9 commit 732f994
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 18 deletions.
28 changes: 11 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@

## Overview

This project **will be** responsible for managing [Kyma](https://kyma-project.io/#/) clusters infrastructure. Buil using [kubebuilder framework](https://github.com/kubernetes-sigs/kubebuilder)
It's main responsibilities **will be**:
- Provisioning and deprovisioning Kyma clusters
- Generating dynamic kubeconfigs
This project responsible for managing [Kyma](https://kyma-project.io/#/) clusters infrastructure. Built using [kubebuilder framework](https://github.com/kubernetes-sigs/kubebuilder)

It's current responsibilities are:
- Generating and rotating secrets containing dynamic kubeconfigs

## Prerequisites

- Access to a k8s cluster.
- [k3d](https://k3d.io) to get a local cluster for testing, or run against a remote cluster.
- Access to a k8s cluster.You can use [k3d](https://k3d.io) to get a local cluster for testing, or run against a remote cluster.
- [kubectl](https://kubernetes.io/docs/tasks/tools/)
- [kubebuilder](https://book.kubebuilder.io/)

## Installation

Expand Down Expand Up @@ -82,20 +80,16 @@ make gardener-secret-deploy
```

## Usage
TODO:
> Explain how to use the project. You can create multiple subsections (H3). Include the instructions or provide links to the related documentation.
Infrastructure Manager is responsible for creation and rotation of secrets of clusters defined in `GardenerCluster` CRs. Sample CR is available [here](config/samples/infrastructuremanager_v1_gardenercluster.yaml).

## Development
### Time based rotation
Secrets are totated based on the `kubeconfig-expiration-time`, see [the configuration section](docs/README.md#configuration).

> Add instructions on how to develop the project or example. It must be clear what to do and, for example, how to trigger the tests so that other contributors know how to make their pull requests acceptable. Include the instructions or provide links to related documentation.
### Force rotation
It's possible to force secret rotation before the time based rotation kicks in. In order to do that, add the `operator.kyma-project.io/force-kubeconfig-rotation: "true"` annotation to the `GardenCluster` Custom Resource.

## Troubleshooting
> Explain how to use the project. You can create multiple subsections (H3). Include the instructions or provide links to the related documentation.
> List potential issues and provide tips on how to avoid or solve them. To structure the content, use the following sections:
>
> - **Symptom**
> - **Cause**
> - **Remedy**

## Contributing
<!--- mandatory section - do not change this! --->
Expand Down
21 changes: 20 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,23 @@

This folder contains documents that relate to the project.

> In this document, provide the list of all documents that this folder contains, together with links to those documents and short information on what they describe.
## Development

run `make test` to see if all tests are passing.

## Configuration

It's possible to configure Infrastructure Manager deployment with following arguments:
1. `gardener-kubeconfig-path` - defines path to the gardener project kubeconfig used during API calls
2. `gardener-project` - name of the gardener project where the infrastructure operations are performed
3. `kubeconfig-expiration-time` - maximum time after which kubeconfig is rotated. The rotation will happen sometime between `0.6 * kubeconfig-expiration-time` and `kubeconfig-expiration-time`.

See [manager_gardener_secret_patch.yaml](../config/default/manager_gardener_secret_patch.yaml) for default values.

## Troubleshooting

> TBD: List potential issues and provide tips on how to avoid or solve them. To structure the content, use the following sections:
>
> - **Symptom**
> - **Cause**
> - **Remedy**

0 comments on commit 732f994

Please sign in to comment.