<commit_before>#!/bin/bash -x

/fix-nameserver

config="/srv/kubernetes/kubelet/kubeconfig"
master="kube-apiserver.weave.local"

args=(
  --cluster-dns="10.16.0.3"
  --resolv-conf="/dev/null"
  --cluster-domain="cluster.local"
  --cloud-provider="${CLOUD_PROVIDER}"
  --allow-privileged="true"
  --logtostderr="true"
)

if [ -f $config ]
then
  args+=(
    --kubeconfig="${config}"
    --api-servers="https://${master}:6443"
  )
else
  args+=( --api-servers="http://${master}:8080" )
fi

if [ "${CLOUD_PROVIDER}" = "aws" ]
then ## TODO: check if not needed with v1.2.0 is out (see kubernetes/kubernetes#11543)
  args+=(
    --hostname-override="${AWS_LOCAL_HOSTNAME}"
  )
fi

case "${KUBERNETES_RELEASE}" in
  v1.1.*)
    args+=( --docker-endpoint="unix:/docker.sock" )
    ;;
  v1.2.*)
    args+=( --docker-endpoint="unix:///docker.sock" )
    if [ "${USE_CNI}" = "yes" ]
    then
      args+=(
        --network-plugin="cni"
        --network-plugin-dir="/etc/cni/net.d"
      )
    fi
    ;;
esac

exec /hyperkube kubelet "${args[@]}"<commit_msg>Empty `resolv.conf` should only be used without CNI<commit_after>#!/bin/bash -x

/fix-nameserver

config="/srv/kubernetes/kubelet/kubeconfig"
master="kube-apiserver.weave.local"

args=(
  --cluster-dns="10.16.0.3"
  --cluster-domain="cluster.local"
  --cloud-provider="${CLOUD_PROVIDER}"
  --allow-privileged="true"
  --logtostderr="true"
)

if [ -f $config ]
then
  args+=(
    --kubeconfig="${config}"
    --api-servers="https://${master}:6443"
  )
else
  args+=( --api-servers="http://${master}:8080" )
fi

if [ "${CLOUD_PROVIDER}" = "aws" ]
then ## TODO: check if not needed with v1.2.0 is out (see kubernetes/kubernetes#11543)
  args+=(
    --hostname-override="${AWS_LOCAL_HOSTNAME}"
  )
fi

case "${KUBERNETES_RELEASE}" in
  v1.1.*)
    args+=(
      --docker-endpoint="unix:/docker.sock"
      --resolv-conf="/dev/null"
    )
    ;;
  v1.2.*)
    args+=( --docker-endpoint="unix:///docker.sock" )
    if [ "${USE_CNI}" = "yes" ]
    then
      args+=(
        --network-plugin="cni"
        --network-plugin-dir="/etc/cni/net.d"
      )
    else
      args+=( --resolv-conf="/dev/null" )
    fi
    ;;
esac

exec /hyperkube kubelet "${args[@]}"
{'fraction_non_alphanumeric': 0.21853702862335303, 'fraction_numerical': 0.023625624716038164, 'mean_word_length': 2.8767605633802815, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3931329', 'n_tokens_mistral': 917, 'n_tokens_neox': 882, 'n_words': 135}