Skip to content

Commit

Permalink
Apiserver requests (#666)
Browse files Browse the repository at this point in the history
* - Make `--enable-priority-and-fairness` flag always explicit.
- Set CPU and Memory requests for Api server.

* - Bump cilium to 0.4.0.
- Make `--enable-priority-and-fairness` flag always explicit.
- Set CPU and Memory requests for Api server.
  • Loading branch information
whites11 authored Oct 19, 2022
1 parent 2b935cc commit 4d4c41c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Bump cilium to 0.5.0.
- Make `--enable-priority-and-fairness` flag always explicit.
- Set CPU and Memory requests for Api server.

## [14.4.1] - 2022-10-19

### Fixed
Expand Down
4 changes: 1 addition & 3 deletions templates/files/apps/common/cilium-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ data:
defaultPolicies:
enabled: true
egressMasqueradeInterfaces: eth0
eni:
enabled: false
kubeProxyReplacement: strict
k8sServiceHost: "{{ .APIInternalDomainName }}"
k8sServicePort: "443"
Expand Down Expand Up @@ -89,4 +87,4 @@ spec:
secret:
name: ""
namespace: ""
version: 0.4.0
version: 0.5.0
3 changes: 2 additions & 1 deletion templates/files/conf/setup-apiserver-environment
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ echo "MAX_REQUESTS_INFLIGHT=$((dedicated * 200 * 2 / 3))" >$env_file
echo "MAX_MUTATING_REQUESTS_INFLIGHT=$((dedicated * 200 * 1 / 3))" >>$env_file
echo "CPU_LIMIT=${dedicated}" >>$env_file
echo "MEMORY_LIMIT=$((memory * 3 / 4))Gi" >>$env_file

echo "CPU_REQUEST=$((cpus / 2))" >>$env_file
echo "MEMORY_REQUEST=$((memory / 2))Gi" >>$env_file
9 changes: 5 additions & 4 deletions templates/files/manifests/k8s-api-server.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,17 @@ spec:
- --requestheader-username-headers=X-Remote-User
- --proxy-client-cert-file=/etc/kubernetes/ssl/apiserver-crt.pem
- --proxy-client-key-file=/etc/kubernetes/ssl/apiserver-key.pem
- --max-requests-inflight=${MAX_REQUESTS_INFLIGHT}
- --max-mutating-requests-inflight=${MAX_MUTATING_REQUESTS_INFLIGHT}
{{- if .DisableAPIFairness }}
- --enable-priority-and-fairness=false
{{- else }}
- --max-requests-inflight=${MAX_REQUESTS_INFLIGHT}
- --max-mutating-requests-inflight=${MAX_MUTATING_REQUESTS_INFLIGHT}
- --enable-priority-and-fairness=true
{{- end }}
resources:
requests:
cpu: 300m
memory: 300Mi
cpu: ${CPU_REQUEST}
memory: ${MEMORY_REQUEST}
limits:
cpu: ${CPU_LIMIT}
memory: ${MEMORY_LIMIT}
Expand Down

0 comments on commit 4d4c41c

Please sign in to comment.