Skip to content

Commit

Permalink
docs(readme): mention the fact that kuik ignore its own namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
donch authored and paullaffitte committed Aug 1, 2023
1 parent c18626f commit 4b6aef1
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Another **controller** watches these `CachedImage` custom resources, and copies

Here is what our images look like when using kuik:
```bash
$ kubectl get pods -o custom-columns=NAME:metadata.name,IMAGES:spec.containers[*].image
$ kubectl get pods -o custom-columns=NAME:metadata.name,IMAGES:spec.containers[*].image
NAME IMAGES
debugger localhost:7439/registrish.s3.amazonaws.com/alpine
factori-0 localhost:7439/factoriotools/factorio:1.1
Expand Down Expand Up @@ -101,11 +101,11 @@ The image cache will obviously require a bit of disk space to run (see [Garbage

```bash
$ kubectl top pods
NAME CPU(cores) MEMORY(bytes)
kube-image-keeper-0 1m 86Mi
kube-image-keeper-controllers-5b5cc9fcc6-bv6cp 1m 16Mi
kube-image-keeper-controllers-5b5cc9fcc6-tjl7t 3m 24Mi
kube-image-keeper-proxy-54lzk 1m 19Mi
NAME CPU(cores) MEMORY(bytes)
kube-image-keeper-0 1m 86Mi
kube-image-keeper-controllers-5b5cc9fcc6-bv6cp 1m 16Mi
kube-image-keeper-controllers-5b5cc9fcc6-tjl7t 3m 24Mi
kube-image-keeper-proxy-54lzk 1m 19Mi
```

![Architecture](./docs/architecture.jpg)
Expand Down Expand Up @@ -158,7 +158,7 @@ helm upgrade --install \
--set cachedImagesExpiryDelay=90
```

## Advanced usage
## Advanced usage

### Pod filtering

Expand All @@ -170,6 +170,8 @@ There are 3 ways to tell kuik which pods it should manage (or, conversely, which

This logic isn't implemented by the kuik controllers or webhook directly, but through Kubernetes' standard webhook object selectors. In other words, these parameters end up in the `MutatingWebhookConfiguration` template to filter which pods get presented to kuik's webhook. When the webhook rewrites the images for a pod, it adds a label to that pod, and the kuik controllers then rely on that label to know which `CachedImages` resources to create.

Keep in mind that kuik will ignore pods scheduled into its own namespace.

### Cache persistence & garbage collection

Persistence is disabled by default. You can enable it by setting the Helm value `registry.persistence.enabled=true` and setting `registry.persistence.size` to the desired size (20 GiB by default). Be aware that this don't allow for high availability of the registry, to enable HA please refer to our related guide [./docs/high-availability.md](./docs/high-availability.md).
Expand Down

3 comments on commit 4b6aef1

@sleterrier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @donch and @paullaffitte,

Is there a reason why that is the case? Would not a kube-image-keeper.enix.io/image-caching-policy=ignore label on kuik pods achieve the same result in a more targeted manner?

@Nicolasgouze
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sleterrier, do you have in mind any scenario / situation in which
you will be prevented to use kuik because of our current implementation ?

@sleterrier
Copy link

@sleterrier sleterrier commented on 4b6aef1 Aug 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Nicolasgouze, we group our cluster base services within a few custom namespaces (e.g. monitoring, base-services, etc...) to simplify administration. We could of course make an exception for kuik and isolate it to its own namespace, but I was mainly curious to understand the reasoning before I can sell it to my team :)

Please sign in to comment.