Created
October 20, 2020 01:28
-
-
Save karlskewes/0fe72070e0ff37b6ff6c331323764220 to your computer and use it in GitHub Desktop.
CPU quota period (CFS) Kubernetes Manifest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This gist built into container and run on Kubernetes | |
# https://gist.github.com/bobrik/2030ff040fad360327a5fab7a09c4ff1 | |
--- | |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: cfs | |
labels: | |
name: cfs | |
app.kubernetes.io/name: cfs | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
annotations: | |
labels: | |
app.kubernetes.io/name: cfs | |
name: cfs | |
namespace: cfs | |
spec: | |
replicas: 1 | |
revisionHistoryLimit: 2 | |
selector: | |
matchLabels: | |
app.kubernetes.io/name: cfs | |
strategy: | |
rollingUpdate: | |
maxSurge: 25% | |
maxUnavailable: 25% | |
type: RollingUpdate | |
template: | |
metadata: | |
labels: | |
app.kubernetes.io/name: cfs | |
spec: | |
containers: | |
- image: karlskewes/cfs:latest-amd64 | |
imagePullPolicy: IfNotPresent | |
name: cfs | |
command: ["cfs"] | |
args: | |
- | | |
"-iterations 10 \ | |
-sleep 100ms" | |
resources: | |
limits: | |
cpu: 100m | |
memory: 50Mi | |
requests: | |
cpu: 100m | |
memory: 50Mi | |
securityContext: | |
readOnlyRootFilesystem: true | |
runAsNonRoot: true | |
runAsGroup: 10010 | |
runAsUser: 10010 | |
restartPolicy: Always | |
terminationGracePeriodSeconds: 30 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment