Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Grzegorz Karaluch <grzegorz.karaluch@sap.com>
  • Loading branch information
Disper and grego952 authored Nov 16, 2023
1 parent 727d6cd commit 6f9bbad
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@

## Overview

This project responsible for managing [Kyma](https://kyma-project.io/#/) clusters infrastructure. Built using [kubebuilder framework](https://github.com/kubernetes-sigs/kubebuilder)
This project manages the [Kyma](https://kyma-project.io/#/) cluster infrastructure. It's built using the [kubebuilder](https://github.com/kubernetes-sigs/kubebuilder) framework.

It's current responsibilities are:
- Generating and rotating secrets containing dynamic kubeconfigs
It's currently responsible for generating and rotating Secrets containing dynamic kubeconfigs.

## Prerequisites

- 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.
- 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/)

## Installation
Expand Down Expand Up @@ -80,13 +79,13 @@ make gardener-secret-deploy
```

## Usage
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).
Infrastructure Manager is responsible for creating and rotating Secrets of clusters defined in the `GardenerCluster` custom resources (CRs). The sample CR is available [here](config/samples/infrastructuremanager_v1_gardenercluster.yaml).

### Time based rotation
Secrets are totated based on the `kubeconfig-expiration-time`, see [the configuration section](docs/README.md#configuration).
### Time-based rotation
Secrets are rotated based on `kubeconfig-expiration-time`. See [Configuration](docs/README.md#configuration) for more details.

### 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.
It's possible to force the Secret rotation before the time-based rotation kicks in. To do that, add the `operator.kyma-project.io/force-kubeconfig-rotation: "true"` annotation to the `GardenCluster` CR.

> Explain how to use the project. You can create multiple subsections (H3). Include the instructions or provide links to the related documentation.
Expand Down
10 changes: 5 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ This folder contains documents that relate to the project.

## Development

run `make test` to see if all tests are passing.
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`.
You can configure the Infrastructure Manager deployment with the following arguments:
1. `gardener-kubeconfig-path` - defines the path to the Gardener project kubeconfig used during API calls
2. `gardener-project` - the name of the Gardener project where the infrastructure operations are performed
3. `kubeconfig-expiration-time` - maximum time after which kubeconfig is rotated. The rotation happens 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.

Expand Down

0 comments on commit 6f9bbad

Please sign in to comment.