Add initial meta-stx to support StarlingX build
[pti/rtp.git] / meta-stx / recipes-containers / kubernetes / files / kubeadm.conf
1 #
2 ## Copyright (C) 2019 Wind River Systems, Inc.
3 #
4 #  Licensed under the Apache License, Version 2.0 (the "License");
5 #  you may not use this file except in compliance with the License.
6 #  You may obtain a copy of the License at
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #  Unless required by applicable law or agreed to in writing, software
11 #  distributed under the License is distributed on an "AS IS" BASIS,
12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #  See the License for the specific language governing permissions and
14 #  limitations under the License.
15
16 # Note: This dropin only works with kubeadm and kubelet v1.11+
17 [Service]
18 Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf"
19 Environment="KUBELET_CONFIG_ARGS=--config=/var/lib/kubelet/config.yaml"
20 # This is a file that "kubeadm init" and "kubeadm join" generates at runtime, populating the KUBELET_KUBEADM_ARGS variable dynamically
21 EnvironmentFile=-/var/lib/kubelet/kubeadm-flags.env
22 # This is a file that the user can use for overrides of the kubelet args as a last resort. Preferably, the user should use
23 # the .NodeRegistration.KubeletExtraArgs object in the configuration files instead. KUBELET_EXTRA_ARGS should be sourced from this file.
24 EnvironmentFile=-/etc/sysconfig/kubelet
25 ExecStart=
26 ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS
27 ExecStartPre=-/usr/bin/kubelet-cgroup-setup.sh
28 ExecStartPost=/bin/bash -c 'echo $MAINPID > /var/run/kubelet.pid;'
29 ExecStopPost=/bin/rm -f /var/run/kubelet.pid
30 Restart=always
31 StartLimitInterval=0
32 RestartSec=10