sgammon/GUST

View on GitHub
samples/todolist/src/config/20-daemons.k8s.yaml

Summary

Maintainability
Test Coverage
##
# Copyright © 2020, The Gust Framework Authors. All rights reserved.
#
# The Gust/Elide framework and tools, and all associated source or object computer code, except where otherwise noted,
# are licensed under the Zero Prosperity license, which is enclosed in this repository, in the file LICENSE.txt. Use of
# this code in object or source form requires and implies consent and agreement to that license in principle and
# practice. Source or object code not listing this header, or unless specified otherwise, remain the property of
# Elide LLC and its suppliers, if any. The intellectual and technical concepts contained herein are proprietary to
# Elide LLC and its suppliers and may be covered by U.S. and Foreign Patents, or patents in process, and are protected
# by trade secret and copyright law. Dissemination of this information, or reproduction of this material, in any form,
# is strictly forbidden except in adherence with assigned license requirements.
##

apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: haveged
  namespace: kube-system
  labels:
    app: haveged
spec:
  selector:
    matchLabels:
      daemonset: haveged
  template:
    metadata:
      labels:
        daemonset: haveged
    spec:
      containers:
        - name: haveged
          image: us.gcr.io/elide-ai/lowlevel/haveged:latest
          securityContext:
            privileged: true
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: sysctl-manager
  namespace: kube-system
  labels:
    app: sysctl-manager
spec:
  selector:
    matchLabels:
      daemonset: sysctl-manager
  template:
    metadata:
      labels:
        daemonset: sysctl-manager
    spec:
      containers:
        - name: sysctl-buddy
          image: busybox:1.29
          securityContext:
            privileged: true
          command:
            - "/bin/sh"
            - "-c"
            - |
              set -o errexit
              set -o xtrace
              while sysctl -w net.core.somaxconn=8192 vm.overcommit_memory=1 net.ipv4.tcp_fastopen=3
              do
                sleep 300s
              done
          resources:
            requests:
              cpu: 1m
              memory: 5Mi