From bec6635ccc05b1f02c9971ec9bf529faac0b9ca1 Mon Sep 17 00:00:00 2001 From: Michael Taufen Date: Tue, 17 Jan 2017 13:03:38 -0800 Subject: [PATCH 1/6] Remove deprecated --config flag --- cmd/kubelet/app/options/options.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/cmd/kubelet/app/options/options.go b/cmd/kubelet/app/options/options.go index 109ebc0f503..cacb88b3aa5 100644 --- a/cmd/kubelet/app/options/options.go +++ b/cmd/kubelet/app/options/options.go @@ -92,8 +92,6 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.StringSliceVar(&s.APIServerList, "api-servers", []string{}, "List of Kubernetes API servers for publishing events, and reading pods and services. (ip:port), comma separated.") fs.MarkDeprecated("api-servers", "Use --kubeconfig instead. Will be removed in a future version.") - fs.StringVar(&s.PodManifestPath, "config", s.PodManifestPath, "Path to to the directory containing pod manifest files to run, or the path to a single pod manifest file.") - fs.MarkDeprecated("config", "Use --pod-manifest-path instead. Will be removed in a future version.") fs.StringVar(&s.PodManifestPath, "pod-manifest-path", s.PodManifestPath, "Path to to the directory containing pod manifest files to run, or the path to a single pod manifest file.") fs.DurationVar(&s.SyncFrequency.Duration, "sync-frequency", s.SyncFrequency.Duration, "Max period between synchronizing running containers and config") fs.DurationVar(&s.FileCheckFrequency.Duration, "file-check-frequency", s.FileCheckFrequency.Duration, "Duration between checking config files for new data") From 982df56c52710b67593c9992ed50e9cab22b6a8f Mon Sep 17 00:00:00 2001 From: Michael Taufen Date: Wed, 18 Jan 2017 20:13:22 -0800 Subject: [PATCH 2/6] Replace uses of --config with --pod-manifest-path --- .../gce/container-linux/configure-helper.sh | 4 ++-- cluster/gce/gci/configure-helper.sh | 4 ++-- cluster/gce/trusty/configure-helper.sh | 4 ++-- cluster/get-kube-local.sh | 2 +- cluster/libvirt-coreos/user_data_minion.yml | 2 +- cluster/saltbase/salt/kubelet/default | 2 +- .../openshift-controller.yaml | 24 +++++++++---------- test/e2e_node/conformance/run_test.sh | 2 +- test/e2e_node/services/kubelet.go | 2 +- .../resources/start-kubemark-master.sh | 2 +- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/cluster/gce/container-linux/configure-helper.sh b/cluster/gce/container-linux/configure-helper.sh index f0c3925e891..3549c4a3e2b 100755 --- a/cluster/gce/container-linux/configure-helper.sh +++ b/cluster/gce/container-linux/configure-helper.sh @@ -477,7 +477,7 @@ function start-kubelet { flags+=" --cloud-provider=gce" flags+=" --cluster-dns=${DNS_SERVER_IP}" flags+=" --cluster-domain=${DNS_DOMAIN}" - flags+=" --config=/etc/kubernetes/manifests" + flags+=" --pod-manifest-path=/etc/kubernetes/manifests" flags+=" --experimental-check-node-capabilities-before-mount=true" if [[ -n "${KUBELET_PORT:-}" ]]; then @@ -849,7 +849,7 @@ function start-kube-apiserver { fi local -r src_dir="${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty" params+=" --authorization-mode=${authorization_mode}" - + src_file="${src_dir}/kube-apiserver.manifest" remove-salt-config-comments "${src_file}" # Evaluate variables. diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index af7d732372b..eb70dfc4155 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -388,7 +388,7 @@ function create-master-kubelet-auth { REGISTER_MASTER_KUBELET="true" create-kubelet-kubeconfig fi - + } function create-kubeproxy-kubeconfig { @@ -556,7 +556,7 @@ function start-kubelet { flags+=" --cloud-provider=gce" flags+=" --cluster-dns=${DNS_SERVER_IP}" flags+=" --cluster-domain=${DNS_DOMAIN}" - flags+=" --config=/etc/kubernetes/manifests" + flags+=" --pod-manifest-path=/etc/kubernetes/manifests" flags+=" --experimental-mounter-path=${KUBE_HOME}/bin/mounter" flags+=" --experimental-check-node-capabilities-before-mount=true" diff --git a/cluster/gce/trusty/configure-helper.sh b/cluster/gce/trusty/configure-helper.sh index fc6aee6244d..7f7ed2d6cd3 100644 --- a/cluster/gce/trusty/configure-helper.sh +++ b/cluster/gce/trusty/configure-helper.sh @@ -175,7 +175,7 @@ assemble_kubelet_flags() { KUBELET_CMD_FLAGS="${KUBELET_CMD_FLAGS} --node-labels=${NODE_LABELS}" fi # Add the unconditional flags - KUBELET_CMD_FLAGS="${KUBELET_CMD_FLAGS} --cloud-provider=gce --allow-privileged=true --cgroup-root=/ --system-cgroups=/system --kubelet-cgroups=/kubelet --babysit-daemons=true --config=/etc/kubernetes/manifests --cluster-dns=${DNS_SERVER_IP} --cluster-domain=${DNS_DOMAIN}" + KUBELET_CMD_FLAGS="${KUBELET_CMD_FLAGS} --cloud-provider=gce --allow-privileged=true --cgroup-root=/ --system-cgroups=/system --kubelet-cgroups=/kubelet --babysit-daemons=true --pod-manifest-path=/etc/kubernetes/manifests --cluster-dns=${DNS_SERVER_IP} --cluster-domain=${DNS_DOMAIN}" echo "KUBELET_OPTS=\"${KUBELET_CMD_FLAGS}\"" > /etc/default/kubelet } @@ -765,7 +765,7 @@ start_kube_scheduler() { if [ -n "${SCHEDULING_ALGORITHM_PROVIDER:-}" ]; then params="${params} --algorithm-provider=${SCHEDULING_ALGORITHM_PROVIDER}" fi - + readonly kube_scheduler_docker_tag=$(cat "${kube_home}/kube-docker-files/kube-scheduler.docker_tag") # Remove salt comments and replace variables with values diff --git a/cluster/get-kube-local.sh b/cluster/get-kube-local.sh index 2332003329b..78a410dfb53 100755 --- a/cluster/get-kube-local.sh +++ b/cluster/get-kube-local.sh @@ -72,7 +72,7 @@ function create_cluster { --hostname-override="127.0.0.1" \ --address="0.0.0.0" \ --api-servers=http://localhost:8080 \ - --config=/etc/kubernetes/manifests \ + --pod-manifest-path=/etc/kubernetes/manifests \ --allow-privileged=true \ --cluster-dns=10.0.0.10 \ --cluster-domain=cluster.local \ diff --git a/cluster/libvirt-coreos/user_data_minion.yml b/cluster/libvirt-coreos/user_data_minion.yml index 319a40e6ec6..7496c22bb4e 100644 --- a/cluster/libvirt-coreos/user_data_minion.yml +++ b/cluster/libvirt-coreos/user_data_minion.yml @@ -22,7 +22,7 @@ coreos: --tls-private-key-file=/opt/kubernetes/certs/${NODE_NAMES[$i]}-node-key.pem \ $( [[ "$ENABLE_CLUSTER_DNS" == "true" ]] && echo "--cluster-dns=${DNS_SERVER_IP}" ) \ $( [[ "$ENABLE_CLUSTER_DNS" == "true" ]] && echo "--cluster-domain=${DNS_DOMAIN}" ) \ - --config=/opt/kubernetes/manifests + --pod-manifest-path=/opt/kubernetes/manifests Restart=always RestartSec=2 diff --git a/cluster/saltbase/salt/kubelet/default b/cluster/saltbase/salt/kubelet/default index 8aa9c03901f..228da25294f 100644 --- a/cluster/saltbase/salt/kubelet/default +++ b/cluster/saltbase/salt/kubelet/default @@ -55,7 +55,7 @@ {% set cloud_config = "--cloud-config=" + grains.cloud_config -%} {% endif -%} -{% set config = "--config=/etc/kubernetes/manifests" -%} +{% set config = "--pod-manifest-path=/etc/kubernetes/manifests" -%} {% set manifest_url = "" -%} {% set manifest_url_header = "" -%} diff --git a/examples/openshift-origin/openshift-controller.yaml b/examples/openshift-origin/openshift-controller.yaml index 5ae604f90bf..1844a70ccd1 100644 --- a/examples/openshift-origin/openshift-controller.yaml +++ b/examples/openshift-origin/openshift-controller.yaml @@ -1,34 +1,34 @@ apiVersion: extensions/v1beta1 kind: Deployment -metadata: - labels: +metadata: + labels: name: openshift name: openshift -spec: +spec: replicas: 1 selector: matchLabels: name: openshift - template: - metadata: - labels: + template: + metadata: + labels: name: openshift - spec: - containers: - - args: + spec: + containers: + - args: - start - master - --config=/config/master-config.yaml image: "openshift/origin" name: origin - ports: + ports: - containerPort: 8443 name: openshift - volumeMounts: + volumeMounts: - mountPath: /config name: config readOnly: true - volumes: + volumes: - name: config secret: secretName: openshift-config \ No newline at end of file diff --git a/test/e2e_node/conformance/run_test.sh b/test/e2e_node/conformance/run_test.sh index c70603066ef..646200cf446 100755 --- a/test/e2e_node/conformance/run_test.sh +++ b/test/e2e_node/conformance/run_test.sh @@ -156,7 +156,7 @@ start_kubelet --api-servers $apiserver \ --volume-stats-agg-period $volume_stats_agg_period \ --allow-privileged=$allow_privileged \ --serialize-image-pulls=$serialize_image_pulls \ - --config $config_dir \ + --pod-manifest-path $config_dir \ --file-check-frequency $file_check_frequency \ --pod-cidr=$pod_cidr \ --runtime-cgroups=/docker-daemon \ diff --git a/test/e2e_node/services/kubelet.go b/test/e2e_node/services/kubelet.go index 0be6a0e8dbe..09798ebbe2e 100644 --- a/test/e2e_node/services/kubelet.go +++ b/test/e2e_node/services/kubelet.go @@ -131,7 +131,7 @@ func (e *E2EServices) startKubelet() (*server, error) { "--volume-stats-agg-period", "10s", // Aggregate volumes frequently so tests don't need to wait as long "--allow-privileged", "true", "--serialize-image-pulls", "false", - "--config", manifestPath, + "--pod-manifest-path", manifestPath, "--file-check-frequency", "10s", // Check file frequently so tests won't wait too long "--pod-cidr", "10.180.0.0/24", // Assign a fixed CIDR to the node because there is no node controller. "--eviction-pressure-transition-period", "30s", diff --git a/test/kubemark/resources/start-kubemark-master.sh b/test/kubemark/resources/start-kubemark-master.sh index 5ea66d96564..219974d450a 100644 --- a/test/kubemark/resources/start-kubemark-master.sh +++ b/test/kubemark/resources/start-kubemark-master.sh @@ -210,7 +210,7 @@ function compute-kubelet-params { params+=" --babysit-daemons=true" params+=" --cgroup-root=/" params+=" --cloud-provider=gce" - params+=" --config=/etc/kubernetes/manifests" + params+=" --pod-manifest-path=/etc/kubernetes/manifests" if [[ -n "${KUBELET_PORT:-}" ]]; then params+=" --port=${KUBELET_PORT}" fi From 2f6027a092e020460dccfccac120db625d69dd9f Mon Sep 17 00:00:00 2001 From: Michael Taufen Date: Tue, 17 Jan 2017 13:05:04 -0800 Subject: [PATCH 3/6] Remove deprecated --auth-path flag --- cmd/kubelet/app/options/options.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cmd/kubelet/app/options/options.go b/cmd/kubelet/app/options/options.go index cacb88b3aa5..9f9c3f1e4b9 100644 --- a/cmd/kubelet/app/options/options.go +++ b/cmd/kubelet/app/options/options.go @@ -49,8 +49,7 @@ type KubeletServer struct { // If true, an invalid KubeConfig will result in the Kubelet exiting with an error. RequireKubeConfig bool - AuthPath flag.StringFlag // Deprecated -- use KubeConfig instead - APIServerList []string // Deprecated -- use KubeConfig instead + APIServerList []string // Deprecated -- use KubeConfig instead // Insert a probability of random errors during calls to the master. ChaosChance float64 @@ -87,8 +86,6 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.BoolVar(&s.RequireKubeConfig, "require-kubeconfig", s.RequireKubeConfig, "If true the Kubelet will exit if there are configuration errors, and will ignore the value of --api-servers in favor of the server defined in the kubeconfig file.") // DEPRECATED: Remove these flags at the beginning of 1.5. - fs.Var(&s.AuthPath, "auth-path", "Path to .kubernetes_auth file, specifying how to authenticate to API server.") - fs.MarkDeprecated("auth-path", "will be removed in a future version") fs.StringSliceVar(&s.APIServerList, "api-servers", []string{}, "List of Kubernetes API servers for publishing events, and reading pods and services. (ip:port), comma separated.") fs.MarkDeprecated("api-servers", "Use --kubeconfig instead. Will be removed in a future version.") From 7f5ce68d61c92f49e4169c1ab678113f95d8bcb2 Mon Sep 17 00:00:00 2001 From: Michael Taufen Date: Tue, 17 Jan 2017 15:16:37 -0800 Subject: [PATCH 4/6] Remove deprecated --resource-container flag --- cmd/kubelet/app/options/options.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/cmd/kubelet/app/options/options.go b/cmd/kubelet/app/options/options.go index 9f9c3f1e4b9..6467e5b1e56 100644 --- a/cmd/kubelet/app/options/options.go +++ b/cmd/kubelet/app/options/options.go @@ -183,8 +183,6 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&s.FeatureGates, "feature-gates", s.FeatureGates, "A set of key=value pairs that describe feature gates for alpha/experimental features. "+ "Options are:\n"+strings.Join(utilfeature.DefaultFeatureGate.KnownFeatures(), "\n")) - fs.StringVar(&s.KubeletCgroups, "resource-container", s.KubeletCgroups, "Optional absolute name of the resource-only container to create and run the Kubelet in.") - fs.MarkDeprecated("resource-container", "Use --kubelet-cgroups instead. Will be removed in a future version.") fs.StringVar(&s.KubeletCgroups, "kubelet-cgroups", s.KubeletCgroups, "Optional absolute name of cgroups to create and run the Kubelet in.") fs.StringVar(&s.SystemCgroups, "system-container", s.SystemCgroups, "Optional resource-only container in which to place all non-kernel processes that are not already in a container. Empty for no container. Rolling back the flag requires a reboot. (Default: \"\").") From cf6d51a3ee33dc913d140bc1dd878be9bc7362df Mon Sep 17 00:00:00 2001 From: Michael Taufen Date: Tue, 17 Jan 2017 15:17:59 -0800 Subject: [PATCH 5/6] Remove deprecated --system-container flag --- cmd/kubelet/app/options/options.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/cmd/kubelet/app/options/options.go b/cmd/kubelet/app/options/options.go index 6467e5b1e56..a5126d68026 100644 --- a/cmd/kubelet/app/options/options.go +++ b/cmd/kubelet/app/options/options.go @@ -184,9 +184,6 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { "Options are:\n"+strings.Join(utilfeature.DefaultFeatureGate.KnownFeatures(), "\n")) fs.StringVar(&s.KubeletCgroups, "kubelet-cgroups", s.KubeletCgroups, "Optional absolute name of cgroups to create and run the Kubelet in.") - - fs.StringVar(&s.SystemCgroups, "system-container", s.SystemCgroups, "Optional resource-only container in which to place all non-kernel processes that are not already in a container. Empty for no container. Rolling back the flag requires a reboot. (Default: \"\").") - fs.MarkDeprecated("system-container", "Use --system-cgroups instead. Will be removed in a future version.") fs.StringVar(&s.SystemCgroups, "system-cgroups", s.SystemCgroups, "Optional absolute name of cgroups in which to place all non-kernel processes that are not already inside a cgroup under `/`. Empty for no container. Rolling back the flag requires a reboot. (Default: \"\").") fs.BoolVar(&s.CgroupsPerQOS, "cgroups-per-qos", s.CgroupsPerQOS, "Enable creation of QoS cgroup hierarchy, if true top level QoS and pod cgroups are created.") From 79a681818987f055649aa73d86d4d79431a3eddb Mon Sep 17 00:00:00 2001 From: Michael Taufen Date: Thu, 19 Jan 2017 10:22:57 -0800 Subject: [PATCH 6/6] Remove deprecated flags from known-flags.txt --- hack/verify-flags/known-flags.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/hack/verify-flags/known-flags.txt b/hack/verify-flags/known-flags.txt index f2b64c149db..5059777bc2a 100644 --- a/hack/verify-flags/known-flags.txt +++ b/hack/verify-flags/known-flags.txt @@ -29,8 +29,6 @@ audit-log-maxage audit-log-maxbackup audit-log-maxsize audit-log-path -auth-path -auth-path auth-provider auth-provider auth-provider-arg @@ -592,7 +590,6 @@ streaming-connection-idle-timeout suicide-timeout sync-frequency system-cgroups -system-container system-pods-startup-timeout system-reserved system-validate-mode