Commit Graph

4948 Commits (094116ac9a0f5794881792db1be21099b510f4cf)

Author SHA1 Message Date
Kubernetes Submit Queue 41a06d1fbb Merge pull request #51363 from luxas/move_uploadconfig
Automatic merge from submit-queue (batch tested with PRs 51174, 51363, 51087, 51382, 51388)

kubeadm: Move the uploadconfig phase right in the beginning of cluster init

**What this PR does / why we need it**:

In order to be forwards-compatible, I'm moving the uploadconfig to be the first thing in the chain in order to make it possible to rely on it being present in future releases when we have a beta or higher API to rely on.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews
2017-08-26 06:43:27 -07:00
Kubernetes Submit Queue 25a2177a95 Merge pull request #51296 from kokhang/kubeadm-flexvolume
Automatic merge from submit-queue (batch tested with PRs 51054, 51101, 50031, 51296, 51173)

Add host mountpath to controller-manager for flexvolume dir

Controller manager needs access to Flexvolume plugin when using attach-detach controller interface.

This PR adds the host mount path for the default directory of flexvolume plugins

Fixes https://github.com/kubernetes/kubeadm/issues/410
2017-08-26 02:05:36 -07:00
Kubernetes Submit Queue 932e07af53 Merge pull request #50031 from verult/ConnectedProbe
Automatic merge from submit-queue (batch tested with PRs 51054, 51101, 50031, 51296, 51173)

Dynamic Flexvolume plugin discovery, probing with filesystem watch.

**What this PR does / why we need it**: Enables dynamic Flexvolume plugin discovery. This model uses a filesystem watch (fsnotify library), which notifies the system that a probe is necessary only if something changes in the Flexvolume plugin directory.

This PR uses the dependency injection model in https://github.com/kubernetes/kubernetes/pull/49668.

**Release Note**:
```release-note
Dynamic Flexvolume plugin discovery. Flexvolume plugins can now be discovered on the fly rather than only at system initialization time.
```

/sig-storage

/assign @jsafrane @saad-ali 
/cc @bassam @chakri-nelluri @kokhang @liggitt @thockin
2017-08-26 02:05:34 -07:00
Kubernetes Submit Queue 76c520cea3 Merge pull request #50889 from NickrenREN/local-storage-eviction
Automatic merge from submit-queue (batch tested with PRs 50889, 51347, 50582, 51297, 51264)

Change eviction manager to manage one single local storage resource

**What this PR does / why we need it**:
We decided to manage one single resource name, eviction policy should be modified too.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*:  part of #50818

**Special notes for your reviewer**:

**Release note**:
```release-note
Change eviction manager to manage one single local ephemeral storage resource
```

/assign @jingxu97
2017-08-25 22:43:26 -07:00
Kubernetes Submit Queue c112dbcab4 Merge pull request #51341 from mtaufen/fix-port-disable
Automatic merge from submit-queue (batch tested with PRs 49850, 47782, 50595, 50730, 51341)

fix ReadOnlyPort defaulting, CAdvisorPort documentation

The ReadOnlyPort defaulting prevented passing 0 to diable via
the KubeletConfiguraiton struct.

The HealthzPort defaulting prevented passing 0 to disable via the
KubeletConfiguration struct. The documentation also failed to mention
this, but the check is performed in code.

The CAdvisorPort documentation failed to mention that you can pass 0 to
disable.


fixes #51345
2017-08-25 20:43:40 -07:00
andrewsykim fd86022714 add deprecation warnings for auto detecting cloud providers 2017-08-25 19:30:52 -04:00
Lucas Käldström b1fb289f0f
kubeadm: Move the uploadconfig phase right in the beginning of cluster init 2017-08-26 01:50:24 +03:00
Matt Moyer c7996a7236 kubeadm: add extra group info to `token list`.
This adds an `EXTRA GROUPS` column to the output of `kubeadm token list`. This displays any extra `system:bootstrappers:*` groups that are specified in the token's `auth-extra-groups` key.
2017-08-25 16:26:28 -05:00
Matt Moyer 77f1b72a40 kubeadm: add `--groups` flag for `kubeadm token create`.
This adds support for creating a bootstrap token that authenticates with extra `system:bootstrappers:*` groups in addition to `system:bootstrappers`.
2017-08-25 16:26:20 -05:00
NickrenREN 27901ad5df Change eviction policy to manage one single local storage resource 2017-08-26 05:14:49 +08:00
Kubernetes Submit Queue b5bb8099e7 Merge pull request #50971 from CaoShuFeng/audit_json
Automatic merge from submit-queue (batch tested with PRs 51134, 51122, 50562, 50971, 51327)

set --audit-log-format default to json

Updates: https://github.com/kubernetes/kubernetes/issues/48561

**Release note**:
```
set --audit-log-format default to json for kube-apiserver
```
2017-08-25 14:01:33 -07:00
Kubernetes Submit Queue 39581ac9bf Merge pull request #51122 from luxas/kubeadm_impl_dryrun
Automatic merge from submit-queue (batch tested with PRs 51134, 51122, 50562, 50971, 51327)

kubeadm: Fully implement --dry-run

**What this PR does / why we need it**:

Finishes the work begun in #50631 
 - Implements dry-run functionality for phases certs/kubeconfig/controlplane/etcd as well by making the outDir configurable
 - Prints the controlplane manifests to stdout, but not the certs/kubeconfig files due to the sensitive nature. However, kubeadm outputs the directory to go and look in for those.
 - Fixes a small yaml marshal error where `apiVersion` and `kind` wasn't printed earlier.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

fixes: https://github.com/kubernetes/kubeadm/issues/389

**Special notes for your reviewer**:

Full `kubeadm init --dry-run` output:

