Skip to content

Commit 5e715ed

Browse files
committed
📝 chart
modified: README.md; modified: charts/kube-reqsizer/Chart.yaml; modified: charts/kube-reqsizer/templates/deployment.yaml; modified: charts/kube-reqsizer/values.yaml
1 parent dca4d86 commit 5e715ed

File tree

4 files changed

+15
-53
lines changed

4 files changed

+15
-53
lines changed

README.md

Lines changed: 10 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Disclaimer:
3434
## Deploy - Helm
3535

3636
```bash
37-
helm install https://github.com/jatalocks/kube-reqsizer/releases/download/kube-reqsizer-0.2.0/kube-reqsizer-0.2.0.tgz
37+
helm install https://github.com/jatalocks/kube-reqsizer/releases/download/kube-reqsizer-0.3.0/kube-reqsizer-0.3.0.tgz
3838
```
3939
# Development
4040
## Getting Started
@@ -43,7 +43,14 @@ You’ll need a Kubernetes cluster to run against. You can use [KIND](https://si
4343

4444
### Running on the cluster
4545

46-
1. Build and push your image to the location specified by `IMG`:
46+
1. Run the controller:
47+
```sh
48+
go run main.go
49+
```
50+
51+
**OR**
52+
53+
2. Build and push your image to the location specified by `IMG`:
4754

4855
```sh
4956
make docker-build docker-push IMG=<some-registry>/kube-reqsizer:tag
@@ -59,52 +66,4 @@ UnDeploy the controller to the cluster:
5966

6067
```sh
6168
make undeploy
62-
```
63-
64-
### How it works
65-
This project aims to follow the Kubernetes [Operator pattern](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/)
66-
67-
It uses [Controllers](https://kubernetes.io/docs/concepts/architecture/controller/)
68-
which provides a reconcile function responsible for synchronizing resources untile the desired state is reached on the cluster
69-
70-
### Test It Out
71-
1. Install the controller into the cluster:
72-
73-
```sh
74-
make install
75-
```
76-
77-
2. Run your controller (this will run in the foreground, so switch to a new terminal if you want to leave it running):
78-
79-
```sh
80-
make run
81-
```
82-
83-
**NOTE:** You can also run this in one step by running: `make install run`
84-
85-
### Modifying the API definitions
86-
If you are editing the API definitions, generate the manifests such as CRs or CRDs using:
87-
88-
```sh
89-
make manifests
90-
```
91-
92-
**NOTE:** Run `make --help` for more information on all potential `make` targets
93-
94-
More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)
95-
96-
## License
97-
98-
Copyright 2022.
99-
100-
Licensed under the Apache License, Version 2.0 (the "License");
101-
you may not use this file except in compliance with the License.
102-
You may obtain a copy of the License at
103-
104-
http://www.apache.org/licenses/LICENSE-2.0
105-
106-
Unless required by applicable law or agreed to in writing, software
107-
distributed under the License is distributed on an "AS IS" BASIS,
108-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
109-
See the License for the specific language governing permissions and
110-
limitations under the License.
69+
```

charts/kube-reqsizer/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ type: application
1313
# This is the chart version. This version number should be incremented each time you make changes
1414
# to the chart and its templates, including the app version.
1515
# Versions are expected to follow Semantic Versioning (https://semver.org/)
16-
version: 0.2.0
16+
version: 0.3.0

charts/kube-reqsizer/templates/deployment.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ spec:
2424
- --leader-elect
2525
- --annotation-filter={{.Values.enabledAnnotation}}
2626
- --sample-size={{.Values.sampleSize}}
27-
- --zap-log-level=info
27+
- --min-seconds={{.Values.minSeconds}}
28+
- --zap-log-level={{.Values.logLevel}}
2829
command:
2930
- /manager
3031
env:

charts/kube-reqsizer/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
sampleSize: 1
2+
minSeconds: 1
23
enabledAnnotation: false
4+
logLevel: info
35
# Namespace annotation filter
46
# Scale up / scale down requests
57
# Timestamp per sample to restrict pod restarts

0 commit comments

Comments
 (0)