```
[kubeadm] WARNING: kubeadm is in beta, please do not use it for production clusters.
[init] Using Kubernetes version: v1.7.4
[init] Using Authorization mode: [Node RBAC]
[preflight] Running pre-flight checks
[preflight] WARNING: docker service is not enabled, please run 'systemctl enable docker.service'
[preflight] Starting the kubelet service
[kubeadm] WARNING: starting in 1.8, tokens expire after 24 hours by default (if you require a non-expiring token use --token-ttl 0)
[certificates] Generated ca certificate and key.
[certificates] Generated apiserver certificate and key.
[certificates] apiserver serving cert is signed for DNS names [thegopher kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 192.168.200.101]
[certificates] Generated apiserver-kubelet-client certificate and key.
[certificates] Generated sa key and public key.
[certificates] Generated front-proxy-ca certificate and key.
[certificates] Generated front-proxy-client certificate and key.
[certificates] Valid certificates and keys now exist in "/tmp/kubeadm-init-dryrun477531930"
[kubeconfig] Wrote KubeConfig file to disk: "admin.conf"
[kubeconfig] Wrote KubeConfig file to disk: "kubelet.conf"
[kubeconfig] Wrote KubeConfig file to disk: "controller-manager.conf"
[kubeconfig] Wrote KubeConfig file to disk: "scheduler.conf"
[dryrun] Wrote certificates, kubeconfig files and control plane manifests to "/tmp/kubeadm-init-dryrun477531930"
[dryrun] Won't print certificates or kubeconfig files due to the sensitive nature of them
[dryrun] Please go and examine the "/tmp/kubeadm-init-dryrun477531930" directory for details about what would be written
[dryrun] Would write file "/etc/kubernetes/manifests/kube-apiserver.yaml" with content:
	apiVersion: v1
	kind: Pod
	metadata:
	  annotations:
	    scheduler.alpha.kubernetes.io/critical-pod: ""
	  creationTimestamp: null
	  labels:
	    component: kube-apiserver
	    tier: control-plane
	  name: kube-apiserver
	  namespace: kube-system
	spec:
	  containers:
	  - command:
	    - kube-apiserver
	    - --allow-privileged=true
	    - --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
	    - --requestheader-extra-headers-prefix=X-Remote-Extra-
	    - --service-cluster-ip-range=10.96.0.0/12
	    - --tls-cert-file=/etc/kubernetes/pki/apiserver.crt
	    - --tls-private-key-file=/etc/kubernetes/pki/apiserver.key
	    - --proxy-client-cert-file=/etc/kubernetes/pki/front-proxy-client.crt
	    - --admission-control=Initializers,NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,ResourceQuota
	    - --experimental-bootstrap-token-auth=true
	    - --client-ca-file=/etc/kubernetes/pki/ca.crt
	    - --kubelet-client-key=/etc/kubernetes/pki/apiserver-kubelet-client.key
	    - --secure-port=6443
	    - --proxy-client-key-file=/etc/kubernetes/pki/front-proxy-client.key
	    - --insecure-port=0
	    - --requestheader-username-headers=X-Remote-User
	    - --requestheader-group-headers=X-Remote-Group
	    - --requestheader-allowed-names=front-proxy-client
	    - --advertise-address=192.168.200.101
	    - --service-account-key-file=/etc/kubernetes/pki/sa.pub
	    - --kubelet-client-certificate=/etc/kubernetes/pki/apiserver-kubelet-client.crt
	    - --requestheader-client-ca-file=/etc/kubernetes/pki/front-proxy-ca.crt
	    - --authorization-mode=Node,RBAC
	    - --etcd-servers=http://127.0.0.1:2379
	    image: gcr.io/google_containers/kube-apiserver-amd64:v1.7.4
	    livenessProbe:
	      failureThreshold: 8
	      httpGet:
	        host: 127.0.0.1
	        path: /healthz
	        port: 6443
	        scheme: HTTPS
	      initialDelaySeconds: 15
	      timeoutSeconds: 15
	    name: kube-apiserver
	    resources:
	      requests:
	        cpu: 250m
	    volumeMounts:
	    - mountPath: /etc/kubernetes/pki
	      name: k8s-certs
	      readOnly: true
	    - mountPath: /etc/ssl/certs
	      name: ca-certs
	      readOnly: true
	    - mountPath: /etc/pki
	      name: ca-certs-etc-pki
	      readOnly: true
	  hostNetwork: true
	  volumes:
	  - hostPath:
	      path: /etc/kubernetes/pki
	    name: k8s-certs
	  - hostPath:
	      path: /etc/ssl/certs
	    name: ca-certs
	  - hostPath:
	      path: /etc/pki
	    name: ca-certs-etc-pki
	status: {}
[dryrun] Would write file "/etc/kubernetes/manifests/kube-controller-manager.yaml" with content:
	apiVersion: v1
	kind: Pod
	metadata:
	  annotations:
	    scheduler.alpha.kubernetes.io/critical-pod: ""
	  creationTimestamp: null
	  labels:
	    component: kube-controller-manager
	    tier: control-plane
	  name: kube-controller-manager
	  namespace: kube-system
	spec:
	  containers:
	  - command:
	    - kube-controller-manager
	    - --address=127.0.0.1
	    - --kubeconfig=/etc/kubernetes/controller-manager.conf
	    - --cluster-signing-cert-file=/etc/kubernetes/pki/ca.crt
	    - --cluster-signing-key-file=/etc/kubernetes/pki/ca.key
	    - --leader-elect=true
	    - --use-service-account-credentials=true
	    - --controllers=*,bootstrapsigner,tokencleaner
	    - --root-ca-file=/etc/kubernetes/pki/ca.crt
	    - --service-account-private-key-file=/etc/kubernetes/pki/sa.key
	    image: gcr.io/google_containers/kube-controller-manager-amd64:v1.7.4
	    livenessProbe:
	      failureThreshold: 8
	      httpGet:
	        host: 127.0.0.1
	        path: /healthz
	        port: 10252
	        scheme: HTTP
	      initialDelaySeconds: 15
	      timeoutSeconds: 15
	    name: kube-controller-manager
	    resources:
	      requests:
	        cpu: 200m
	    volumeMounts:
	    - mountPath: /etc/kubernetes/pki
	      name: k8s-certs
	      readOnly: true
	    - mountPath: /etc/ssl/certs
	      name: ca-certs
	      readOnly: true
	    - mountPath: /etc/kubernetes/controller-manager.conf
	      name: kubeconfig
	      readOnly: true
	    - mountPath: /etc/pki
	      name: ca-certs-etc-pki
	      readOnly: true
	  hostNetwork: true
	  volumes:
	  - hostPath:
	      path: /etc/kubernetes/pki
	    name: k8s-certs
	  - hostPath:
	      path: /etc/ssl/certs
	    name: ca-certs
	  - hostPath:
	      path: /etc/kubernetes/controller-manager.conf
	    name: kubeconfig
	  - hostPath:
	      path: /etc/pki
	    name: ca-certs-etc-pki
	status: {}
[dryrun] Would write file "/etc/kubernetes/manifests/kube-scheduler.yaml" with content:
	apiVersion: v1
	kind: Pod
	metadata:
	  annotations:
	    scheduler.alpha.kubernetes.io/critical-pod: ""
	  creationTimestamp: null
	  labels:
	    component: kube-scheduler
	    tier: control-plane
	  name: kube-scheduler
	  namespace: kube-system
	spec:
	  containers:
	  - command:
	    - kube-scheduler
	    - --leader-elect=true
	    - --kubeconfig=/etc/kubernetes/scheduler.conf
	    - --address=127.0.0.1
	    image: gcr.io/google_containers/kube-scheduler-amd64:v1.7.4
	    livenessProbe:
	      failureThreshold: 8
	      httpGet:
	        host: 127.0.0.1
	        path: /healthz
	        port: 10251
	        scheme: HTTP
	      initialDelaySeconds: 15
	      timeoutSeconds: 15
	    name: kube-scheduler
	    resources:
	      requests:
	        cpu: 100m
	    volumeMounts:
	    - mountPath: /etc/kubernetes/scheduler.conf
	      name: kubeconfig
	      readOnly: true
	  hostNetwork: true
	  volumes:
	  - hostPath:
	      path: /etc/kubernetes/scheduler.conf
	    name: kubeconfig
	status: {}
[markmaster] Will mark node thegopher as master by adding a label and a taint
[dryrun] Would perform action GET on resource "nodes" in API group "core/v1"
[dryrun] Resource name: "thegopher"
[dryrun] Would perform action PATCH on resource "nodes" in API group "core/v1"
[dryrun] Resource name: "thegopher"
[dryrun] Attached patch:
	{"metadata":{"labels":{"node-role.kubernetes.io/master":""}},"spec":{"taints":[{"effect":"NoSchedule","key":"node-role.kubernetes.io/master","timeAdded":null}]}}
[markmaster] Master thegopher tainted and labelled with key/value: node-role.kubernetes.io/master=""
[token] Using token: 96efd6.98bbb2f4603c026b
[dryrun] Would perform action GET on resource "secrets" in API group "core/v1"
[dryrun] Resource name: "bootstrap-token-96efd6"
[dryrun] Would perform action CREATE on resource "secrets" in API group "core/v1"
[dryrun] Attached object:
	apiVersion: v1
	data:
	  description: VGhlIGRlZmF1bHQgYm9vdHN0cmFwIHRva2VuIGdlbmVyYXRlZCBieSAna3ViZWFkbSBpbml0Jy4=
	  expiration: MjAxNy0wOC0yM1QyMzoxOTozNCswMzowMA==
	  token-id: OTZlZmQ2
	  token-secret: OThiYmIyZjQ2MDNjMDI2Yg==
	  usage-bootstrap-authentication: dHJ1ZQ==
	  usage-bootstrap-signing: dHJ1ZQ==
	kind: Secret
	metadata:
	  creationTimestamp: null
	  name: bootstrap-token-96efd6
	type: bootstrap.kubernetes.io/token
[bootstraptoken] Configured RBAC rules to allow Node Bootstrap tokens to post CSRs in order for nodes to get long term certificate credentials
[dryrun] Would perform action CREATE on resource "clusterrolebindings" in API group "rbac.authorization.k8s.io/v1beta1"
[dryrun] Attached object:
	apiVersion: rbac.authorization.k8s.io/v1beta1
	kind: ClusterRoleBinding
	metadata:
	  creationTimestamp: null
	  name: kubeadm:kubelet-bootstrap
	roleRef:
	  apiGroup: rbac.authorization.k8s.io
	  kind: ClusterRole
	  name: system:node-bootstrapper
	subjects:
	- kind: Group
	  name: system:bootstrappers
[bootstraptoken] Configured RBAC rules to allow the csrapprover controller automatically approve CSRs from a Node Bootstrap Token
[dryrun] Would perform action CREATE on resource "clusterroles" in API group "rbac.authorization.k8s.io/v1beta1"
[dryrun] Attached object:
	apiVersion: rbac.authorization.k8s.io/v1beta1
	kind: ClusterRole
	metadata:
	  creationTimestamp: null
	  name: system:certificates.k8s.io:certificatesigningrequests:nodeclient
	rules:
	- apiGroups:
	  - certificates.k8s.io
	  resources:
	  - certificatesigningrequests/nodeclient
	  verbs:
	  - create
[dryrun] Would perform action CREATE on resource "clusterrolebindings" in API group "rbac.authorization.k8s.io/v1beta1"
[dryrun] Attached object:
	apiVersion: rbac.authorization.k8s.io/v1beta1
	kind: ClusterRoleBinding
	metadata:
	  creationTimestamp: null
	  name: kubeadm:node-autoapprove-bootstrap
	roleRef:
	  apiGroup: rbac.authorization.k8s.io
	  kind: ClusterRole
	  name: system:certificates.k8s.io:certificatesigningrequests:nodeclient
	subjects:
	- kind: Group
	  name: system:bootstrappers
[bootstraptoken] Creating the "cluster-info" ConfigMap in the "kube-public" namespace
[dryrun] Would perform action CREATE on resource "configmaps" in API group "core/v1"
[dryrun] Attached object:
	apiVersion: v1
	data:
	  kubeconfig: |
	    apiVersion: v1
	    clusters:
	    - cluster:
	        certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRFM01EZ3lNakl3TVRrek1Gb1hEVEkzTURneU1ESXdNVGt6TUZvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTFk0CnZWZ1FSN3pva3VzbWVvQ3JwZ1lFdEFHSldhSWVVUXE0ZE8wcVA4TDFKQk10ZTdHcXVHeXlWdVlyejBBeXdGdkMKaEh3Tm1pbmpIWFdNYkgrQVdIUXJOZmtZMmRBdnVuL0NYZWd6RlRZZG56M1JzYU5EaW0wazVXaVhEamQwM21YVApicGpvMGxpT2ZtY0xlOHpYUXZNaHpmN2FMV24wOVJoN05Ld0M0eW84cis5MDNHNjVxRW56cnUybmJKTEJ1TFk0CkFsL3UxTElVSGV4dmExZjgzampOQ1NmQXJScGh1d0oyS1NTWXhoaEJpNHBJMzd0ZEFpN3diTUF0cG4zdU9rVEQKU0dtdGpkbFZoUlAzV1dHQzNQTjF3M1JRakpmTW5weFFZbFFmalU2UE9Pbzg4ODBwN3dnUXFDUU11bjU5UWlBWgpwNkI1c3lrUitMemhoZVpkMWtjQ0F3RUFBYU1qTUNFd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFHaTVrcUJzMTdOMU5pRWx2RGJaWGFSeXk5anUKR3ZuRjRjSnczQ0dPR2hpdHgySmdxRkt5WXRIdlJUSFNYRXpBNTlteEs2RlJWUWpBZmJMdjhSZUNKUjYrSzdRdQo0U21uTVVxVXRTZFUzaHozVXZlMjVOTHVwMnhsYVpZbzVwdVRrOWhZdUszd09MbWgxZTFoRzcyUFpoZE5yOGd5Ck5lTFN3bjI4OEVUSlNCcWpob0FkV2w0YzZtcnpwWll4ekNrcEpUSDFPWnBCQzFUYmY3QW5HenVwRzB1Q1RSYWsKWTBCSERyL01uVGJKKzM5NEJyMXBId0NtQ3ZrWUY0RjVEeW9UTFQ0UFhGTnJSV3UweU9rMXdDdEFKbEs3eFlUOAp5Z015cUlRSG4rNjYrUGlsSUprcU81ODRoVm5ENURva1dLcEdISFlYNmNpRGYwU1hYZUI1d09YQ0xjaz0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
	        server: https://192.168.200.101:6443
	      name: ""
	    contexts: []
	    current-context: ""
	    kind: Config
	    preferences: {}
	    users: []
	kind: ConfigMap
	metadata:
	  creationTimestamp: null
	  name: cluster-info
	  namespace: kube-public
[dryrun] Would perform action CREATE on resource "roles" in API group "rbac.authorization.k8s.io/v1beta1"
[dryrun] Attached object:
	apiVersion: rbac.authorization.k8s.io/v1beta1
	kind: Role
	metadata:
	  creationTimestamp: null
	  name: kubeadm:bootstrap-signer-clusterinfo
	  namespace: kube-public
	rules:
	- apiGroups:
	  - ""
	  resourceNames:
	  - cluster-info
	  resources:
	  - configmaps
	  verbs:
	  - get
[dryrun] Would perform action CREATE on resource "rolebindings" in API group "rbac.authorization.k8s.io/v1beta1"
[dryrun] Attached object:
	apiVersion: rbac.authorization.k8s.io/v1beta1
	kind: RoleBinding
	metadata:
	  creationTimestamp: null
	  name: kubeadm:bootstrap-signer-clusterinfo
	  namespace: kube-public
	roleRef:
	  apiGroup: rbac.authorization.k8s.io
	  kind: Role
	  name: kubeadm:bootstrap-signer-clusterinfo
	subjects:
	- kind: User
	  name: system:anonymous
[uploadconfig] Storing the configuration used in ConfigMap "kubeadm-config" in the "kube-system" Namespace
[dryrun] Would perform action CREATE on resource "configmaps" in API group "core/v1"
[dryrun] Attached object:
	apiVersion: v1
	data:
	  MasterConfiguration: |
	    api:
	      advertiseAddress: 192.168.200.101
	      bindPort: 6443
	    apiServerCertSANs: []
	    apiServerExtraArgs: null
	    authorizationModes:
	    - Node
	    - RBAC
	    certificatesDir: /etc/kubernetes/pki
	    cloudProvider: ""
	    controllerManagerExtraArgs: null
	    etcd:
	      caFile: ""
	      certFile: ""
	      dataDir: /var/lib/etcd
	      endpoints: []
	      extraArgs: null
	      image: ""
	      keyFile: ""
	    featureFlags: null
	    imageRepository: gcr.io/google_containers
	    kubernetesVersion: v1.7.4
	    networking:
	      dnsDomain: cluster.local
	      podSubnet: ""
	      serviceSubnet: 10.96.0.0/12
	    nodeName: thegopher
	    schedulerExtraArgs: null
	    token: 96efd6.98bbb2f4603c026b
	    tokenTTL: 86400000000000
	    unifiedControlPlaneImage: ""
	kind: ConfigMap
	metadata:
	  creationTimestamp: null
	  name: kubeadm-config
	  namespace: kube-system
[dryrun] Would perform action GET on resource "clusterrolebindings" in API group "rbac.authorization.k8s.io/v1beta1"
[dryrun] Resource name: "system:node"
[dryrun] Would perform action CREATE on resource "serviceaccounts" in API group "core/v1"
[dryrun] Attached object:
	apiVersion: v1
	kind: ServiceAccount
	metadata:
	  creationTimestamp: null
	  name: kube-dns
	  namespace: kube-system
[dryrun] Would perform action GET on resource "services" in API group "core/v1"
[dryrun] Resource name: "kubernetes"
[dryrun] Would perform action CREATE on resource "deployments" in API group "extensions/v1beta1"
[dryrun] Attached object:
	apiVersion: extensions/v1beta1
	kind: Deployment
	metadata:
	  creationTimestamp: null
	  labels:
	    k8s-app: kube-dns
	  name: kube-dns
	  namespace: kube-system
	spec:
	  selector:
	    matchLabels:
	      k8s-app: kube-dns
	  strategy:
	    rollingUpdate:
	      maxSurge: 10%
	      maxUnavailable: 0
	  template:
	    metadata:
	      creationTimestamp: null
	      labels:
	        k8s-app: kube-dns
	    spec:
	      affinity:
	        nodeAffinity:
	          requiredDuringSchedulingIgnoredDuringExecution:
	            nodeSelectorTerms:
	            - matchExpressions:
	              - key: beta.kubernetes.io/arch
	                operator: In
	                values:
	                - amd64
	      containers:
	      - args:
	        - --domain=cluster.local.
	        - --dns-port=10053
	        - --config-dir=/kube-dns-config
	        - --v=2
	        env:
	        - name: PROMETHEUS_PORT
	          value: "10055"
	        image: gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.14.4
	        imagePullPolicy: IfNotPresent
	        livenessProbe:
	          failureThreshold: 5
	          httpGet:
	            path: /healthcheck/kubedns
	            port: 10054
	            scheme: HTTP
	          initialDelaySeconds: 60
	          successThreshold: 1
	          timeoutSeconds: 5
	        name: kubedns
	        ports:
	        - containerPort: 10053
	          name: dns-local
	          protocol: UDP
	        - containerPort: 10053
	          name: dns-tcp-local
	          protocol: TCP
	        - containerPort: 10055
	          name: metrics
	          protocol: TCP
	        readinessProbe:
	          httpGet:
	            path: /readiness
	            port: 8081
	            scheme: HTTP
	          initialDelaySeconds: 3
	          timeoutSeconds: 5
	        resources:
	          limits:
	            memory: 170Mi
	          requests:
	            cpu: 100m
	            memory: 70Mi
	        volumeMounts:
	        - mountPath: /kube-dns-config
	          name: kube-dns-config
	      - args:
	        - -v=2
	        - -logtostderr
	        - -configDir=/etc/k8s/dns/dnsmasq-nanny
	        - -restartDnsmasq=true
	        - --
	        - -k
	        - --cache-size=1000
	        - --log-facility=-
	        - --server=/cluster.local/127.0.0.1#10053
	        - --server=/in-addr.arpa/127.0.0.1#10053
	        - --server=/ip6.arpa/127.0.0.1#10053
	        image: gcr.io/google_containers/k8s-dns-dnsmasq-nanny-amd64:1.14.4
	        imagePullPolicy: IfNotPresent
	        livenessProbe:
	          failureThreshold: 5
	          httpGet:
	            path: /healthcheck/dnsmasq
	            port: 10054
	            scheme: HTTP
	          initialDelaySeconds: 60
	          successThreshold: 1
	          timeoutSeconds: 5
	        name: dnsmasq
	        ports:
	        - containerPort: 53
	          name: dns
	          protocol: UDP
	        - containerPort: 53
	          name: dns-tcp
	          protocol: TCP
	        resources:
	          requests:
	            cpu: 150m
	            memory: 20Mi
	        volumeMounts:
	        - mountPath: /etc/k8s/dns/dnsmasq-nanny
	          name: kube-dns-config
	      - args:
	        - --v=2
	        - --logtostderr
	        - --probe=kubedns,127.0.0.1:10053,kubernetes.default.svc.cluster.local,5,A
	        - --probe=dnsmasq,127.0.0.1:53,kubernetes.default.svc.cluster.local,5,A
	        image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.14.4
	        imagePullPolicy: IfNotPresent
	        livenessProbe:
	          failureThreshold: 5
	          httpGet:
	            path: /metrics
	            port: 10054
	            scheme: HTTP
	          initialDelaySeconds: 60
	          successThreshold: 1
	          timeoutSeconds: 5
	        name: sidecar
	        ports:
	        - containerPort: 10054
	          name: metrics
	          protocol: TCP
	        resources:
	          requests:
	            cpu: 10m
	            memory: 20Mi
	      dnsPolicy: Default
	      serviceAccountName: kube-dns
	      tolerations:
	      - key: CriticalAddonsOnly
	        operator: Exists
	      - effect: NoSchedule
	        key: node-role.kubernetes.io/master
	      volumes:
	      - configMap:
	          name: kube-dns
	          optional: true
	        name: kube-dns-config
	status: {}
[dryrun] Would perform action CREATE on resource "services" in API group "core/v1"
[dryrun] Attached object:
	apiVersion: v1
	kind: Service
	metadata:
	  creationTimestamp: null
	  labels:
	    k8s-app: kube-dns
	    kubernetes.io/cluster-service: "true"
	    kubernetes.io/name: KubeDNS
	  name: kube-dns
	  namespace: kube-system
	  resourceVersion: "0"
	spec:
	  clusterIP: 10.96.0.10
	  ports:
	  - name: dns
	    port: 53
	    protocol: UDP
	    targetPort: 53
	  - name: dns-tcp
	    port: 53
	    protocol: TCP
	    targetPort: 53
	  selector:
	    k8s-app: kube-dns
	status:
	  loadBalancer: {}
[addons] Applied essential addon: kube-dns
[dryrun] Would perform action CREATE on resource "serviceaccounts" in API group "core/v1"
[dryrun] Attached object:
	apiVersion: v1
	kind: ServiceAccount
	metadata:
	  creationTimestamp: null
	  name: kube-proxy
	  namespace: kube-system
[dryrun] Would perform action CREATE on resource "configmaps" in API group "core/v1"
[dryrun] Attached object:
	apiVersion: v1
	data:
	  kubeconfig.conf: |
	    apiVersion: v1
	    kind: Config
	    clusters:
	    - cluster:
	        certificate-authority: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
	        server: https://192.168.200.101:6443
	      name: default
	    contexts:
	    - context:
	        cluster: default
	        namespace: default
	        user: default
	      name: default
	    current-context: default
	    users:
	    - name: default
	      user:
	        tokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
	kind: ConfigMap
	metadata:
	  creationTimestamp: null
	  labels:
	    app: kube-proxy
	  name: kube-proxy
	  namespace: kube-system
[dryrun] Would perform action CREATE on resource "daemonsets" in API group "extensions/v1beta1"
[dryrun] Attached object:
	apiVersion: extensions/v1beta1
	kind: DaemonSet
	metadata:
	  creationTimestamp: null
	  labels:
	    k8s-app: kube-proxy
	  name: kube-proxy
	  namespace: kube-system
	spec:
	  selector:
	    matchLabels:
	      k8s-app: kube-proxy
	  template:
	    metadata:
	      creationTimestamp: null
	      labels:
	        k8s-app: kube-proxy
	    spec:
	      containers:
	      - command:
	        - /usr/local/bin/kube-proxy
	        - --kubeconfig=/var/lib/kube-proxy/kubeconfig.conf
	        image: gcr.io/google_containers/kube-proxy-amd64:v1.7.4
	        imagePullPolicy: IfNotPresent
	        name: kube-proxy
	        resources: {}
	        securityContext:
	          privileged: true
	        volumeMounts:
	        - mountPath: /var/lib/kube-proxy
	          name: kube-proxy
	        - mountPath: /run/xtables.lock
	          name: xtables-lock
	      hostNetwork: true
	      serviceAccountName: kube-proxy
	      tolerations:
	      - effect: NoSchedule
	        key: node-role.kubernetes.io/master
	      - effect: NoSchedule
	        key: node.cloudprovider.kubernetes.io/uninitialized
	        value: "true"
	      volumes:
	      - configMap:
	          name: kube-proxy
	        name: kube-proxy
	      - hostPath:
	          path: /run/xtables.lock
	        name: xtables-lock
	  updateStrategy:
	    type: RollingUpdate
	status:
	  currentNumberScheduled: 0
	  desiredNumberScheduled: 0
	  numberMisscheduled: 0
	  numberReady: 0
[dryrun] Would perform action CREATE on resource "clusterrolebindings" in API group "rbac.authorization.k8s.io/v1beta1"
[dryrun] Attached object:
	apiVersion: rbac.authorization.k8s.io/v1beta1
	kind: ClusterRoleBinding
	metadata:
	  creationTimestamp: null
	  name: kubeadm:node-proxier
	roleRef:
	  apiGroup: rbac.authorization.k8s.io
	  kind: ClusterRole
	  name: system:node-proxier
	subjects:
	- kind: ServiceAccount
	  name: kube-proxy
	  namespace: kube-system
[addons] Applied essential addon: kube-proxy

Your Kubernetes master has initialized successfully!

To start using your cluster, you need to run (as a regular user):

  mkdir -p $HOME/.kube
  sudo cp -i /tmp/kubeadm-init-dryrun477531930/admin.conf $HOME/.kube/config
  sudo chown $(id -u):$(id -g) $HOME/.kube/config

You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
  http://kubernetes.io/docs/admin/addons/

You can now join any number of machines by running the following on each node
as root:

  kubeadm join --token 96efd6.98bbb2f4603c026b 192.168.200.101:6443 --discovery-token-ca-cert-hash sha256:ccb794198ae65cb3c9e997be510c18023e0e9e064225a588997b9e6c64ebf9f1

```

**Release note**:

```release-note
kubeadm: Implement a `--dry-run` mode and flag for `kubeadm`
```
@kubernetes/sig-cluster-lifecycle-pr-reviews @ncdc @sttts
2017-08-25 14:01:27 -07:00
Steve Leon c682d7cd74 Add host mountpath for controller-manager for flexvolume dir
Controller manager needs access to Flexvolume plugin when
using attach-detach controller interface.

This PR adds the host mount path for the default directory of flexvolume
plugins

Fixes https://github.com/kubernetes/kubeadm/issues/410
2017-08-25 13:23:53 -07:00
Michael Taufen 6918ab1d70 fix ReadOnlyPort, HealthzPort, CAdvisorPort defaulting/documentation
The ReadOnlyPort defaulting prevented passing 0 to diable via
the KubeletConfiguraiton struct.

The HealthzPort defaulting prevented passing 0 to disable via the
KubeletConfiguration struct. The documentation also failed to mention
this, but the check is performed in code.

The CAdvisorPort documentation failed to mention that you can pass 0 to
disable.
2017-08-25 13:15:36 -07:00
Kubernetes Submit Queue 16a438b56e Merge pull request #50063 from dixudx/manifests_use_hostpath_type
Automatic merge from submit-queue (batch tested with PRs 51038, 50063, 51257, 47171, 51143)

update related manifest files to use hostpath type

**What this PR does / why we need it**:
Per [discussion in #46597](https://github.com/kubernetes/kubernetes/pull/46597#pullrequestreview-53568947)

Dependes on #46597

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

Fixes: https://github.com/kubernetes/kubeadm/issues/298

**Special notes for your reviewer**:
/cc @euank @thockin @tallclair @Random-Liu 

**Release note**:

```release-note
None
```
2017-08-25 12:31:02 -07:00
Jordan Liggitt c7defb806f
Generated files 2017-08-25 15:01:08 -04:00
Cheng Xing 396c3c7c6f Adding dynamic Flexvolume plugin discovery capability, using filesystem watch. 2017-08-25 11:42:32 -07:00
Lucas Käldström 2c71814344
kubeadm: Fully implement 'kubeadm init --dry-run' 2017-08-25 20:31:14 +03:00
Kubernetes Submit Queue 43c1b5ff9d Merge pull request #50872 from luxas/kubeadm_upgrade_cmds
Automatic merge from submit-queue (batch tested with PRs 50872, 51103, 51220, 51285, 50841)

kubeadm: Add 'kubeadm upgrade plan' and 'kubeadm upgrade apply' CLI commands

**What this PR does / why we need it**:

This PR is splitted out from: https://github.com/kubernetes/kubernetes/pull/48899 and only handles the CLI/command code. It adds no-op functions only to `phases/upgrade`.

A large chunk of this code is unit tests.
The code here should be pretty straightforward as there is no actual upgrade or business logic here.
It would be cool to get this merged soon-ish.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

fixes: https://github.com/kubernetes/kubeadm/issues/14

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews PTAL
2017-08-25 10:10:03 -07:00
devinyan 96c6bc5d91 modify an little gammer error. 2017-08-25 23:16:05 +08:00
Lucas Käldström 396a33dd8f
autogenerated bazel 2017-08-25 17:23:17 +03:00
Kubernetes Submit Queue 16fee22953 Merge pull request #50901 from karataliu/kubeadm_zsh_completion
Automatic merge from submit-queue (batch tested with PRs 51244, 50559, 49770, 51194, 50901)

Fix zsh completion for kubeadm

**What this PR does / why we need it**:

kubeadm zsh completion will report an error when using after '--flag':
```
kubeadm join --token=1 __handle_flag:25: bad math expression: operand expected at end of string
```

There is a similar bug in kubectl which has been fixed by #48553. It is due to `__kubeadm_declare` gets 'declare -A' into function scope, and `__kubeadm_declare` could be removed now.

This is to port that fix here. 

**Which issue this PR fixes**

**Special notes for your reviewer**:

**Release note**:
2017-08-25 04:11:15 -07:00
Lucas Käldström f9c3148af5
Add unit tests for kubeadm upgrade|plan 2017-08-25 14:00:39 +03:00
Lucas Käldström 65f225a265
kubeadm: Add 'kubeadm upgrade plan' and 'kubeadm upgrade apply' CLI commands 2017-08-25 14:00:16 +03:00
Lucas Käldström a145cf81b0
kubeadm: Resolve tech debt; move commonly used funcs to a general package instead of duplicating 2017-08-25 13:59:33 +03:00
Kubernetes Submit Queue 41aeccd088 Merge pull request #50848 from wackxu/addTest
Automatic merge from submit-queue (batch tested with PRs 50213, 50707, 49502, 51230, 50848)

Expand the test to include other flags as well

**What this PR does / why we need it**:

Expand the test to include other flags as well

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
```
 `NONE`
2017-08-25 01:10:38 -07:00
Kubernetes Submit Queue b1ca9c9dc8 Merge pull request #51191 from mbohlool/backward_comp
Automatic merge from submit-queue (batch tested with PRs 51224, 51191, 51158, 50669, 51222)

	Fix backward compatibility for renamed OpenAPI definitions

Fixes #47372
2017-08-24 22:59:31 -07:00
Cao Shufeng 130f5d10ad set --audit-log-format default to json
Updates: https://github.com/kubernetes/kubernetes/issues/48561
2017-08-25 09:20:20 +08:00
Kubernetes Submit Queue 225a2f50bd Merge pull request #51195 from fabriziopandini/kubeadm-minor-CLI-selfhosting
Automatic merge from submit-queue (batch tested with PRs 50713, 47660, 51198, 51159, 51195)

kubeadm selfhosting CLI improvements

**What this PR does / why we need it**:
This PR implements three small improvements for kubeadm selfhosting CLI:
- `kubeadm phase selfhosting` should be `kubeadm phase self-hosting from-static-pods`
- add `--cert-dir`flag
- add `--config`flag and manage MixedArguments conditions

**Which issue this PR fixes**:
fixes [#397](https://github.com/kubernetes/kubeadm/issues/397) - `kubeadm phase selfhosting` should be `kubeadm phase self-hosting from-static-pods`

**Special notes for your reviewer**:
cc @luxas
cc @jamiehannaford
2017-08-24 11:17:14 -07:00
Di Xu 01e4b960d8 update kubeadm to use hostpath type 2017-08-24 21:11:52 +08:00
Di Xu 7c72594c85 update related files 2017-08-24 17:49:18 +08:00
Kubernetes Submit Queue 4385382364 Merge pull request #48573 from jmillikin-stripe/build-kubectl-on-darwin
Automatic merge from submit-queue (batch tested with PRs 51047, 48573, 50764, 51092, 50578)

Use `select` to disable building static binaries if `--cpu=darwin`.

This change allows kubectl to be built on MacOS machines using
`bazel build //cmd/kubectl`.
    
Mac OS X doesn't support static binaries because it does not have a
stable syscall API. Userspace binaries are expected to dynamically
link against libcrt instead.
    
https://developer.apple.com/library/content/qa/qa1118/_index.html

```release-note
None
```
2017-08-23 17:56:02 -07:00
supereagle a4770d79b8 remove duplicated import 2017-08-23 21:55:18 +08:00
fabriziopandini 462dd940c0 kubeadm selfhosting CLI improvements 2017-08-23 14:31:31 +02:00
mbohlool 95586075af Fix backward compatibility for renamed OpenAPI definitions 2017-08-23 05:06:36 -07:00
Kubernetes Submit Queue b98826408f Merge pull request #51085 from frobware/disclose-StartTestServerOrDie-error-message
Automatic merge from submit-queue (batch tested with PRs 50229, 50973, 50976, 51085, 51084)

Print root cause failure message in StartTestServerOrDie()

**What this PR does / why we need it**:

If the test server cannot be started then print the underling root cause as
opposed to the generic 'Failed to create server chain'.

For example: 

    Failed to create server chain: Model name conflict in merging OpenAPI spec: io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceCondition
2017-08-23 03:36:10 -07:00
fabriziopandini fc753af10f Add CLI flag for `cfg.FeatureFlags` 2017-08-23 09:56:15 +02:00
fabriziopandini 5ff994f17b Move package `app/cmd/features` to `app/features` + bazel files 2017-08-23 09:55:47 +02:00
Kubernetes Submit Queue 172f05bc53 Merge pull request #46902 from thockin/remove-obsolete-bins
Automatic merge from submit-queue (batch tested with PRs 50980, 46902, 51051, 51062, 51020)

Remove seemingly obsolete binaries

It's hard to tell if these are safe to remove.  Let CI tell me.
2017-08-22 23:13:59 -07:00
Kubernetes Submit Queue 4de2b66b73 Merge pull request #50980 from luxas/kubeadm_config_cmd
Automatic merge from submit-queue

kubeadm: Implement 'kubeadm config'

**What this PR does / why we need it**:

Implements a `kubeadm config` command for viewing the current kubeadm configuration stored as a ConfigMap in the cluster and creating that configuration for v1.7- users. kubeadm v1.8+ handles the creation of this ConfigMap at init time, but v1.7 users have to create it themselves with this command in order to be able to preserve the same config after the upgrade.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

fixes: https://github.com/kubernetes/kubeadm/issues/406

**Special notes for your reviewer**:

**Release note**:

```release-note
Adds a new `kubeadm config` command that lets users tell `kubeadm upgrade` what kubeadm configuration to use and lets users view the current state.
```
@kubernetes/sig-cluster-lifecycle-pr-reviews
2017-08-22 23:07:17 -07:00
Kubernetes Submit Queue 5f29fa4a44 Merge pull request #50965 from luxas/kubeadm_branch_kubedns_version
Automatic merge from submit-queue (batch tested with PRs 51039, 50512, 50546, 50965, 50467)

kubeadm: Get kube-dns based on the kubernetes version

**What this PR does / why we need it**:

Makes the kube-dns version used dependent on the kubernetes version. This is required for upgrades as we have to be able to handle one kube-dns version per branch for instance...

Currently a no-op though, as both v1.7 and v1.8 seem to use 1.14.4

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

Dependency for https://github.com/kubernetes/kubernetes/pull/48899 (kubeadm upgrades)

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews 

@kubernetes/dns-maintainers FYI; next time you bump DNS version, please update this func instead of the constant there...
2017-08-22 21:16:14 -07:00
Kubernetes Submit Queue c6980e7247 Merge pull request #51033 from mtaufen/revert-51008-revert-50789-fix-scheme
Automatic merge from submit-queue (batch tested with PRs 50967, 50505, 50706, 51033, 51028)

Revert "Merge pull request #51008 from kubernetes/revert-50789-fix-scheme"

I'm spinning up a cluster right now to test this fix, but I'm pretty sure this was the problem.
There doesn't seem to be a way to confirm from logs, because AFAICT the logs from the hollow kubelet containers are not collected as part of the kubemark test.

**What this PR does / why we need it**:

This reverts commit f4afdecef8, reversing
changes made to e633a1604f.

This also fixes a bug where Kubemark was still using the core api scheme
to manipulate the Kubelet's types, which was the cause of the initial
revert.

**Which issue this PR fixes**: fixes #51007

**Release note**:

```release-note
NONE
```

/cc @shyamjvs @wojtek-t
2017-08-22 10:48:21 -07:00
Kubernetes Submit Queue e80a365fe1 Merge pull request #50505 from feiskyer/kubeadm-reset
Automatic merge from submit-queue (batch tested with PRs 50967, 50505, 50706, 51033, 51028)

Clean kubelet certificates on kubeadm reset

**What this PR does / why we need it**:

After `kubeadm init` and `kubeadm reset` for a few times, kubelet will fail communicating with apiserver because certificate signed by unknown authority. We should cleanup kubelet certs on kubeadm reset.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #48378

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-22 10:48:14 -07:00
Kubernetes Submit Queue 5e1b5b47cf Merge pull request #50967 from luxas/kubeadm_print_staticpod_create
Automatic merge from submit-queue (batch tested with PRs 50967, 50505, 50706, 51033, 51028)

kubeadm: Tell the user when a static pod is created

**What this PR does / why we need it**:

Prints a line to notify the user of the static pod creation in order to be consistent with the other phases (one line per phase and optionally per component).

Now the phase command `controlplane all` and `etcd local` also actually outputs something.
Also renamed `[token]` to `[bootstraptoken]` to match the output below and `s/mode/modes/`

`kubeadm init` output now:
```console
$ ./kubeadm init
[kubeadm] WARNING: kubeadm is in beta, please do not use it for production clusters.
[init] Using Kubernetes version: v1.7.4
[init] Using Authorization modes: [Node RBAC]
[preflight] Running pre-flight checks
[preflight] WARNING: docker service is not enabled, please run 'systemctl enable docker.service'
[preflight] Starting the kubelet service
[kubeadm] WARNING: starting in 1.8, tokens expire after 24 hours by default (if you require a non-expiring token use --token-ttl 0)
[certificates] Generated ca certificate and key.
[certificates] Generated apiserver certificate and key.
[certificates] apiserver serving cert is signed for DNS names [thegopher kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 192.168.1.115]
[certificates] Generated apiserver-kubelet-client certificate and key.
[certificates] Generated sa key and public key.
[certificates] Generated front-proxy-ca certificate and key.
[certificates] Generated front-proxy-client certificate and key.
[certificates] Valid certificates and keys now exist in "/etc/kubernetes/pki"
[kubeconfig] Wrote KubeConfig file to disk: "admin.conf"
[kubeconfig] Wrote KubeConfig file to disk: "kubelet.conf"
[kubeconfig] Wrote KubeConfig file to disk: "controller-manager.conf"
[kubeconfig] Wrote KubeConfig file to disk: "scheduler.conf"
[controlplane] Wrote Static Pod manifest for component kube-apiserver to "/etc/kubernetes/manifests/kube-apiserver.yaml"
[controlplane] Wrote Static Pod manifest for component kube-controller-manager to "/etc/kubernetes/manifests/kube-controller-manager.yaml"
[controlplane] Wrote Static Pod manifest for component kube-scheduler to "/etc/kubernetes/manifests/kube-scheduler.yaml"
[etcd] Wrote Static Pod manifest for a local etcd instance to "/etc/kubernetes/manifests/etcd.yaml"
[init] Waiting for the kubelet to boot up the control plane as Static Pods from directory "/etc/kubernetes/manifests"
[apiclient] All control plane components are healthy after 40.002026 seconds
[markmaster] Master thegopher tainted and labelled with key/value: node-role.kubernetes.io/master=""
[bootstraptoken] Using token: cfe65e.d196614967c3ffe3
[bootstraptoken] Configured RBAC rules to allow Node Bootstrap tokens to post CSRs in order for nodes to get long term certificate credentials
[bootstraptoken] Configured RBAC rules to allow the csrapprover controller automatically approve CSRs from a Node Bootstrap Token
[bootstraptoken] Creating the "cluster-info" ConfigMap in the "kube-public" namespace
[uploadconfig] Storing the configuration used in ConfigMap "kubeadm-config" in the "kube-system" Namespace
[addons] Applied essential addon: kube-dns
[addons] Applied essential addon: kube-proxy

Your Kubernetes master has initialized successfully!

To start using your cluster, you need to run (as a regular user):

  mkdir -p $HOME/.kube
  sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
  sudo chown $(id -u):$(id -g) $HOME/.kube/config

You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
  http://kubernetes.io/docs/admin/addons/

You can now join any number of machines by running the following on each node
as root:

  kubeadm join --token cfe65e.d196614967c3ffe3 192.168.1.115:6443 --discovery-token-ca-cert-hash sha256:eb3461b9b707eafc214577f36ae8c351bbc4d595ab928fc84caf1325b69cb192

$ ./kubeadm alpha phase controlplane all
[controlplane] Wrote Static Pod manifest for component kube-apiserver to "/etc/kubernetes/manifests/kube-apiserver.yaml"
[controlplane] Wrote Static Pod manifest for component kube-controller-manager to "/etc/kubernetes/manifests/kube-controller-manager.yaml"
[controlplane] Wrote Static Pod manifest for component kube-scheduler to "/etc/kubernetes/manifests/kube-scheduler.yaml"
$ ./kubeadm alpha phase etcd local
[etcd] Wrote Static Pod manifest for a local etcd instance to "/etc/kubernetes/manifests/etcd.yaml"
```

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews @fabriziopandini
2017-08-22 10:48:11 -07:00
Lucas Käldström 28117323bc
kubeadm: Implement the 'kubeadm config' command 2017-08-22 18:49:34 +03:00
Robert Pothier 9dd5fe826b kubeadm: Add node-cidr-mask-size to pass to kube-controller-manager for IPv6
Due to the increased size of subnets with IPv6, the node-cidr-mask-size needs to be passed to kube-controller-manager. If the user passes a IPv6 cidr, the node-cidr-mask-size will be set to 64, If IPv4 it will be set to 24 as it was previously.
2017-08-22 10:33:27 -04:00
Kubernetes Submit Queue cb1220c114 Merge pull request #50963 from luxas/kubeadm_add_back_component_label2
Automatic merge from submit-queue (batch tested with PRs 50893, 50913, 50963, 50629, 50640)

kubeadm: Add back labels for the Static Pod control plane (attempt 2)

**What this PR does / why we need it**:

Exactly the same PR as https://github.com/kubernetes/kubernetes/pull/50174, but that PR was appearently lost in a rebase/mis-merge or something, so resending this one.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews
2017-08-22 05:31:10 -07:00
Andrew McDermott 0acda5efc6 Print root cause failure message in StartTestServerOrDie()
If the server cannot be started then print the underling root cause as
opposed to the generic 'Failed to create server chain'.
2017-08-22 10:26:09 +01:00
Kubernetes Submit Queue bf00190037 Merge pull request #47698 from fabriziopandini/kubeadm308
Automatic merge from submit-queue (batch tested with PRs 46458, 50934, 50766, 50970, 47698)

kubeadm: Warn in preflight checks if KubernetesVersion is of a newer branch than kubeadm

**What this PR does / why we need it**:
see https://github.com/kubernetes/kubeadm/issues/307

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
https://github.com/kubernetes/kubeadm/issues/307

**Special notes for your reviewer**:

**Release note**:
2017-08-21 18:11:28 -07:00
Kubernetes Submit Queue 99e50f3544 Merge pull request #50970 from mtaufen/fix-unhandled-error
Automatic merge from submit-queue (batch tested with PRs 46458, 50934, 50766, 50970, 47698)

Fix unhandled error

Fixes an unhandled error in the kubelet startup code.
fixes: https://github.com/kubernetes/kubernetes/issues/50981
2017-08-21 18:11:25 -07:00
Kubernetes Submit Queue b49a179ea4 Merge pull request #50766 from luxas/kubeadm_selfhosting_race_condition
Automatic merge from submit-queue (batch tested with PRs 46458, 50934, 50766, 50970, 47698)

kubeadm: Make the self-hosting with certificates in Secrets mode work again

**What this PR does / why we need it**:

This PR:
 - makes the self-hosting with certificates in Secrets mode work
 - makes the wait functions timeoutable
 - fixes a race condition where the kubelet may be slow to remove the Static Pod
 - cleans up some of the self-hosting logic
 - makes self-hosting-with-secrets respect the feature flag

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

fixes: https://github.com/kubernetes/kubeadm/issues/405

**Special notes for your reviewer**:

This is work in progress. I'll add unit tests, rebase upon https://github.com/kubernetes/kubernetes/pull/50762 and maybe split out some of the functionatlity here into a separate PR

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews
2017-08-21 18:11:22 -07:00
Kubernetes Submit Queue f40d07480f Merge pull request #49119 from kad/n-addons-repo
Automatic merge from submit-queue (batch tested with PRs 50693, 50831, 47506, 49119, 50871)

kubeadm: Implement support for using images from CI builds

**What this PR does / why we need it**: Implements support for CI images in kubeadm

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes kubernetes/kubeadm#337

**Special notes for your reviewer**:

**Release note**:
```release-note
- kubeadm now supports "ci/latest-1.8" or "ci-cross/latest-1.8" and similar labels.
```
2017-08-21 14:30:03 -07:00
fabriziopandini 9730b82fcf kubeadm preflight - enforce maximum supported Kubernetes version 2017-08-21 22:05:13 +02:00
Michael Taufen a90d81620b Revert "Merge pull request #51008 from kubernetes/revert-50789-fix-scheme"
This reverts commit f4afdecef8, reversing
changes made to e633a1604f.

This also fixes a bug where Kubemark was still using the core api scheme
to manipulate the Kubelet's types, which was the cause of the initial
revert.
2017-08-21 11:28:05 -07:00
wlan0 fb0b57ee47 fix conditional for warning while starting KCM without secret file 2017-08-21 10:51:47 -07:00
Kubernetes Submit Queue d852b8aad9 Merge pull request #50631 from luxas/kubeadm_dryrun_apiclient
Automatic merge from submit-queue (batch tested with PRs 47896, 50678, 50620, 50631, 51005)

kubeadm: Adds dry-run support for kubeadm using the `--dry-run` option

**What this PR does / why we need it**:

Adds dry-run support to kubeadm by creating a fake clientset that can get totally fake values (like in the init case), or delegate GETs/LISTs to a real API server but discard all edits like POST/PUT/PATCH/DELETE

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

fixes: https://github.com/kubernetes/kubeadm/issues/389

**Special notes for your reviewer**:

This PR depends on https://github.com/kubernetes/kubernetes/pull/50626, first three commits are from there
This PR is a dependency for https://github.com/kubernetes/kubernetes/pull/48899 (kubeadm upgrades)

I have some small things to fixup and I'll yet write unit tests, but PTAL if you think this is going in the right direction

**Release note**:

```release-note
kubeadm: Adds dry-run support for kubeadm using the `--dry-run` option
```
cc @kubernetes/sig-cluster-lifecycle-pr-reviews @kubernetes/sig-api-machinery-pr-reviews
2017-08-21 08:26:26 -07:00
Kubernetes Submit Queue 5c351c282a Merge pull request #50678 from xiangpengzhao/remove-cm-flag
Automatic merge from submit-queue (batch tested with PRs 47896, 50678, 50620, 50631, 51005)

Remove deprecated lookup cache flags.

**What this PR does / why we need it**:
Remove deprecated lookup cache flags: `replication-controller-lookup-cache-size, replicaset-lookup-cache-size, daemonset-lookup-cache-size`

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #43388

**Special notes for your reviewer**:
/cc @enisoc

**Release note**:

```release-note
The following deprecated flags have been removed from `kube-controller-manager`: `replication-controller-lookup-cache-size`, `replicaset-lookup-cache-size`, and `daemonset-lookup-cache-size`. Make sure you no longer attempt to set them.
```
2017-08-21 08:26:20 -07:00
Kubernetes Submit Queue 5b159fa750 Merge pull request #47896 from NickrenREN/makeEventRecorder-cleanup
Automatic merge from submit-queue (batch tested with PRs 47896, 50678, 50620, 50631, 51005)

MakeEventRecorder function cleanup

delete KubeletConfiguration arg since it is unused


fixes #50969

```release-note
NONE
```
2017-08-21 08:26:17 -07:00
Shyam JVS 5591914d62 Revert "Don't register the kubeletconfig group with the default Scheme" 2017-08-21 11:15:27 +02:00
Lucas Käldström 6bc8ab3725
kubeadm: Use kube-dns manifests based on the kubernetes version 2017-08-20 11:30:07 +03:00
Michael Taufen c48b2dd7e4 Fix unhandled error 2017-08-19 11:54:17 -07:00
Lucas Käldström e4855bd1af
kubeadm: Tell the user when a static pod is created 2017-08-19 20:47:25 +03:00
Lucas Käldström 4a693337b6
kubeadm: Add back labels for the Static Pod control plane (attempt 2) 2017-08-19 19:59:59 +03:00
Tim Hockin 831fd242e8 Remove seemingly obsolete binaries 2017-08-18 21:01:19 -07:00
xswack 7154034fff Expand the test to include other flags as well 2017-08-19 11:17:16 +08:00
Pengfei Ni a2d0d46056 Clean /run/kubernetes on kubeadm reset 2017-08-19 08:40:25 +08:00
Lucas Käldström d2e08fd739
autogenerated bazel 2017-08-19 00:46:38 +03:00
Lucas Käldström 21eeb5c925
kubeadm: Adding unit tests for newly added funcs 2017-08-19 00:45:49 +03:00
Lucas Käldström d1acdf1627
kubeadm: Make the self-hosting with certificates in Secrets mode work again 2017-08-19 00:45:16 +03:00
Michael Taufen 0af9f756cd Don't register the kubeletconfig group with the default Scheme 2017-08-18 13:51:39 -07:00
Kubernetes Submit Queue 9553e89a19 Merge pull request #50860 from wlan0/master
Automatic merge from submit-queue

Proposal to add @wlan0 to appropriate owner files

@thockin @luxas
2017-08-18 10:24:20 -07:00
Kubernetes Submit Queue 0ade03bc0f Merge pull request #50839 from tengqm/fix-admission-controller-reg
Automatic merge from submit-queue (batch tested with PRs 50911, 50839)

Fix admission plugin registration

**What this PR does / why we need it**:
The current registration of admission plug-ins happen too late so the
command line help is not yielding correct/useful information to users.
This is already causing confusion as mentioned in some issues.

This patch fixes it by moving plugins.go down to options package because
"plugins" in this context are themselves options for users. Registration
of plugins is not an expensive operation and it is already done in most
execution paths.

**Which issue this PR fixes**
fixes #50833 

**Special notes for your reviewer**:
There might be other thoughts on how to better align this with other
efforts. This PR is leaving them to future work. For example:
in future, we may want to revisit these plugins and migrate them to the
shared apiserver repo when appropriate.

**Release note**:
I'm not sure if a release note is needed for this. Maybe there is a need.

```release-note
```
2017-08-18 08:24:30 -07:00
Alexander Kanevskiy 9f3ac327c7 Autogenerated 2017-08-18 17:02:23 +03:00
Alexander Kanevskiy 2312920cbc Implemented support for using images from CI builds
Implements kubernetes/kubeadm#337
2017-08-18 17:02:18 +03:00
Lucas Käldström 0bf84aa182
kubeadm: Adds dry-run support for kubeadm using the '--dry-run' option 2017-08-18 16:05:12 +03:00
Dong Liu 6fcde5694f Fix zsh completion for kubeadm 2017-08-18 18:49:41 +08:00
fabriziopandini c6bb8fbb4a Autogenerated bazel files 2017-08-18 09:14:28 +02:00
fabriziopandini 00fa026b9d Main work -- cleanup certs CLI command 2017-08-18 09:14:11 +02:00
fabriziopandini 5fac458f5f Main work -- refactor certs phase 2017-08-18 09:13:49 +02:00
NickrenREN b00ec8e46c Cleanup makeEventRecorder function
drop KubeletConfiguration arg since it is unused
2017-08-18 14:54:10 +08:00
tengqm a909cc8af5 Fix admission plugin registration
The current registration of admission plug-ins happen too late so the
command line help is not yielding correct/useful information to users.
This is already causing confusion as mentioned in some issues.

This patch fixes it by moving plugins.go down to options package because
"plugins" in this context are themselves options for users. Registration
of plugins is not an expensive operation and it is already done in most
execution paths.

In future, we may want to revisit these plugins and migrate them to the
shared apiserver repo when appropriate.
2017-08-18 10:32:15 +08:00
wlan0 92415f7dd7 Proposal to add @wlan0 to appropriate owner files 2017-08-17 11:37:51 -07:00
Daneyon Hansen 3390bc3cbc Updates Kubeadm Master Endpoint for IPv6
Previously, kubeadm would use <ip>:<port> to construct a master
endpoint. This works fine for IPv4 addresses, but not for IPv6.
IPv6 requires the ip to be encased in brackets when being joined
to a port with a colon.

This patch updates kubeadm to support wrapping a v6 address with
[] to form the master endpoint url. Since this functionality is
needed in multiple areas, a dedicated util function was created.

Fixes: https://github.com/kubernetes/kubernetes/issues/48227
2017-08-17 10:57:54 -07:00
Lucas Käldström c08091699c
kubeadm: Fix self-hosting race condition 2017-08-17 16:07:04 +03:00
Jordan Liggitt 55c7ce1d80
Honor --use-service-account-credentials in cloud-controller-manager 2017-08-17 01:41:57 -04:00
Kubernetes Submit Queue 4a15d32bec Merge pull request #50762 from jamiehannaford/kubeadm-gated-secrets
Automatic merge from submit-queue (batch tested with PRs 41901, 50762, 50756)

Feature-gate self-hosted secrets

**What this PR does / why we need it**:

Feature gates now select whether secrets are used for TLS cert storage in self-hosted clusters.

**Release note**:
```release-note
TLS cert storage for self-hosted clusters is now configurable. You can store them as secrets (alpha) or as usual host mounts.
```

/cc @luxas
2017-08-16 16:25:20 -07:00
Kubernetes Submit Queue 4032896ef1 Merge pull request #41901 from soltysh/cronjobs_beta
Automatic merge from submit-queue

Promote CronJobs to batch/v1beta1 - just the API

This PR promotes CronJobs to beta.

@erictune @kubernetes/sig-apps-api-reviews @kubernetes/api-approvers ptal

This builds on top of #41890 and needs #40932 as well

```release-note
Promote CronJobs to batch/v1beta1.
```
2017-08-16 15:59:46 -07:00
ymqytw b776df8a20 move i18n to kubectl/util 2017-08-16 12:27:36 -07:00
Jamie Hannaford abedc49b71 Feature-gate self-hosted secrets 2017-08-16 20:01:01 +02:00
Kubernetes Submit Queue 04a6481059 Merge pull request #47480 from danehans/kubeadm_certs
Automatic merge from submit-queue (batch tested with PRs 49115, 47480)

Adds IPv6 test cases for kubeadm certs.

**What this PR does / why we need it**:
Adds IPv6 test cases in support of kubeadm certificate and validation functionality. It's needed to ensure test cases cover IPv6 related networking scenarios.

**Which issue this PR fixes**
This PR is in support of Issue #1443

**Special notes for your reviewer**:
Additional PR's will follow to ensure kubeadm supports IPv6.

**Release note**:
```NONE
```
2017-08-16 06:27:27 -07:00
Kubernetes Submit Queue 7b26438253 Merge pull request #50692 from fabriziopandini/kubeadm-phases-small-cleanups
Automatic merge from submit-queue (batch tested with PRs 50692, 50727)

kubeadm: Small cleanups from the phases refactoring

**What this PR does / why we need it**:
Small cleanups on kubeadm phases

**Which issue this PR fixes**: 
fixes pending comments in [#49419](https://github.com/kubernetes/kubernetes/pull/49419)
fixes [#376](https://github.com/kubernetes/kubeadm/issues/376)

**Special notes for your reviewer**:
cc @luxas
2017-08-16 05:33:56 -07:00
Maciej Szulik 43b8715d82
Promote CronJobs to batch/v1beta1 2017-08-16 08:42:21 +02:00
Daneyon Hansen d1633727ec Adds IPv6 test cases to kubeadm certs and validation pkgs. 2017-08-15 13:17:58 -07:00
Kubernetes Submit Queue df8287c91d Merge pull request #47998 from danehans/kubeadm_boot
Automatic merge from submit-queue

Adds IPv6 test case to kubeadm bootstrap

**What this PR does / why we need it**:
Adds IPv6 test cases in support of kubeadm bootstrap functionality. It's needed to ensure test cases cover IPv6 related networking scenarios.

**Which issue this PR fixes**
This PR is in support of Issue #1443 and Issue #47666

**Special notes for your reviewer**:
Additional PR's will follow to ensure kubeadm fully supports IPv6.

**Release note**:
```NONE
```

/area ipv6
2017-08-15 13:11:22 -07:00
Kubernetes Submit Queue 21812547f9 Merge pull request #49051 from mtaufen/move-kc-type
Automatic merge from submit-queue (batch tested with PRs 50198, 49051, 48432)

move KubeletConfiguration out of componentconfig API group

I'm splitting #44252 into more manageable steps. This step moves the types and updates references.

To reviewers: the most important changes are the removals from pkg/apis/componentconfig and additions to pkg/kubelet/apis/kubeletconfig. Almost everything else is an import or name update.

I have one unanswered question: Should I create a whole new api scheme for Kubelet APIs rather than register e.g. a kubeletconfig group with the default runtime.Scheme instance? This feels like the right thing, as the Kubelet should be exposing its own API, but there's a big fat warning not to do this in `pkg/api/register.go`. Can anyone answer this?
2017-08-15 12:18:18 -07:00
Kubernetes Submit Queue d72fc055ee Merge pull request #50626 from luxas/kubeadm_separate_apiclient
Automatic merge from submit-queue (batch tested with PRs 50626, 50683, 50679, 50684, 50460)

kubeadm: Centralize client create-or-update logic in one package

**What this PR does / why we need it**:

Moves all Create-or-Update logic into one package instead of duplicating that logic all around in the codebase.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

This PR depends on https://github.com/kubernetes/kubernetes/pull/50214.
Note that commit 2 is the only one that needs reviewing.
This PR is required for https://github.com/kubernetes/kubernetes/pull/48899 (kubeadm upgrade)

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews @mattmoyer @fabriziopandini
2017-08-15 10:28:21 -07:00
Michael Taufen 24bab4c20f move KubeletConfiguration out of componentconfig API group 2017-08-15 08:12:42 -07:00
fabriziopandini 7e71c49bbf Small improvements on CLI messages 2017-08-15 16:30:08 +02:00
fabriziopandini d150362e63 Small code cleanups 2017-08-15 16:27:27 +02:00
Lucas Käldström 8c5c3ca197
autogenerated bazel 2017-08-15 15:52:49 +03:00
Lucas Käldström d725fe2c2c
kubeadm: Centralize client create-or-update logic in one package 2017-08-15 15:52:37 +03:00
xiangpengzhao 6ee6b17719 Remove deprecated lookup cache flags. 2017-08-15 20:03:11 +08:00
Kubernetes Submit Queue 55160e7cc1 Merge pull request #49322 from bsalamat/priority_admission
Automatic merge from submit-queue

Add Priority admission controller

**What this PR does / why we need it**: Add Priority admission controller. This admission controller checks creation and update of PriorityClasses. It also resolves a PriorityClass name of a pod to its integer value.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
Add Priority admission controller for monitoring and resolving PriorityClasses.
```

ref/ #47604
ref/ #48646
2017-08-15 03:13:15 -07:00
Dr. Stefan Schimanski 11b25366bc apiservers: add synchronous shutdown mechanism on SIGTERM+INT 2017-08-15 09:17:18 +02:00
Kubernetes Submit Queue c85aea35cb Merge pull request #50302 from fabriziopandini/kubeadm-phases-controlplane2
Automatic merge from submit-queue

kubeadm: Implementing the controlplane phase

**What this PR does / why we need it:**
This contains implementation of controlplane phases in kubeadm, which is part of the wider effort of implementing phases in kubeadm, previously in alpha stage.

The original proposal for this activity can be found [here](https://github.com/kubernetes/kubeadm/pull/156/files) and related comments.

Kubeadm phase implementation checklist is defined [here](https://github.com/kubernetes/kubeadm/issues/267)

Common implementation guidelines and principles for all phases are defined [here](https://docs.google.com/document/d/1VQMyFIVMfRGQPP3oCUpfjiWtOr3pLxp4g7cP-hXQFXc/edit?usp=sharing)

This PR implements:

- [x] kubeadm phase controlplane: wip by @fabriziopandini
  - [x] kubeadm phase controlplane all
  - [x] kubeadm phase controlplane etcd
  - [x] kubeadm phase controlplane apiserver
  - [x] kubeadm phase controlplane scheduler
  - [x] kubeadm phase controlplane controller-manager

**Which issue this PR fixes:**
https://github.com/kubernetes/kubeadm/issues/349

**Special notes for your reviewer:**
This PR implements the same approach of #49419, thus minimising rework/impacts on existing codebase.
2017-08-14 20:35:14 -07:00
Kubernetes Submit Queue 17fa37292f Merge pull request #49129 from justinsb/revert_48056
Automatic merge from submit-queue (batch tested with PRs 49129, 50436, 50417, 50553, 47587)

Revert "Remove old node role label that is not used by kubeadm"

Revert the commit that removed printing of node roles from kubectl.

It sounds like we also need to update the labels we inspect, as these were previously removed.  But starting with a clean revert.

Issue #49124

```release-note
NONE
```
2017-08-14 19:48:56 -07:00
Kubernetes Submit Queue a4996c99d4 Merge pull request #50214 from andrewrynhard/refactor_addons
Automatic merge from submit-queue (batch tested with PRs 49904, 50484, 50214)

Refactor addons into multiple packages

**What this PR does / why we need it**:
https://github.com/kubernetes/kubeadm/issues/348

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
https://github.com/kubernetes/kubeadm/issues/348
2017-08-14 13:09:59 -07:00
Kubernetes Submit Queue 9f902fef24 Merge pull request #50094 from sttts/sttts-no-importprefix
Automatic merge from submit-queue (batch tested with PRs 50094, 48966, 49478, 50593, 49140)

apimachinery: remove pre-apigroups import path logic

Replacing #50093.
2017-08-14 12:14:55 -07:00
John Millikin 046a6ce6bb
Use `select` to disable building static binaries if `--cpu=darwin`.
This change allows kubectl to be built on MacOS machines using
`bazel build //cmd/kubectl`.

Mac OS X doesn't support static binaries because it does not have a
stable syscall API. Userspace binaries are expected to dynamically
link against libcrt instead.

https://developer.apple.com/library/content/qa/qa1118/_index.html
2017-08-14 09:56:05 -07:00
Andrew Rynhard 8947726f6a Update bazel 2017-08-14 08:15:54 -07:00
Andrew Rynhard bbbf530504 Refactor addons into multiple packages 2017-08-14 07:57:20 -07:00
fabriziopandini 8ab27c1fbe Autogenerated bazel etc. 2017-08-14 16:31:53 +02:00
fabriziopandini 11e5274e2b Add CLI commands 2017-08-14 16:31:32 +02:00
fabriziopandini 740a78b0f3 Main work -- move etcd to separate phase and hook up most things 2017-08-14 16:31:09 +02:00
fabriziopandini 4db581c8ee Move all staticpod utils to separate package 2017-08-14 16:30:31 +02:00
Pengfei Ni c242432a3b Rename runtime/default to docker default 2017-08-13 15:42:15 +08:00
Pengfei Ni f3150c9c8c Support seccomp profile from container's security context 2017-08-13 15:42:15 +08:00
Kubernetes Submit Queue 42adb9ef25 Merge pull request #50258 from liggitt/token-cache
Automatic merge from submit-queue (batch tested with PRs 49488, 50407, 46105, 50456, 50258)

Enable caching successful token authentication

Resolves #50472

To support revocation of service account tokens, an etcd lookup of the token and service account is done by the token authenticator. Controllers that make dozens or hundreds of API calls per second (like the endpoints controller) cause this lookup to be done very frequently on the same objects.

This PR:
* Implements a cached token authenticator that conforms to the authenticator.Token interface
* Implements a union token authenticator (same approach as the union request authenticator, conforming to the authenticator.Token interface)
* Cleans up the auth chain construction to group all token authenticators (means we only do bearer and websocket header parsing once)
* Adds a 10-second TTL cache to successful token authentication

```release-note
API server authentication now caches successful bearer token authentication results for a few seconds.
```
2017-08-11 14:14:06 -07:00
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton 33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Jeff Grafton cf55f9ed45 Autogenerate BUILD files 2017-08-11 09:30:23 -07:00
Kubernetes Submit Queue f37b30657e Merge pull request #50078 from php-coder/fix_useless_cat_usage
Automatic merge from submit-queue

Simplify a command for unmounting mounted directories

**What this PR does / why we need it**:
This PR simplifies a command for unmounting mounted directories. It replaces `cat | awk | grep` by a single `awk` expression.

**Special notes for your reviewer**:
Link about useless cat/grep usage: http://porkmail.org/era/unix/award.html#grep

**Credit**:
I saw this code fragment in the Julia Evans (@jvns) [write up](https://jvns.ca/blog/2017/07/30/a-couple-useful-ideas-from-google/).

**Release note**:
```release-note
NONE
```

CC @simo5
2017-08-11 06:48:40 -07:00
Kubernetes Submit Queue 7adb675003 Merge pull request #50269 from stevekuznetsov/skuznets/import-restrictions
Automatic merge from submit-queue

Rewrite staging import verifier in Go

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>

**What this PR does / why we need it**:

Maintaining Bash is nobody's idea of fun. The declarative config is infinitely easier to read, as well.

**Special notes for your reviewer**:

@sttts still trying to figure out the rules you have encoded in the shell script... very confusing. Please review the `kube-gen` specifically.

**Release note**:
```release-note
NONE
```
2017-08-11 00:37:13 -07:00
Kubernetes Submit Queue a227c1ea2c Merge pull request #48581 from mengqiy/kubectl_logs
Automatic merge from submit-queue

move logs to kubectl/util

Move `pkg/util/logs` to `pkg/kubectl/util/logs` per https://github.com/kubernetes/kubernetes/issues/48209#issuecomment-311730681
This will make kubeadm, kubefed, gke-certificates-controller and e2e have dependency on kubectl, which should be fine.

partially addresses: kubernetes/community#598

```release-note
NONE
```

/assign @apelisse @monopole
2017-08-10 23:45:38 -07:00
Klaus Ma 55fa10c182 Tainted node by condition. 2017-08-11 09:55:29 +08:00
Daneyon Hansen 85db3ff08e Adds IPv6 test case to kubeadm bootstrap 2017-08-10 13:31:11 -07:00
ymqytw d7659dffff move logs to kubectl/util 2017-08-10 11:30:26 -07:00
Matt Moyer 358806e18b kubeadm: generated deepcopy for `k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm` and `k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha1`. 2017-08-10 11:39:25 -05:00
Matt Moyer 1be639d6b0 kubeadm: implement TLS discovery root CA pinning.
This change adds the `--discovery-token-ca-cert-hash` and `--discovery-token-unsafe-skip-ca-verification` flags for `kubeadm join` and corresponding fields on the kubeadm NodeConfiguration struct. These flags configure enhanced TLS validation for token-based discovery.

The enhanced TLS validation works by pinning the public key hashes of the cluster CA. This is done by connecting to the `cluster-info` endpoint initially using an unvalidated/unsafe TLS connection. After the cluster info has been loaded, parsed, and validated with the existing symmetric signature/MAC scheme, the root CA is validated against the pinned public key set. A second request is made using validated/safe TLS using the newly-known CA and the result is validated to make sure the same `cluster-info` was returned from both requests.

This validation prevents a class of attacks where a leaked bootstrap token (such as from a compromised worker node) allows an attacker to impersonate the API server.

This change also update `kubeadm init` to print the correct `--discovery-token-ca-cert-hash` flag in the example `kubeadm join` command it prints at the end of initialization.
2017-08-10 11:39:25 -05:00
Matt Moyer 2dd359ba19 kubeadm: add pubkeypin package (public key pinning hash implementation).
This change adds a `k8s.io/kubernetes/cmd/kubeadm/app/util/pubkeypin` package which implements x509 public key pinning in the style of RFC7469. This is the public key hash format used by the new `kubeadm join --discovery-token-ca-cert-hash` flag.

Hashes are namespaced with a short type, with "sha256" being the only currently-supported format. Type "sha256" is a hex-encoded SHA-256 hash over the Subject Public Key Info (SPKI) object in DER-encoded ASN.1.
2017-08-10 11:37:07 -05:00
Dr. Stefan Schimanski 8728576236 apimachinery: remove pre-apigroups import prefix logic 2017-08-10 13:07:54 +02:00
Slava Semushin ae99f10afd Simplify a command for unmounting mounted directories under /var/lib/kubelet. 2017-08-10 12:58:50 +02:00
Kubernetes Submit Queue 9bbcd4af60 Merge pull request #50335 from ironcladlou/gc-discovery-optimization
Automatic merge from submit-queue (batch tested with PRs 49642, 50335, 50390, 49283, 46582)

Improve GC discovery sync performance

Improve GC discovery sync performance by only syncing when discovered
resource diffs are detected. Before, the GC worker pool was shut down
and monitors resynced unconditionally every sync period, leading to
significant processing delays causing test flakes where otherwise
reasonable GC timeouts were being exceeded.

Related to https://github.com/kubernetes/kubernetes/issues/49966.

/cc @kubernetes/sig-api-machinery-bugs

```release-note
NONE
```
2017-08-10 00:53:19 -07:00
Kubernetes Submit Queue 85e2e5dd9a Merge pull request #49642 from liggitt/rbac-v1
Automatic merge from submit-queue (batch tested with PRs 49642, 50335, 50390, 49283, 46582)

Add rbac.authorization.k8s.io/v1

xref https://github.com/kubernetes/features/issues/2

Promotes the rbac.authorization.k8s.io/v1beta1 API to v1 with no changes

```release-note
The `rbac.authorization.k8s.io/v1beta1` API has been promoted to `rbac.authorization.k8s.io/v1` with no changes.
The `rbac.authorization.k8s.io/v1alpha1` version is deprecated and will be removed in a future release.
```
2017-08-10 00:53:17 -07:00
Lucas Käldström cb73972224
autogenerated 2017-08-10 06:46:46 +03:00
Lucas Käldström 5f4e19beb8
kubeadm: Add the 'kubeadm phase bootstrap-token' command 2017-08-10 06:45:53 +03:00
Lucas Käldström 04748160a6
kubeadm: Move all node bootstrap token related code in one phase package 2017-08-10 06:45:19 +03:00
Jordan Liggitt 0458fac8c0
Simplify bearer token auth chain, cache successful authentications 2017-08-09 23:37:24 -04:00
Kubernetes Submit Queue b23af4b906 Merge pull request #50320 from luxas/kubeadm_saveconfig_phase
Automatic merge from submit-queue

kubeadm: Upload configuration used at 'kubeadm init' time to ConfigMap for easier upgrades

**What this PR does / why we need it**:

Uploads config used to a ConfigMap so we can upgrade a cluster seamlessly without forcing the user to re-specify all options they specified the first time.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
fixes: https://github.com/kubernetes/kubeadm/issues/373

**Special notes for your reviewer**:

This should be a cherrypick-candidate for easier upgrading to v1.8
cc @wojtek-t 

**Release note**:

```release-note
kubeadm: Upload configuration used at 'kubeadm init' time to ConfigMap for easier upgrades
```
@kubernetes/sig-cluster-lifecycle-pr-reviews @timothysc
2017-08-09 17:14:19 -07:00
Kubernetes Submit Queue fdc65025ee Merge pull request #50337 from bowei/node-controller-repackage
Automatic merge from submit-queue (batch tested with PRs 50016, 49583, 49930, 46254, 50337)

Break up node controller into packages

This change does NO actual code changes other than moving constituent
parts into packages.

```release-note
NONE
```
2017-08-09 14:14:35 -07:00
Kubernetes Submit Queue 458cc04330 Merge pull request #46254 from mtaufen/dkcfg
Automatic merge from submit-queue (batch tested with PRs 50016, 49583, 49930, 46254, 50337)

Alpha Dynamic Kubelet Configuration

Feature: https://github.com/kubernetes/features/issues/281

This proposal contains the alpha implementation of the Dynamic Kubelet Configuration feature proposed in ~#29459~ [community/contributors/design-proposals/dynamic-kubelet-configuration.md](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/dynamic-kubelet-configuration.md). 

Please note:
- ~The proposal doc is not yet up to date with this implementation, there are some subtle differences and some more significant ones. I will update the proposal doc to match by tomorrow afternoon.~
- ~This obviously needs more tests. I plan to write several O(soon). Since it's alpha and feature-gated, I'm decoupling this review from the review of the tests.~ I've beefed up the unit tests, though there is still plenty of testing to be done.
- ~I'm temporarily holding off on updating the generated docs, api specs, etc, for the sake of my reviewers 😄~ these files now live in a separate commit; the first commit is the one to review.

/cc @dchen1107 @vishh @bgrant0607 @thockin @derekwaynecarr 

```release-note
Adds (alpha feature) the ability to dynamically configure Kubelets by enabling the DynamicKubeletConfig feature gate, posting a ConfigMap to the API server, and setting the spec.configSource field on Node objects. See the proposal at https://github.com/kubernetes/community/blob/master/contributors/design-proposals/dynamic-kubelet-configuration.md for details.
```
2017-08-09 14:14:32 -07:00
Jordan Liggitt dd7be70a4a
Add rbac.authorization.k8s.io/v1 2017-08-09 17:04:54 -04:00
Lucas Käldström 728d0f9355
autogenerated bazel 2017-08-09 19:31:16 +03:00
Lucas Käldström ad7012e974
kubeadm: Upload configuration used at 'kubeadm init' time to ConfigMap for easier upgrades 2017-08-09 19:22:40 +03:00
Dan Mace 3d6d57a18f Improve GC discovery sync performance
Improve GC discovery sync performance by only syncing when discovered
resource diffs are detected. Before, the GC worker pool was shut down
and monitors resynced unconditionally every sync period, leading to
significant processing delays causing test flakes where otherwise
reasonable GC timeouts were being exceeded.

Related to https://github.com/kubernetes/kubernetes/issues/49966.
2017-08-09 09:16:05 -04:00
Kubernetes Submit Queue 788664b7f7 Merge pull request #50288 from liggitt/service-account-warning
Automatic merge from submit-queue (batch tested with PRs 50173, 50324, 50288, 50263, 50333)

Honor --use-service-account-credentials and warn when missing private key

Fixes #50275 by logging a warning and failing to start rather than continue to run ignoring the user's specified config
2017-08-09 02:21:56 -07:00
Kubernetes Submit Queue 35e5197eca Merge pull request #50173 from luxas/kubeadm_constants
Automatic merge from submit-queue

kubeadm: Centralize commonly used paths/constants to the constants pkg

**What this PR does / why we need it**:
Before there were constants defined for the control plane components in three different places:
 - images
 - phases/controlplane
 - phases/selfhosting

Now they are in one centralized place. I also moved funcs for building common paths to that lib.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

Dependency for: https://github.com/kubernetes/kubernetes/pull/48899

**Special notes for your reviewer**:

Most of this PR really is autogenerated with a replace tool. I tested this and things work just normally as well.

**Release note**:

```release-note
NONE
```
@timothysc @dmmcquay @pipejakob @kubernetes/sig-cluster-lifecycle-pr-reviews
2017-08-09 01:41:19 -07:00
Steve Kuznetsov 54809de387
Rewrite staging import verifier in Go
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2017-08-08 16:08:20 -07:00
Bowei Du 27854fa0d8 Break up node controller into packages
This change does NO actual code changes other than moving constituent
parts into packages.
2017-08-08 15:33:56 -07:00
Michael Taufen 443d58e40a Dynamic Kubelet Configuration
Alpha implementation of the Dynamic Kubelet Configuration feature.
See the proposal doc in #29459.
2017-08-08 12:21:37 -07:00
Lucas Käldström 9a6ef9677a
kubeadm: Centralize commonly used paths/constants to the constants pkg 2017-08-08 15:07:21 +03:00
Kubernetes Submit Queue 608b81a63f Merge pull request #50174 from luxas/kubeadm_add_back_component_label
Automatic merge from submit-queue (batch tested with PRs 50254, 50174, 50179)

kubeadm: Add back labels for the Static Pod control plane

**What this PR does / why we need it**:

This Labels section has been removed now for a short period during the v1.8 dev cycle, but I found a good use-case for it; namely filtering Mirror Pods by the `component=kube-*` label when waiting for the self-hosted control plane to come up after an upgrade. It's not _really_ neccessary, but nice to have.

Also noticed the lack of coverage for this func, so added a small unit test.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

Dependency for: https://github.com/kubernetes/kubernetes/pull/48899

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews @dmmcquay @timothysc @mattmoyer
2017-08-08 04:02:54 -07:00
Kubernetes Submit Queue 2c088a2d5a Merge pull request #50259 from deads2k/controllers-01-printhealth
Automatic merge from submit-queue (batch tested with PRs 50208, 50259, 49702, 50267, 48986)

provide the failing health as part of the controller error

When the controllers fail to start because the master is unhealthy, the healthz message is a useful starting point for debugging. This provides it in the error returned.
2017-08-08 01:52:58 -07:00
Jordan Liggitt dffee9c06f
Honor --use-service-account-credentials and warn when missing private key 2017-08-08 00:48:17 -04:00
Robert Rati 926f070719 Make ClusterID required for AWS. #48954 2017-08-07 15:47:00 -04:00
David Eads 47d426c441 provide the failing health as part of the controller error 2017-08-07 12:55:29 -04:00
Jamie Hannaford 173bc31c25 Enable selfHosted feature flag 2017-08-07 15:20:34 +02:00
Dr. Stefan Schimanski 3b310d8989 Update generated code 2017-08-06 15:32:28 +02:00
Dr. Stefan Schimanski 1910b5a1dd Fix code implicitly casting clientsets to getters 2017-08-06 15:30:13 +02:00
fabriziopandini f9f91bf18e fully implement kubeadm-phase-kubeconfig 2017-08-05 16:44:39 +02:00
Lucas Käldström a69697e607
kubeadm: Add back labels for the Static Pod control plane 2017-08-05 15:45:09 +03:00
Kubernetes Submit Queue bb99ccc178 Merge pull request #50162 from luxas/kubeadm_clientset_iface
Automatic merge from submit-queue (batch tested with PRs 47416, 47408, 49697, 49860, 50162)

kubeadm: Replace *clientset.Clientset with clientset.Interface

**What this PR does / why we need it**:

Needed for https://github.com/kubernetes/kubernetes/pull/48899
We should always use `clientset.Interface` instead of `*clientset.Clientset`, for better testability and all the other benefits of using an interface.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:
Should be straightforward to merge

**Release note**:

```release-note
NONE
```
@timothysc @dmmcquay @pipejakob
2017-08-05 03:23:01 -07:00
Kubernetes Submit Queue 34e9c6fa5d Merge pull request #41611 from cblecker/clientgo-public-pem-functions
Automatic merge from submit-queue (batch tested with PRs 50119, 48366, 47181, 41611, 49547)

Move remaining cert helper functions from pkg/serviceaccount to client-go/util/cert

**What this PR does / why we need it**:
Unifies all remaining certificate helper functions from pkh/serviceaccount to client-go/util/cert. Private key functions were moved in #40907

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #40807

**Special notes for your reviewer**:

**Release note**:
2017-08-04 14:29:39 -07:00
Kubernetes Submit Queue fae79dd4b4 Merge pull request #47181 from dims/fail-on-swap-enabled
Automatic merge from submit-queue (batch tested with PRs 50119, 48366, 47181, 41611, 49547)

Fail on swap enabled and deprecate experimental-fail-swap-on flag

**What this PR does / why we need it**:

    * Deprecate the old experimental-fail-swap-on
    * Add a new flag fail-swap-on and set it to true

    Before this change, we would not fail when swap is on. With this
    change we fail for everyone when swap is on, unless they explicitly
    set --fail-swap-on to false.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

Fixes #34726

**Special notes for your reviewer**:

**Release note**:

```release-note
Kubelet will by default fail with swap enabled from now on. The experimental flag "--experimental-fail-swap-on" has been deprecated, please set the new "--fail-swap-on" flag to false if you wish to run with /proc/swaps on.
```
2017-08-04 14:29:36 -07:00
Lucas Käldström 0734b63dc0
kubeadm: Replace *clientset.Clientset with clientset.Interface 2017-08-04 21:14:50 +03:00
Kubernetes Submit Queue e29ead1154 Merge pull request #50090 from gmarek/EventClient
Automatic merge from submit-queue (batch tested with PRs 48237, 50084, 50019, 50069, 50090)

Explicitly use Core client as EventClient in hollow node
2017-08-03 22:22:05 -07:00
Kubernetes Submit Queue 151b8118d5 Merge pull request #50069 from fisherxu/master
Automatic merge from submit-queue (batch tested with PRs 48237, 50084, 50019, 50069, 50090)

Fix comment of isHTTPSURL

**What this PR does / why we need it**:
fix comment of isHTTPSURL
2017-08-03 22:22:03 -07:00
Kubernetes Submit Queue 0c2f816646 Merge pull request #48237 from xiangpengzhao/fix-proxy-test
Automatic merge from submit-queue

Add test for kube-proxy running with "--cleanup-iptables=true"

**What this PR does / why we need it**:
Add test to prevent such kube-proxy panic to happen again.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #48177

**Special notes for your reviewer**:
Forgot to add this in last PR #48183. Should we also add this to v1.7 milestone?
/cc @ncdc @dchen1107 

**Release note**:

```release-note
NONE
```
2017-08-03 22:03:31 -07:00
Christoph Blecker aac4d5382d
Move remaining cert helper functions to client-go/util/cert
- Move public key functions to client-go/util/cert
- Move pki file helper functions to client-go/util/cert
- Standardize on certutil package alias
- Update dependencies to client-go/util/cert
2017-08-03 13:17:07 -07:00
gmarek 20b6b3ca99 Explicitly use Core client as EventClient in hollow node 2017-08-03 15:15:09 +02:00
Kubernetes Submit Queue 42a73ee3ac Merge pull request #48943 from jamiehannaford/kubeadm-feature-gates
Automatic merge from submit-queue

Add --feature-gate flags to kubeadm

**What this PR does / why we need it**:

Adds `--feature-gates` in similar manner to other `cmd` binaries

**Which issue this PR fixes** 

https://github.com/kubernetes/kubeadm/issues/323

**Special notes for your reviewer**:

This results in a lot of probably unnecessary feature flags. I'm guessing a lot of kubeadm users will be confused when they see:

```
Flags:
      --feature-gates mapStringBool   A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:
APIResponseCompression=true|false (ALPHA - default=false)
Accelerators=true|false (ALPHA - default=false)
AdvancedAuditing=true|false (ALPHA - default=false)
AllAlpha=true|false (ALPHA - default=false)
AllowExtTrafficLocalEndpoints=true|false (default=true)
AppArmor=true|false (BETA - default=true)
DebugContainers=true|false (ALPHA - default=false)
DynamicKubeletConfig=true|false (ALPHA - default=false)
DynamicVolumeProvisioning=true|false (ALPHA - default=true)
ExperimentalCriticalPodAnnotation=true|false (ALPHA - default=false)
ExperimentalHostUserNamespaceDefaulting=true|false (BETA - default=false)
LocalStorageCapacityIsolation=true|false (ALPHA - default=false)
PersistentLocalVolumes=true|false (ALPHA - default=false)
PodPriority=true|false (ALPHA - default=false)
RotateKubeletClientCertificate=true|false (ALPHA - default=false)
RotateKubeletServerCertificate=true|false (ALPHA - default=false)
StreamingProxyRedirects=true|false (BETA - default=true)
TaintBasedEvictions=true|false (ALPHA - default=false)
  -h, --help                          help for kubeadm
```

However the feature flags used in the core pkg is global, so I don't think it can be overriden. So we have a few options:

1. Allow these flags for kubeadm
2. Refactor feature pkg to allow granular features
3. Roll our own feature gating for kubeadm

/cc @luxas
2017-08-03 04:54:10 -07:00
xufei 8ea31945be Fix comment of isHTTPSURL 2017-08-03 15:42:33 +08:00
Kubernetes Submit Queue 07ddb3941f Merge pull request #49899 from ericchiang/kubelet-close-conns-on-rotate
Automatic merge from submit-queue (batch tested with PRs 49237, 49656, 49980, 49841, 49899)

certificate manager: close existing client conns once cert rotates

After the kubelet rotates its client cert, it will keep connections to the API server open indefinitely, causing it to use its old credentials instead of the new certs. Because the API server authenticates client certs at the time of the request, and not the handshake, this could cause the kubelet to start hitting auth failures even if it rotated its certificate to a new, valid one.
    
When the kubelet rotates its cert, close down existing connections to force a new TLS handshake.

Ref https://github.com/kubernetes/features/issues/266
Updates https://github.com/kubernetes-incubator/bootkube/pull/663

```release-note
After a kubelet rotates its client cert, it now closes its connections to the API server to force a handshake using the new cert. Previously, the kubelet could keep its existing connection open, even if the cert used for that connection was expired and rejected by the API server.
```

/cc @kubernetes/sig-auth-bugs 
/assign @jcbsmpsn @mikedanese
2017-08-02 19:11:18 -07:00
Kubernetes Submit Queue 22af024093 Merge pull request #49412 from bjhaid/etcd_healthz_endpoint
Automatic merge from submit-queue (batch tested with PRs 49989, 49806, 49649, 49412, 49512)

This adds an etcd health check endpoint to kube-apiserver

addressing https://github.com/kubernetes/kubernetes/issues/48215.

**What this PR does / why we need it**:
This ensures kube-apiserver `/healthz` endpoint fails whenever connectivity cannot be established to etcd, also ensures the etcd preflight checks works with unix sockets

**Which issue this PR fixes**: fixes #48215

**Special notes for your reviewer**:
This PR does not use the etcd client directly as the client object is wrapped behind the storage interface and not exposed directly for use, so I decided to reuse what's being done in the preflight. So this will only check fail for connectivity and not etcd auth related problems. I did not write tests for the endpoint because I couldn't find examples that I could follow for writing tests for healthz related endpoints, I'll be willing to write those tests if someone can point me at a relevant one.

**Release note**:
```release-note
Add etcd connectivity endpoint to healthz
```

@deads2k please help review, thanks!
2017-08-02 17:06:02 -07:00
Davanum Srinivas 71e8c8eba4 Fail on swap enabled and deprecate experimental-fail-swap-on flag
* Deprecate the old experimental-fail-swap-on
* Add a new flag fail-swap-on and set it to true

Before this change, we would not fail when swap is on. With this
change we fail for everyone when swap is on, unless they explicitly
set --fail-swap-on to false.
2017-08-02 16:20:01 -04:00
Kubernetes Submit Queue 84e0326eb1 Merge pull request #49782 from supereagle/update-generated-deepcopy
Automatic merge from submit-queue (batch tested with PRs 50029, 48517, 49739, 49866, 49782)

Update generated deepcopy code

**What this PR does / why we need it**:
In generated deepcopy code, the method names in comments do not match the real method names.

**Which issue this PR fixes**: fixes #49755

**Special notes for your reviewer**:
/assign @sttts @caesarxuchao 


**Release note**:
```release-note
NONE
```
2017-08-02 12:46:57 -07:00
Jamie Hannaford e6a98688d0 Add --feature-gate flags to kubeadm 2017-08-02 17:05:36 +02:00
Kubernetes Submit Queue acc00afece Merge pull request #49267 from MrHohn/kube-proxy-abort-when-healthz-fails
Automatic merge from submit-queue (batch tested with PRs 49992, 48861, 49267, 49356, 49886)

Emit event and retry when fail to start healthz server on kube-proxy

**What this PR does / why we need it**: Enhance kube-proxy's logic when fail to start healthz server.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: From #49263.

**Special notes for your reviewer**:
/assign @thockin @nicksardo @bowei 

**Release note**:

```release-note
NONE
```
2017-08-02 05:16:01 -07:00
Kubernetes Submit Queue 9067d35951 Merge pull request #48861 from mbohlool/openapi_aggr
Automatic merge from submit-queue (batch tested with PRs 49992, 48861, 49267, 49356, 49886)

Reintegrate aggregation support for OpenAPI

Reintegrating changes of #46734

Changes summary:

- Extracted all OpenAPI specs to new repo `kube-openapi`
- Make OpenAPI spec aggregator to copy and rename any non-requal model (even with documentation change only).
- Load specs when adding APIServices and retry on failure until successful spec retrieval or a 404.
- Assumes all Specs except aggregator's Spec are static 
- A re-register of any APIService will result in updating the spec for that service (Suggestion for TPR: they should be registered to aggregator API Server, Open for discussion if any more changes needed for another PR.)

fixes #48548
2017-08-02 05:15:57 -07:00
Kubernetes Submit Queue f33297d5c1 Merge pull request #49092 from huangjiuyuan/fix-apiserver-option-test
Automatic merge from submit-queue (batch tested with PRs 49871, 49422, 49092, 49858, 48999)

adding kube-apiserver starting option tests

**What this PR does / why we need it**:
There is only one test for `--enable-swagger-ui` option in `cmd/kube-apiserver/app/options/options_test.go`, I have expanded this test with more kube-apiserver starting options.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

`NONE`
2017-08-01 23:35:53 -07:00
Kubernetes Submit Queue 58e8c3e23d Merge pull request #49872 from xiangpengzhao/fix-kubeadm-ver
Automatic merge from submit-queue (batch tested with PRs 49870, 49416, 49872, 49892, 49908)

Make "kubeadm version" json format output more readable.

**What this PR does / why we need it**:
Add indent to json format output.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
ref: #43750 #46598

**Special notes for your reviewer**:
output example:
```
#kubeadm version -o json
{
  "clientVersion": {
    "major": "1",
    "minor": "8+",
    "gitVersion": "v1.8.0-alpha.2.1026+d8205661b700c6-dirty",
    "gitCommit": "d8205661b700c6f99c33ea0ac1e5ed3e49c202b2",
    "gitTreeState": "dirty",
    "buildDate": "2017-07-31T12:14:28Z",
    "goVersion": "go1.8.3",
    "compiler": "gc",
    "platform": "linux/amd64"
  }
}
```


**Release note**:

```release-note
NONE
```
2017-08-01 19:53:01 -07:00
Eric Chiang 98795b32de generated:
Commands run:

	./hack/update-bazel.sh
2017-08-01 16:33:52 -07:00
Eric Chiang 11d96c174e certificate manager: close existing client conns once cert rotates
After the kubelet rotates its client cert, it will keep connections
to the API server open indefinitely, causing it to use its old
credentials instead of the new certs

When the kubelet rotates its cert, close down existing connections
to force a new TLS handshake.
2017-08-01 16:33:52 -07:00
bjhaid 47d748c5dc This adds an etcd health check endpoint to kube-apiserver
addressing https://github.com/kubernetes/kubernetes/issues/48215.
2017-08-01 21:37:52 +00:00
mbohlool 1806609596 Update Bazel 2017-08-01 03:37:18 -07:00
mbohlool 8c0580d89b Aggregate OpenAPI spec 2017-08-01 03:37:17 -07:00
mbohlool 400b77b48f Update main repo references to new kube-openapi repo 2017-08-01 03:37:16 -07:00
Edmund Rhudy fea25a61c1 Fixes kubernetes/kubeadm#347
Node name discovery failed on `kubeadm join`. If a node name
is not explicitly provided, it will be looked up.
2017-07-31 14:31:27 -04:00
Bobby (Babak) Salamat e25476a6ed autogenerated files 2017-07-31 10:16:35 -07:00
supereagle a1c880ece3 update generated deepcopy code 2017-07-31 22:33:00 +08:00
xiangpengzhao bb070a64a8 Make "kubeadm version" json format output more readable. 2017-07-31 20:17:41 +08:00
huangjiuyuan 00a3767289 adding kube-apiserver starting option tests
Signed-off-by: huangjiuyuan <jiuyuan.huang@daocloud.io>
2017-07-31 17:21:40 +08:00
Kubernetes Submit Queue 74ca1045d7 Merge pull request #49750 from danehans/kubeadm_tolower_certs
Automatic merge from submit-queue (batch tested with PRs 49538, 49708, 47665, 49750, 49528)

Lowercases hostname for kubeadm cert slice

**What this PR does / why we need it**:
Previously, unit tests on master were failing due to this error:
```
--- FAIL: TestSubCmdApiServerFlags (0.99s)
	certs_test.go:149: APIserverCert.DNSNames[0] is danehans-m-c1kp instead of DANEHANS-M-C1KP
```
The PR fixes the TestSubCmdApiServerFlags test, which uses the OS hostname to compare the apiserver serving cert and fails if the OS hostname is in caps.

**Which issue this PR fixes**: fixes # https://github.com/kubernetes/kubeadm/issues/361

**Special notes for your reviewer**:

**Release note**:

```NONE
```
2017-07-29 05:28:55 -07:00
Kubernetes Submit Queue 7be28a15cc Merge pull request #47665 from ironcladlou/gc-poll-types
Automatic merge from submit-queue (batch tested with PRs 49538, 49708, 47665, 49750, 49528)

Enable garbage collection of custom resources

Enhance the garbage collector to periodically refresh the resources it monitors (via discovery) to enable custom resource definition GC (addressing #44507 and reverting #47432).

This is a replacement for #46000.

/cc @lavalamp @deads2k @sttts @caesarxuchao 

/ref https://github.com/kubernetes/kubernetes/pull/48065

```release-note
The garbage collector now supports custom APIs added via CustomeResourceDefinition or aggregated apiservers. Note that the garbage collector controller refreshes periodically, so there is a latency between when the API is added and when the garbage collector starts to manage it.
```
2017-07-29 05:28:53 -07:00
Kubernetes Submit Queue 740ca9a052 Merge pull request #49538 from supereagle/versioned-coreclient
Automatic merge from submit-queue (batch tested with PRs 49538, 49708, 47665, 49750, 49528)

Use the core client with version

**What this PR does / why we need it**:
Replace the **deprecated** `clientSet.Core()` with `clientSet.CoreV1()`.

**Which issue this PR fixes**: fixes #49535

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-07-29 05:28:49 -07:00
mbohlool 88868402b8 Revert "Aggregate OpenAPI specs"
This reverts commit 1a1d9a0394.
2017-07-28 14:02:36 -07:00
Kubernetes Submit Queue 9dc3a661d7 Merge pull request #49681 from mikedanese/kubelet-csr
Automatic merge from submit-queue (batch tested with PRs 49581, 49652, 49681, 49688, 44655)

kubeadm: use kubelet bootstrap instead of reimplementing

@kubernetes/sig-cluster-lifecycle-api-reviews
2017-07-28 13:45:48 -07:00
Kubernetes Submit Queue dcb1d2875e Merge pull request #47539 from gnufied/deprecate-keep-terminated-pod-volumes
Automatic merge from submit-queue (batch tested with PRs 45813, 49594, 49443, 49167, 47539)

Deprecate keep-terminated-pod-volumes

It was discussed and agreed by sig-storage that
this flag causes unnecessary confusion and is hard to keep
synchornized with controller's attach/detach functionality.

Fixes https://github.com/kubernetes/kubernetes/issues/45615

```release-note
keep-terminated-pod-volumes flag on kubelet is deprecated.
```
2017-07-28 07:22:41 -07:00
Dan Mace d08dfb92c7 Enable garbage collection of custom resources
Enhance the garbage collector to periodically refresh the resources it
monitors (via discovery) to enable custom resource definition GC.

This implementation caches Unstructured structs for any kinds not
covered by a shared informer. The existing meta-only codec only supports
compiled types; an improved codec which supports arbitrary types could
be introduced to optimize caching to store only metadata for all
non-informer types.
2017-07-28 10:00:10 -04:00
Kubernetes Submit Queue b3db5a20c1 Merge pull request #43494 from guangxuli/fix_k8s_kubelet_panix
Automatic merge from submit-queue (batch tested with PRs 49238, 49595, 43494, 47897, 48905)

Should not set struct pointer directly to interface which may cause potential panic

fix https://github.com/kubernetes/kubernetes/issues/43127 to avoid potential kubelet panic.

In our old implemention, interface `kubeDeps.EventClient ` (interface) will never equals to `nil` even if `eventClient `(struct pointer )was set to `nil`.  `kubeDeps.ExternalKubeClient` and `kubeDeps.KubeClient` also have same potential risk.
2017-07-28 02:12:56 -07:00
Kubernetes Submit Queue 7056b5ba70 Merge pull request #49238 from janetkuo/apps-v1beta2-rs
Automatic merge from submit-queue (batch tested with PRs 49238, 49595, 43494, 47897, 48905)

Add apps/v1beta2.ReplicaSet

~Depends on #48746~ (merged)
~Depends on #49357~ (merged)
xref: #49135

```release-note
Add a new API object apps/v1beta2.ReplicaSet
```
2017-07-28 02:12:51 -07:00
Justin Santa Barbara 81b0fa7b29 Revert "Remove old node role label that is not used by kubeadm"
This reverts commit e25a5b1546.
2017-07-28 02:26:43 -04:00
Kubernetes Submit Queue 803cb9303b Merge pull request #49495 from deads2k/controller-12-toleration
Automatic merge from submit-queue (batch tested with PRs 49665, 49689, 49495, 49146, 48934)

make it possible to allow discovery errors for controllers

Update the discovery client to return partial discovery information *and* an error.  Since we can aggregate API servers, discovery of some resources can fail independently.  Callers of this function who want to tolerate the errors can, existing callers will still get an error and fail in normal blocks.

@kubernetes/sig-api-machinery-misc @sttts
2017-07-27 21:45:34 -07:00
Zihong Zheng db379de778 Emit event and retry when fail to start healthz server on kube-proxy. 2017-07-27 20:54:51 -07:00
Bobby (Babak) Salamat de8689c99b Add priority admission controller 2017-07-27 18:44:40 -07:00
Daneyon Hansen 3d6a24c407 Lowercases hostname for kubeadm cert slice 2017-07-27 14:29:12 -07:00
Mike Danese fe7ba9e748 kubeadm: use kubelet bootstrap instead of reimplementing 2017-07-27 09:21:24 -07:00
deads2k b7286f3188 make it possible to allow discovery errors for controllers 2017-07-26 16:09:30 -04:00
Kubernetes Submit Queue 81c5547a18 Merge pull request #49514 from smarterclayton/move_bootstrap
Automatic merge from submit-queue (batch tested with PRs 47357, 49514, 49271, 49572, 49476)

Move client cert bootstrap code into pkg/kubelet/...

Keeps it better encapsulated. @deads2k
2017-07-26 12:03:45 -07:00
Janet Kuo 6eaf6884fb Bump ReplicaSet to apps/v1beta2 2017-07-26 09:51:41 -07:00
supereagle edce96c5b6 use the core client with version 2017-07-26 19:16:02 +08:00
Kubernetes Submit Queue 06e3a00a14 Merge pull request #47252 from sttts/sttts-crd-initializers
Automatic merge from submit-queue (batch tested with PRs 43443, 46193, 49071, 47252)

custom-resources: add initializer test
2017-07-25 21:52:52 -07:00
Kubernetes Submit Queue 4399fb2b87 Merge pull request #49071 from foxish/foxish-api
Automatic merge from submit-queue (batch tested with PRs 43443, 46193, 49071, 47252)

Add v1beta2.DaemonSet

Depends on https://github.com/kubernetes/kubernetes/pull/48746
Partly implements https://github.com/kubernetes/kubernetes/issues/49135

```release-note
Adding type apps/v1beta2.DaemonSet
```
2017-07-25 21:52:50 -07:00
Clayton Coleman 333536a68b
Move client cert bootstrap to a kubelet package
Makes it more clearly associated with the existing code and simplifies
cmd/kubelet/app.
2017-07-25 17:54:15 -04:00
Clayton Coleman 48236f0321
Move cmd/kubelet/app/bootstrap.go to a kubelet subpackage 2017-07-25 17:53:39 -04:00
Kubernetes Submit Queue 2189314895 Merge pull request #40050 from mtaufen/standalone-mode
Automatic merge from submit-queue (batch tested with PRs 48976, 49474, 40050, 49426, 49430)

Use presence of kubeconfig file to toggle standalone mode

Fixes #40049 

```release-note
The deprecated --api-servers flag has been removed. Use --kubeconfig to provide API server connection information instead. The --require-kubeconfig flag is now deprecated. The default kubeconfig path is also deprecated. Both --require-kubeconfig and the default kubeconfig path will be removed in Kubernetes v1.10.0.
```

/cc @kubernetes/sig-cluster-lifecycle-misc @kubernetes/sig-node-misc
2017-07-25 12:14:43 -07:00
Kubernetes Submit Queue 9350afd772 Merge pull request #48976 from supereagle/cleanup-api-package
Automatic merge from submit-queue (batch tested with PRs 48976, 49474, 40050, 49426, 49430)

Remove duplicated import and wrong alias name of api package

**What this PR does / why we need it**:

**Which issue this PR fixes**: fixes #48975

**Special notes for your reviewer**:
/assign @caesarxuchao

**Release note**:
```release-note
NONE
```
2017-07-25 12:14:38 -07:00
foxish 14d5793869 DS: changes to server and storage 2017-07-25 11:47:57 -07:00
Kubernetes Submit Queue 9c3d0e8a96 Merge pull request #48224 from deads2k/controller-11-reflectormetrics
Automatic merge from submit-queue (batch tested with PRs 48224, 45431, 45946, 48775, 49396)

add reflector metrics

This adds metrics (optionally prometheus) to reflectors so that you can see when one reflector is behaving poorly and just how poorly its doing.

@eparis 

```release-note
Adds metrics for checking reflector health.
```
2017-07-25 11:06:47 -07:00
Dr. Stefan Schimanski 7185624688 kube-apiserver: add CRD initializer test 2017-07-25 16:52:40 +02:00
Kubernetes Submit Queue a7c219f92b Merge pull request #49550 from allencloud/use-demorgans-to-make-code-more-readable
Automatic merge from submit-queue (batch tested with PRs 49286, 49550)

use demorgans to make startRouteController implementation more readable

Signed-off-by: allencloud <allen.sun@daocloud.io>



**What this PR does / why we need it**:
When I was learning controller manager, I found that there is a `TODO` which is to use demorgans to make code more readable. So I try to make it work.
 

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
NONE

**Special notes for your reviewer**:
NONE
**Release note**:

```release-note
NONE
```

ping @deads2k
2017-07-25 06:41:11 -07:00
deads2k 151d39682e add reflector metrics 2017-07-25 09:01:37 -04:00
Kubernetes Submit Queue c31a1379b8 Merge pull request #49498 from luxas/kubeadm_fix_config_validation
Automatic merge from submit-queue (batch tested with PRs 49498, 49192)

kubeadm: Make sure --config can be mixed with --skip-* flags

**What this PR does / why we need it**:

fixes: https://github.com/kubernetes/kubeadm/issues/352

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:
Should be a cherrypick candidate

**Release note**:

```release-note
kubeadm: Fixes a small bug where `--config` and `--skip-*` flags couldn't be passed at the same time in validation.
```
@kubernetes/sig-cluster-lifecycle-pr-reviews @ericchiang @wojtek-t
2017-07-25 02:43:11 -07:00
allencloud df2a1e50e3 use demorgans to make startRouteController implementation more readable
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-07-25 16:21:48 +08:00
Kubernetes Submit Queue 7f1d9382ec Merge pull request #48846 from dashpole/remove_ood
Automatic merge from submit-queue

Remove flags low-diskspace-threshold-mb and outofdisk-transition-frequency

issue: #48843

This removes two flags replaced by the eviction manager.  These have been depreciated for two releases, which I believe correctly follows the kubernetes depreciation guidelines.

```release-note
Remove depreciated flags: --low-diskspace-threshold-mb and --outofdisk-transition-frequency, which are replaced by --eviction-hard
```

cc @mtaufen since I am changing kubelet flags
cc @vishh @derekwaynecarr 
/sig node
2017-07-24 23:05:50 -07:00
Kubernetes Submit Queue e623fed778 Merge pull request #48636 from jingxu97/July/allocatable
Automatic merge from submit-queue (batch tested with PRs 48636, 49088, 49251, 49417, 49494)

Fix issues for local storage allocatable feature

This PR fixes the following issues:
1. Use ResourceStorageScratch instead of ResourceStorage API to represent
local storage capacity
2. In eviction manager, use container manager instead of node provider
(kubelet) to retrieve the node capacity and reserved resources. Node
provider (kubelet) has a feature gate so that storagescratch information
may not be exposed if feature gate is not set. On the other hand,
container manager has all the capacity and allocatable resource
information.

This PR fixes issue #47809
2017-07-24 19:30:33 -07:00
supereagle adc0eef43e remove duplicated import and wrong alias name of api package 2017-07-25 10:04:25 +08:00
Lucas Käldström aa46947557
kubeadm: Make sure --config can be mixed with --skip-* flags 2017-07-24 22:21:12 +03:00
Michael Taufen 38aee0464d Providing kubeconfig file is now the switch for standalone mode
Replaces use of --api-servers with --kubeconfig in Kubelet args across
the turnup scripts. In many cases this involves generating a kubeconfig
file for the Kubelet and placing it in the correct location on the node.
2017-07-24 11:03:00 -07:00
Clayton Coleman b9bebe8a4e
Use a client interface instead of a concrete type
Aids testing
2017-07-22 20:29:48 -04:00
Kubernetes Submit Queue a79e6b183d Merge pull request #49346 from caesarxuchao/generate-to-client-go
Automatic merge from submit-queue (batch tested with PRs 49326, 49394, 49346, 49379, 49399)

Make client-go authoritative

client-go now is authoritative except for `client-go/pkg/version`, which I think we can leave as is for a while.
2017-07-21 23:23:35 -07:00
Kubernetes Submit Queue 75b3a0f3de Merge pull request #48607 from luxas/kubeadm_cleanup_selfhosting
Automatic merge from submit-queue (batch tested with PRs 46210, 48607, 46874, 46598, 49240)

kubeadm: Make the hostPath volume mount code more secure

**What this PR does / why we need it**:

 - Refactors the hostpath volume mounting code for the Static Pods
 - Splits out the functionality that was in a big function to something testable
 - Unit test a lot
 - Adds support for mounting external etcd CA/cert/key files in an other path than `/etc/ssl/certs`. Before this you **had** to have your files in there or the apiserver would crashloop
 - Significantly improves comment coverage
 - Now only mounts the bare essentials instead of nearly everything. For example, don't mount full `/etc/kubernetes` when the only thing you need is `/etc/kubernetes/scheduler.conf`
 - Make everything but the etcd datadir read-only for components.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

Fixes: https://github.com/kubernetes/kubeadm/issues/341

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
cc @kubernetes/sig-cluster-lifecycle-pr-reviews
2017-07-21 17:00:15 -07:00
Chao Xu 44f0188fe7 generated innocuous change 2017-07-21 14:29:59 -07:00
Chao Xu 112510b774 move clientset's import_known_versions.go to kube-controller-manager 2017-07-21 13:35:23 -07:00
Kubernetes Submit Queue ae1ff1a2d4 Merge pull request #48746 from janetkuo/apps-v1beta2
Automatic merge from submit-queue

Add a new API version apps/v1beta2

xref: #49135
This PR adds a new API version `apps/v1beta2` which contains a copy (of types, conversions, and defaults) of `apps/v1beta1` StatefulSet, Deployment, and their subresources. Note that `apps/v1beta2` is still WIP and we will make breaking changes to it before releasing 1.8.

Moving core controllers (StatefulSet, Deployment, ReplicaSet, DaemonSet) to `apps/v1beta2` is the first step of moving them to `apps/v1` (GA). 

This PR is a starting point for DaemonSet and ReplicaSet to move from `/extensions` to `/apps` and for Deployment and StatefulSet to make some breaking changes (e.g. new defaults and/or remove deprecated fields).

```release-note
Add a new API version apps/v1beta2
```
2017-07-21 11:47:21 -07:00
Kubernetes Submit Queue 40249c061f Merge pull request #49366 from gmarek/coreEvents
Automatic merge from submit-queue

Explicitly use Core() client when creating eventClint

@sttts
2017-07-21 04:20:38 -07:00
Kubernetes Submit Queue ec9275d6b6 Merge pull request #49328 from euank/etcd-selinux-default
Automatic merge from submit-queue (batch tested with PRs 49328, 49285, 49307, 49127, 49163)

kubeadm: don't customize etcd selinux label

The original change that added the unconfined label included a comment
indicating it won't be needed in the future.
See: https://github.com/kubernetes/kubernetes/pull/33555#issuecomment-251126908

That time is now. https://github.com/kubernetes/kubernetes/pull/33663
has landed and means we no longer have to go out of our way to make that
work.

Removing the label also increases security since there wasn't really a
good reason for etcd to be run with such broad selinux privileges.

This also will allow kubeadm to avoid errors on distros without an spc_t
type, such as Gentoo and Container Linux (at the time of writing at
least).

Fixes https://github.com/kubernetes/kubeadm/issues/269

**Release note**:
```release-note
NONE
```
2017-07-21 03:00:14 -07:00
gmarek 45b47c7faa Explicitly use Core() client when creating eventClint 2017-07-21 11:22:56 +02:00
Kubernetes Submit Queue 5644e3d770 Merge pull request #49227 from deads2k/quota-01-tighten
Automatic merge from submit-queue (batch tested with PRs 49107, 47177, 49234, 49224, 49227)

tighten quota controller interface

While debugging a quota performance problem, I had to chase some references deeper than necessary because the interfaces were overly broad. This tightens them.

```release-note
NONE
```
2017-07-20 15:08:27 -07:00
Euan Kemp 644aef100b kubeadm: don't customize etcd selinux label
The original change that added the unconfined label included a comment
indicating it won't be needed in the future.
See: https://github.com/kubernetes/kubernetes/pull/33555#issuecomment-251126908

That time is now. https://github.com/kubernetes/kubernetes/pull/33663
has landed and means we no longer have to go out of our way to make that
work.

Removing the label also increases security since there wasn't really a
good reason for etcd to be run with such broad selinux privileges.

This also will allow kubeadm to avoid errors on distros without an spc_t
type, such as Gentoo and Container Linux (at the time of writing at
least).

Fixes https://github.com/kubernetes/kubeadm/issues/269
2017-07-20 13:36:06 -07:00
David Ashpole 7a23f8b018 remove deprecated flags LowDiskSpaceThresholdMB and OutOfDiskTransitionFrequency 2017-07-20 13:23:13 -07:00
ymqytw 9b393a83d4 update godep 2017-07-20 11:03:49 -07:00
ymqytw 3dfc8bf7f3 update import 2017-07-20 11:03:49 -07:00
Janet Kuo 767082e8e9 Add new API version apps/v1beta2
Add a new API version apps/v1beta2 and enable it by default.
apps/v1beta2 has a copy of apps/v1beta1 types, except for
ControllerRevision.
2017-07-20 10:25:21 -07:00
Lucas Käldström e65d0bd514
kubeadm: Make the hostPath volume mount code more secure 2017-07-20 20:17:28 +03:00
Kubernetes Submit Queue 5529d01a22 Merge pull request #48810 from sttts/sttts-fuzzer-cleanup
Automatic merge from submit-queue (batch tested with PRs 49114, 48810)

Unify fuzzers and roundtrip tests

- reorganize apimachinery/pkg/api/testing package to avoid circular imports
- make fuzzers modular per apigroup
- add roundtrip test for meta types
- add roundtrip test for a couple of staging apigroups

Follow-up:

- split `pkg/api` tests by apigroup
2017-07-20 07:20:40 -07:00
Dr. Stefan Schimanski ecc811d263 Unify fuzzers and roundtrip tests 2017-07-20 12:31:00 +02:00
guangxuli d6e051ec95 Can not set struct pointer directly to interface(kubelet panic)
set default value explicitly

gofmt
2017-07-20 13:52:19 +08:00
Dr. Stefan Schimanski edfbb9aa64 Fixup go2idl references 2017-07-20 07:41:37 +02:00
Dr. Stefan Schimanski 2e6be8583d Move cmd/libs/go2idl/* to staging/src/k8s.io/kube-gen/cmd 2017-07-20 07:41:37 +02:00