Commit Graph

5588 Commits (0d77f62c02cbf2e88547cd3d114e948a1fdb3371)

Author SHA1 Message Date
SataQiu e1d5b97f3f fix some typos 2018-10-12 22:29:18 +08:00
Mayank Kumar bc3e3afc46 api changes for psp runasgroup policy 2018-10-09 17:32:09 -07:00
k8s-ci-robot 8fa5d386a1
Merge pull request #66605 from islinwb/default_RevisionHistoryLimit
Default extensions/v1beta1 Deployment's RevisionHistoryLimit to MaxInt32
2018-10-08 10:41:46 -07:00
Haowei Cai 6ef3647836 generated 2018-10-02 17:57:51 -07:00
Antoine Pelisse e1eadc5031 Move `diff` command to root rather than alpha
New command is now `kubectl diff` rather than `kubectl alpha diff` since
it's moving out of alpha soon, and will be using dry-run apply to
produce the diff rather than the custom merge logic.
2018-09-27 13:11:43 -07:00
k8s-ci-robot dbba1a5384
Merge pull request #68864 from roycaihw/fix-rollback-doc
Fix openapi spec and api reference: posting a rollback returns a metav1.Status
2018-09-26 19:22:53 -07:00
k8s-ci-robot 170dcc2ea0
Merge pull request #68754 from bradhoekstra/optional-service-env-variables
kubelet: Make service environment variables optional
2018-09-24 10:59:32 -07:00
Haowei Cai 9f78c45c01 generated 2018-09-19 17:35:42 -07:00
Lubomir I. Ivanov 48d52a3075 kubeadm: include the 'certs renew' sub-command in the CLI
The command seems to be missing in the CLI.
Add it as sub-command under 'kubeadm alpha phase certs'.
2018-09-19 05:09:00 +03:00
Brad Hoekstra ac8799a80d kubelet: Make service environment variables optional 2018-09-17 16:27:36 -04:00
Xing Yang 897e3c8d11 Add generated files 2018-09-12 17:34:51 -07:00
k8s-ci-robot 99f319567a
Merge pull request #68015 from damemi/hpa-metrics-specificity
Support backwards compatibility for v1beta1 custom metrics client
2018-09-10 16:12:23 -07:00
fabriziopandini 44e49f00bc kubeadm-annotate-cri 2018-09-10 10:23:46 +02:00
Solly Ross 76bd48b140 Fix up potentially empty fields in HPA v2beta2
There were a few cases where fields that should have been marked optional
were not.  This was causing weird validation issues, but is now fixed.
2018-09-06 15:20:09 -04:00
Janet Kuo 1d6dd86407 Autogen API docs 2018-09-04 11:35:30 -07:00
NickrenREN 159a4358e8 auto generated files 2018-09-03 13:34:26 +08:00
Chao Xu 5273182321 generated 2018-08-31 17:56:12 -07:00
Jess Frazelle 1a4cf7a36e
make update
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2018-08-30 18:24:23 -04:00
Kubernetes Submit Queue 37b29297aa
Merge pull request #67432 from lichuqiang/topo_provision_beta
Automatic merge from submit-queue (batch tested with PRs 67745, 67432, 67569, 67825, 67943). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Move volume dynamic provisioning scheduling to beta

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

*  Combine feature gate VolumeScheduling and DynamicProvisioningScheduling into one
* Add allowedTopologies description in kubectl

**Special notes for your reviewer**:
Wait until related e2e and downside plugins are ready.

/hold

**Release note**:

```release-note
Move volume dynamic provisioning scheduling to beta (ACTION REQUIRED: The DynamicProvisioningScheduling alpha feature gate has been removed. The VolumeScheduling beta feature gate is still required for this feature)
```
2018-08-29 15:19:34 -07:00
lichuqiang 795b213455 generated files 2018-08-29 10:30:16 +08:00
Xing Yang 88d3d964e2 Re-generate files 2018-08-28 13:56:03 -07:00
Xing Yang 5a6c5b07a2 Address Tim's comments 2018-08-28 13:26:51 -07:00
Xing Yang 2a9cff2b03 Add generated files 2018-08-28 13:26:51 -07:00
Kubernetes Submit Queue 2eb14e3007
Merge pull request #64973 from nokia/k8s-sctp
Automatic merge from submit-queue (batch tested with PRs 67694, 64973, 67902). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

SCTP support implementation for Kubernetes

**What this PR does / why we need it**: This PR adds SCTP support to Kubernetes, including Service, Endpoint, and NetworkPolicy.

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

**Special notes for your reviewer**:

**Release note**:

```release-note

SCTP is now supported as additional protocol (alpha) alongside TCP and UDP in Pod, Service, Endpoint, and NetworkPolicy.  

```
2018-08-28 07:21:18 -07:00
Mike Dame 77d7f9cfa2 Generate files and modifications for autoscaling/v2beta2 and custom_metrics/v1beta2 2018-08-27 11:07:53 -04:00
Laszlo Janosi a6da2b1472 K8s SCTP support implementation for the first pull request
The requested Service Protocol is checked against the supported protocols of GCE Internal LB. The supported protocols are TCP and UDP.

SCTP is not supported by OpenStack LBaaS. If SCTP is requested in a Service with type=LoadBalancer, the request is rejected. Comment style is also corrected.

SCTP is not allowed for LoadBalancer Service and for HostPort. Kube-proxy can be configured not to start listening on the host port for SCTP: see the new SCTPUserSpaceNode parameter

changed the vendor github.com/nokia/sctp to github.com/ishidawataru/sctp. I.e. from now on we use the upstream version.

netexec.go compilation fixed. Various test cases fixed

SCTP related conformance tests removed. Netexec's pod definition and Dockerfile are updated to expose the new SCTP port(8082)

SCTP related e2e test cases are removed as the e2e test systems do not support SCTP

sctp related firewall config is removed from cluster/gce/util.sh. Variable name sctp_addr is corrected to sctpAddr in pkg/proxy/ipvs/proxier.go

cluster/gce/util.sh is copied from master
2018-08-27 05:56:27 +00:00
Kubernetes Submit Queue 40063e8810
Merge pull request #67737 from tallclair/runtimeclass-podapi
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Runtimeclass podapi

Adds (but doesn't implement) the RuntimeClass Pod API proposed in https://github.com/kubernetes/community/blob/master/keps/sig-node/0014-runtime-class.md

Based on the result (lazy consensus) of the alpha fields discussion on sig-architecture: https://groups.google.com/forum/#!topic/kubernetes-sig-architecture/y9FulL9Uq6A

For https://github.com/kubernetes/features/issues/585

**Special notes for your reviewer**:

**Release note**:
```release-note
RuntimeClass is a new API resource for defining different classes of runtimes that may be used to run containers in the cluster. Pods can select a RunitmeClass to use via the RuntimeClassName field. This feature is in alpha, and the RuntimeClass feature gate must be enabled in order to use it.
```

/sig node
/kind api-change
/priority important-soon
/milestone v1.12
2018-08-23 16:53:29 -07:00
Tim Allclair f5cc053901 regenerate files 2018-08-23 13:32:10 -07:00
Kubernetes Submit Queue 5a16163c87
Merge pull request #66936 from jennybuckley/dry-run-webhooks
Automatic merge from submit-queue (batch tested with PRs 67576, 66936). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Support dry run in admission webhooks

**What this PR does / why we need it**:
Follow up to https://github.com/kubernetes/kubernetes/pull/66391
- [x] add DryRun to ```admission.k8s.io/v1beta1.AdmissionReview```
- [x] add DryRunnable to ```admissionregistration.k8s.io/v1beta1.(Valid|Mut)atingWebhookConfiguration```
- [x] add dry run support to (Valid|Mut)atingAdmissionWebhook

Includes all the api-changes outlined by https://github.com/kubernetes/community/pull/2387

/sig api-machinery

**Release note**:
```release-note
To address the possibility dry-run requests overwhelming admission webhooks that rely on side effects and a reconciliation mechanism, a new field is being added to admissionregistration.k8s.io/v1beta1.ValidatingWebhookConfiguration and admissionregistration.k8s.io/v1beta1.MutatingWebhookConfiguration so that webhooks can explicitly register as having dry-run support. If a dry-run request is made on a resource that triggers a non dry-run supporting webhook, the request will be completely rejected, with "400: Bad Request". Additionally, a new field is being added to the admission.k8s.io/v1beta1.AdmissionReview API object, exposing to webhooks whether or not the request being reviewed is a dry-run.
```
2018-08-22 19:41:58 -07:00
Kubernetes Submit Queue 74f44482ec
Merge pull request #66973 from fabriziopandini/kubeadm-ha-upgrade
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Kubeadm ha upgrade

**What this PR does / why we need it**:
This PR implements one of the actions defined by https://github.com/kubernetes/kubeadm/issues/751 (checklist form implementing HA in kubeadm). see [KEP 0015](https://github.com/kubernetes/community/blob/master/keps/sig-cluster-lifecycle/0015-kubeadm-join-master.md) for more context

With this PR, kubeadm implements a new command `kubeadm upgrade node experimental-control-plane` that managed upgrade of control plane components on a secondary control plane instance. 

The entire workflow in case of HA clusters will be:

- Upgrade the control plane
   - run `kubeadm upgrade apply` on a first control plane instance
   - run `kubeadm upgrade node experimental-control-plane` on secondary control plane instances
- Upgrade nodes

**Special notes for your reviewer**:
/CC @timothysc @luxas @chuckha  @kubernetes/sig-cluster-lifecycle-pr-reviews 

**Release note**:
```
kubeadm now has the `kubeadm upgrade node experimental-control-plane` command for upgrading secondary control plane instances created with `kubeadm join --experimental-control-plane`. 
```
2018-08-22 18:02:49 -07:00
Tim Allclair 87164e0b32 Generated code 2018-08-22 17:00:53 -07:00
jennybuckley c61eac7daa Update generated 2018-08-22 16:54:41 -07:00
fabriziopandini aa641ad5e3 autogenerated 2018-08-22 23:09:28 +02:00
Kenjiro Nakayama 811bdbdcbb auto generated code 2018-08-22 21:59:44 +09:00
Kubernetes Submit Queue 1737a43324
Merge pull request #66876 from juanvallejo/jvallejo/prototype-plugins
Automatic merge from submit-queue (batch tested with PRs 67062, 67169, 67539, 67504, 66876). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update the kubectl plugin mechanism

**Release note**:
```release-note
The plugin mechanism functionality to closely follow the git plugin design
```

Replace the existing plugin mechanism with the design proposed in https://github.com/kubernetes/community/pull/2437.

~~_The full implementation of the plugin mechanism itself is entirely contained within the first commit._~~

## Walkthrough

Under the new design, there is no plugin installation or loading required to use plugins.
A plugin is simply any executable file on a user's PATH whose name begins with `kubectl-`.
- Plugins receive the inherited environment from the `kubectl` binary. All environment variables
accessible by `kubectl` become accessible by the plugin.
- Plugins decide which command path they wish to implement based on their name. For example, a plugin wanting to provide a new command `foo`, would simply be named `kubectl-foo`.

### Creating a plugin

Below is an example plugin, that we will use for this walkthrough. Plugins may be written in any language, and handle arguments and flags in any way, optionally (as a convention) providing a way to retrieve their version via a `version` subcommand.

```bash
#!/bin/bash

# optional argument handling
if [[ "$1" == "version" ]]
then
    echo "1.0.0"
    exit 0
fi

# optional argument handling
if [[ "$1" == "config" ]]
then
    echo $KUBECONFIG
    exit 0
fi

echo "I am a plugin named kubectl-foo"
```

### Using a plugin

To use a plugin, simply make it executable:

```bash
sudo chmod +x ./kubectl-foo
```

and place it anywhere in your PATH:

```bash
sudo mv ./kubectl-foo /usr/local/bin
```

You may now invoke your plugin as a `kubectl` command:

```bash
$ kubectl foo
I am a plugin named kubectl-foo
```

All args and flags are passed as-is to the executable:

```bash
$ kubectl foo version
1.0.0
```

All environment variables are also passed as-is to the executable:

```bash
$ export KUBECONFIG=~/.kube/config
$ kubectl foo config
/home/<user>/.kube/config

$ KUBECONFIG=/etc/kube/config kubectl foo config
/etc/kube/config
```

Additionally, the first argument that is passed to a plugin will always be the full path to the location where it was invoked (`$0` would equal `/usr/local/bin/kubectl-foo` in our example above).

### Plugin discoverability

Seeing as how the `kubectl plugin` command is left as a no-op with this PR (perhaps it could serve as an entrypoint towards additional plugin functionality in the future), a small subcommand has been included that _lists all available plugin executables on a user's PATH_, along with any warnings it finds.

Example usage of this new subcommand is included below:

```bash
$ kubectl plugin list
The following kubectl-compatible plugins are available:

test/fixtures/pkg/kubectl/plugins/kubectl-foo
plugins/kubectl-foo
  - warning: plugins/kubectl-foo is overshadowed by a similarly named plugin: test/fixtures/pkg/kubectl/plugins/kubectl-foo
plugins/kubectl-invalid
  - warning: plugins/kubectl-invalid identified as a kubectl plugin, but it is not executable
plugins/kubectl-bar

error: 2 plugin warnings were found
```

cc @kubernetes/kubectl-maintainers @kubernetes/sig-cli-pr-reviews @soltysh @seans3 @mengqiy
2018-08-17 11:58:22 -07:00
juanvallejo 4bdc636380
add updated plugin mechanism 2018-08-15 15:06:29 -04:00
Weibin Lin 84ff6c36b0 Autogen 2018-08-14 09:20:45 +08:00
Jacob LeGrone 2b3621a447
Autogen
1. hack/update-generated-protobuf.sh
2. hack/update-generated-swagger-docs.sh
3. hack/update-swagger-spec.sh
4. hack/update-openapi-spec.sh
5. hack/update-api-reference-docs.sh
2018-08-13 14:57:02 -04:00
Kubernetes Submit Queue 8ebc84e71d
Merge pull request #66507 from verb/pid-beta
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Promote ShareProcessNamespace to beta

**What this PR does / why we need it**: The ability to configure PID namespace sharing per-pod was added as an alpha feature in 1.10. This promotes the feature to beta and makes the feature available by default.

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

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

**Release note**:

```release-note
The PodShareProcessNamespace feature to configure PID namespace sharing within a pod has been promoted to beta.
```
2018-08-09 05:01:01 -07:00
Kubernetes Submit Queue d1636b8019
Merge pull request #66807 from caesarxuchao/remove-connectrequest
Automatic merge from submit-queue (batch tested with PRs 66196, 67016, 66807, 67023). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make admission webhooks conversion convert CONNECT body correctly

Fix #59759.

1. Make apiserver pass connectRequest.Options directly to the admission layer. All other information in rest.ConnectRequest is present in admission attributes.
2. Make the scope.Kind of pod/attach, pod/exec, pod/portforward, node/proxy, service/proxy to their respective options Kind, instead of the parent Kind.

I've tested it locally, the conversion is working correctly for "kubectl attach". I'll add e2e tests.

I'll keep this to myself until I add the tests, but cc @mikedanese @liggitt RE. https://github.com/kubernetes/kubernetes/pull/66633.
2018-08-07 11:44:10 -07:00
Jordan Liggitt c31faf2509
document /watch prefix deprecation 2018-08-07 08:20:53 -04:00
Chao Xu d89c8dd8c0 generated 2018-08-06 18:59:53 -07:00
Janet Kuo 4dadbb531a Autogen
1. hack/update-generated-protobuf.sh
2. hack/update-generated-swagger-docs.sh
3. hack/update-swagger-spec.sh
4. hack/update-openapi-spec.sh
5. hack/update-api-reference-docs.sh
2018-07-27 10:10:30 -07:00
Antoine Pelisse 623370f603 dry-run: Run generated commands 2018-07-23 14:07:19 -07:00
Lee Verberne 3acade424f Generated code for ShareProcessNamespace beta 2018-07-23 17:13:59 +02:00
Kubernetes Submit Queue a74df596ab
Merge pull request #63418 from roycaihw/openapi-delete-path
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update openapi and doc to reflect 202 path in API server delete handler

**What this PR does / why we need it**:
Our API server returns 202 Accepted if a delete operation is asynchronous, but it is not reflected in our openapi spec and documentation. This PR adds 202 path in endpoint installer and updates our openapi spec and docs. The change in openapi spec may affect some clients that depend on the error paths. [Python client](e057f27306/kubernetes/client/api_client.py (L97-L102)) only depends on response type, which is not changed in this PR. Sending this PR to see if it breaks client-go. 

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

**Special notes for your reviewer**:

**Release note**:

```release-note
OpenAPI spec and documentation reflect 202 Accepted response path for delete request
```
2018-07-17 07:44:44 -07:00
Antoine Pelisse 4bfd5ec41f dry-run: Run generate commands for new Options types 2018-07-12 07:31:45 -07:00
Haowei Cai 9ad6d72221 generated 2018-07-11 15:07:39 -07:00
Kubernetes Submit Queue 3a3d6564b6
Merge pull request #66047 from krunaljain/bugfix/csi_default_fs_type
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fixing comments in types.go to describe the changes for CSI driver default FS type override fix

This PR fixes the comment in types.go which was made in the commit 5dfe7b5758 
In the above commit,  the change that fixed the override of default FSType for CSI driver was made. However the comments in types.go were made for   GCEPersistentDiskVolumeSource and RBDVolumeSource respectively. This commit fixes that comment to reflect the changes for CSI driver

```release-note
none
```
2018-07-10 18:45:32 -07:00
Krunal Jain bab7781a71 Adding generated files 2018-07-10 15:52:23 -07:00
Kubernetes Submit Queue 3b269e182d
Merge pull request #65499 from krunaljain/bugfix/csi_default_fs_type
Automatic merge from submit-queue (batch tested with PRs 55023, 65499). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Bugfix/csi default fs type

This PR address the issue mentioned in the following ticket https://github.com/kubernetes/kubernetes/issues/65122 
The FSType string will now not be defaulted to ext4. Removes defaulting of CSI file system type to ext4. CSI plugins that depended on this default need to be updated as the fsType would remain an empty string if not provided and would not default to ext4. CSI spec allows for an empty fstype string. This is intended for non-block plugins like nfs and gluster where filesystems are not separately created on the volume. But currently the default file system is overridden to ext4  which makes the above case redundant. This commit prevents such an overridding. 


```release-note  
ACTION REQUIRED: Removes defaulting of CSI file system type to ext4. All the production drivers listed under https://kubernetes-csi.github.io/docs/Drivers.html were tested and work as expected after this change. If you are using a driver not in that list, please test the drivers on an updated test cluster first. ```
2018-07-10 10:18:08 -07:00
Krunal Jain fb28a1dd28 Adding generated files 2018-06-28 16:48:53 -07:00
Hemant Kumar 063eee7a39 Fix comments about default mount propagation
Fix generated docs as well
2018-06-28 17:04:41 -04:00
wojtekt 0950084137 Autogenerated stuff 2018-06-27 13:31:10 +02:00
Kubernetes Submit Queue 32c3ffa19e
Merge pull request #63837 from roycaihw/fix-rollback-return-object
Automatic merge from submit-queue (batch tested with PRs 65377, 63837, 65370, 65294, 65376). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix openapi spec: posting a rollback returns a deploymentstatus

**What this PR does / why we need it**:
Fix openapi spec and documentation. Posting a rollback doesnt return a rollback object, it instead returns a deployment status.

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

**Release note**:

```release-note
NONE
```

/sig api-machinery
/sig apps
2018-06-22 16:16:08 -07:00
Di Xu 871673f51b auto-generated files 2018-06-20 13:34:50 +08:00
Lucas Käldström 7a87cf1c28
autogenerated 2018-06-06 23:41:10 +03:00
Jan Chaloupka 3cc15363bc Run make update 2018-06-06 00:12:40 +02:00
Kubernetes Submit Queue f73101066a
Merge pull request #58647 from oracle/for/upstream/master/hostpath-psp-readonly
Automatic merge from submit-queue (batch tested with PRs 64344, 64709, 64717, 63631, 58647). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add support for enforcing read only host paths in PSPs. 

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

This PR adds support for the PSP to enforce that host paths are readonly. 

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #57371
xref https://github.com/kubernetes/features/issues/5

**Special notes for your reviewer**:

**Release note**:

```release-note
PodSecurityPolicy now supports restricting hostPath volume mounts to be readOnly and under specific path prefixes
```

/cc @ericchiang @liggitt
2018-06-05 02:16:21 -07:00
lichuqiang 20654393ee generated files 2018-06-05 09:44:10 +08:00
Josh Horwitz c7fbcf35da Add support for enforcing read only host paths in PSPs. 2018-06-04 19:10:37 -04:00
vikaschoudhary16 3cfe6412c7 Introduce priority class in the resource quota 2018-06-04 16:14:54 -04:00
Davanum Srinivas 877b801531 Updated generated files 2018-06-02 22:20:39 -04:00
Minhan Xia bfa9c1091e make update 2018-06-01 16:19:15 -07:00
Clayton Coleman dcabc3026d
Update pod phase documentation 2018-06-01 00:34:52 -04:00
Kubernetes Submit Queue 26caa84d09
Merge pull request #63445 from ericchiang/deprecate-git-repo-volume
Automatic merge from submit-queue (batch tested with PRs 63445, 63820). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

core v1: deprecate the gitRepo volume type

gitRepo stopped accepting new features nearly 2 years ago https://github.com/kubernetes/kubernetes/issues/17676#issuecomment-228650586 and today this behavior can easily be achieved through an init container. The kubelet shelling out to git in the host namespace can also be a security issue on un-trusted repos, as was demonstrated by [CVE-2017-1000117](https://groups.google.com/forum/#!topic/kubernetes-announce/CTLXJ74cu8M). Our own documentation even alludes to this volume type being removed in the future:

> In the future, such volumes may be moved to an even more decoupled model, rather than extending the Kubernetes API for every such use case.

https://kubernetes.io/docs/concepts/storage/volumes/#gitrepo

Closes https://github.com/kubernetes/kubernetes/issues/60999

```release-note-action-required
The GitRepo volume type is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.
```

/release-note-action-required

Instead of this:

```yaml
apiVersion: v1
kind: Pod
metadata:
  name: server
spec:
  containers:
  - image: nginx
    name: nginx
    volumeMounts:
    - mountPath: /mypath
      name: git-volume
  volumes:
  - name: git-volume
    gitRepo:
      repository: "git@somewhere:me/my-git-repository.git"
      revision: "22f1d8406d464b0c0874075539c1f2e96c253775"
```

Do this:

```yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: git-clone
data:
  git-clone.sh: |
    #!/bin/sh -e
    git clone $1 $3
    cd $3
    git reset --hard $2
---
apiVersion: v1
kind: Pod
metadata:
  name: server
spec:
  initContainers:
  - name: git-clone
    image: alpine/git # Any image with git will do
    command:
    - /usr/local/git/git-clone.sh
    args:
    - "https://somewhere/me/my-git-repository.git"
    - "22f1d8406d464b0c0874075539c1f2e96c253775"
    - "/mypath"
    volumeMounts:
    - name: git-clone
      mountPath: /usr/local/git
    - name: git-repo
      mountPath: /mypath
  containers:
  - image: nginx
    name: nginx
    volumeMounts:
    - mountPath: /mypath
      name: git-volume
  volumes:
  - name: git-volume
    emptyDir: {}
  - name: git-clone
    configMap:
      name: git-clone
      defaultMode: 0755
```
2018-05-31 16:20:07 -07:00
Kubernetes Submit Queue 374992a6fb
Merge pull request #63819 from mikedanese/svacctproj-api
Automatic merge from submit-queue (batch tested with PRs 64364, 64369, 63819, 64528). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add APIs for service account volume projection

ref https://github.com/kubernetes/kubernetes/issues/58790

designed in https://github.com/kubernetes/community/pull/1973

Release note will be included in the implementation.
```release-note
NONE
```
2018-05-30 22:54:11 -07:00
Eric Chiang f8f5f045a7
generated: update generated API files
Commands run:

	./hack/update-api-reference-docs.sh
	./hack/update-generated-protobuf.sh
	./hack/update-generated-swagger-docs.sh
	./hack/update-openapi-spec.sh
	./hack/update-swagger-spec.sh
2018-05-30 16:52:42 -07:00
Mike Danese 514d280e2f autogenerated 2018-05-30 11:06:58 -07:00
Lucas Käldström 7914dce526
autogenerated 2018-05-30 09:29:03 +03:00
Haowei Cai 5ebcdb33ff generated 2018-05-25 17:13:44 -07:00
Lubomir I. Ivanov ebc254c40f kubeadm: rename the `kube-dns` phases addon
The command `kubeadm alpha phases addon` has a property
called `kube-dns` which would install kube-dns, pre 1.11.

In the case of 1.11 this property will install CoreDNS,
because the property is also bound to the `CoreDNS` feature gate,
which is now `true` by default.

Fix that by renaming the property to `coredns`, updating the Cobra
info and also updating the unit tests.
2018-05-24 22:08:31 +03:00
Kubernetes Submit Queue 74bcefc8b2
Merge pull request #64063 from roycaihw/support-get-status
Automatic merge from submit-queue (batch tested with PRs 62756, 63862, 61419, 64015, 64063). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

apiservices/status and certificatesigningrequests/status support get+update+patch

**What this PR does / why we need it**:
Fix the remaining `/status` subresources that return 405 on GET and PATCH

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
ref https://github.com/kubernetes/kubernetes/pull/63619

**Release note**:

```release-note
apiservices/status and certificatesigningrequests/status now support GET and PATCH
```
2018-05-23 18:14:20 -07:00
Kubernetes Submit Queue c4d7987a62
Merge pull request #64126 from mtaufen/remove-old-todos
Automatic merge from submit-queue (batch tested with PRs 63283, 64032, 64159, 64126, 64098). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove some completed TODOs

This PR removes some old TODOs that were recently completed.
```release-note
NONE
```
2018-05-22 22:14:13 -07:00
Kubernetes Submit Queue f9c8898116
Merge pull request #64034 from deads2k/cli-62-wait
Automatic merge from submit-queue (batch tested with PRs 64034, 64072, 64146, 64059, 64161). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add kubectl wait

Adds a `kubectl wait --for=[delete|condition=condition-name] resource/string` command.  This allows generic waiting on well behaved conditions and for a resource or set of resources to be deleted.

This was requested for delete to do foreground deletion

WIP because I need to add test cases.


@kubernetes/sig-cli-maintainers this is using a separation of concerns made possible by the genericclioptions to make an easily unit testable command.
@smarterclayton 

```release-note
adds a kubectl wait command
```
2018-05-22 19:20:12 -07:00
Michael Taufen 62a1532d51 Remove some completed TODOs 2018-05-22 11:02:57 -07:00
David Eads 0d0863ea10 generated 2018-05-22 08:47:42 -04:00
Lucas Käldström 60b0eeb2a4
autogenerated 2018-05-22 09:31:28 +03:00
Haowei Cai 4e114fd65b generated 2018-05-18 18:42:39 -07:00
Lucas Käldström 00390b6ec5
autogenerated 2018-05-18 00:55:01 +01:00
Kubernetes Submit Queue 2fda6e5e7a
Merge pull request #63930 from liztio/kubeadm-init-diff
Automatic merge from submit-queue (batch tested with PRs 63865, 57849, 63932, 63930, 63936). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Implement `kubeadm init diff`

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

Some users want to see the changes `kubeadm` woulda apply before actually running `kubeadm upgrade apply`. This shows the changes that will be made to the static pod manifests before applying them. This is a narrower case than `kubeadm upgrade apply --dry-run`, which specifically focuses on the static pod manifests.

**Which issue(s) this PR fixes**:
Part of [kubeadm/489](https://github.com/kubernetes/kubeadm/issues/489#issuecomment-388974795)

**Special notes for your reviewer**:

**Release note**:

```release-note
adds the `kubeadm upgrade diff` command to show how static pod manifests will be changed by an upgrade.
```
2018-05-17 00:28:26 -07:00
liz 618a110cd1
Generated docs 2018-05-16 15:23:40 -04:00
Chuck Ha 7ecab96dcd
Adds a kubeadm config images pull command
This command will use crictl or docker to pull images locally.

The dockerfall back is needed because in some cases the kubelet is not
yet running so there is no CRI dockershim socket available.

Fixes kubernetes/kubeadm#812

Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
2018-05-16 11:36:11 -04:00
Kubernetes Submit Queue 2fcac6abf2
Merge pull request #63314 from mtaufen/dkcfg-structured-status
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Move to a structured status for dynamic kubelet config

This PR updates dynamic Kubelet config to use a structured status, rather than a node condition. This makes the status machine-readable, and thus more useful for config orchestration. 

Fixes: #56896

```release-note
The status of dynamic Kubelet config is now reported via Node.Status.Config, rather than the KubeletConfigOk node condition.
```
2018-05-15 19:41:36 -07:00
Michael Taufen fcc1f8e7b6 Move to a structured status for dynamic Kubelet config
Updates dynamic Kubelet config to use a structured status, rather than a
node condition. This makes the status machine-readable, and thus more
useful for config orchestration.

Fixes: #56896
2018-05-15 11:25:12 -07:00
Kubernetes Submit Queue 944e07480f
Merge pull request #63742 from thockin/kill-tolerate-unready-annotation
Automatic merge from submit-queue (batch tested with PRs 63792, 63495, 63742, 63332, 63779). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Actually support service `publishNotReadyAddresses`

This was added and the annotation was deprecated, but it was never
implemented.

xref #63741

**Release note**:

```release-note
The annotation `service.alpha.kubernetes.io/tolerate-unready-endpoints` is deprecated.  Users should use Service.spec.publishNotReadyAddresses instead.
```
2018-05-15 09:04:24 -07:00
Kubernetes Submit Queue 8673c64d09
Merge pull request #63811 from chuckha/list-images
Automatic merge from submit-queue (batch tested with PRs 63272, 63782, 63715, 63811, 63803). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Refactor kubeadm config list-images

In preparation for creating a `kubeadm config images pull`
this commit refactors `kubeadm config list-images` into
`kubeadm config images list`.

Signed-off-by: Chuck Ha <ha.chuck@gmail.com>

**What this PR does / why we need it**:
Prepares the `kubeadm config images` subcommand so we can add more functionality to it.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-15 05:08:17 -07:00
Kubernetes Submit Queue a1b54f3c99
Merge pull request #63100 from ravisantoshgudimetla/priority-beta-api
Automatic merge from submit-queue (batch tested with PRs 55511, 63372, 63400, 63100, 63769). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Create pkg/scheduling/apis/v1beta1 and move priorityClass to beta 

**What this PR does / why we need it**:
This is for creating pkg/apis/scheduling/v1beta1 so that priorityClasses could be moved to beta.

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

**Special notes for your reviewer**:
/cc @bsalamat @aveshagarwal 

**Release note**:

```release-note
The `PriorityClass` API is promoted to `scheduling.k8s.io/v1beta1`
```
2018-05-14 14:35:21 -07:00
Tim Hockin c038f60d04 Actually support service `publishNotReadyAddresses`
This was added and the annotation was deprecated, but it was never
implemented.
2018-05-14 14:19:54 -07:00
Chuck Ha 63747e5c75
Refactor kubeadm config list-images
In preparation for creating a `kubeadm config images pull`
this commit refactors `kubeadm config list-images` into
`kubeadm config images list`.

Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
2018-05-14 16:51:04 -04:00
ravisantoshgudimetla f20bd00ab2 Generated 2018-05-12 02:01:09 -04:00
Kubernetes Submit Queue 828ffd5a4e
Merge pull request #63450 from chuckha/images
Automatic merge from submit-queue (batch tested with PRs 62665, 62194, 63616, 63672, 63450). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adds kubeadm images command

Closes kubernetes/kubeadm#388

Signed-off-by: Chuck Ha <ha.chuck@gmail.com>

**What this PR does / why we need it**:
This PR adds a `list-images` subcommand to `kubeadm config`. We need this to make installing kubernetes on air-gapped environments a little easier. This command will print out a list of images it expects to use for the master node.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
Adds a list-images subcommand to kubeadm that lists required images for a kubeadm install.
```
2018-05-10 12:56:26 -07:00
Chuck Ha f5e68814bf
Adds kubeadm images command
Closes kubernetes/kubeadm#388

Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
2018-05-10 12:15:55 -04:00
Michael Taufen c41cf55a2c explicit kubelet config key in Node.Spec.ConfigSource.ConfigMap
This makes the Kubelet config key in the ConfigMap an explicit part of
the API, so we can stop using magic key names.

As part of this change, we are retiring ConfigMapRef for ConfigMap.
2018-05-08 15:37:26 -07:00
Kubernetes Submit Queue 55f17933f5
Merge pull request #60741 from zlabjp/optional-subjects
Automatic merge from submit-queue (batch tested with PRs 60890, 63244, 60741, 63254). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Indicate clusterrolebinding, rolebinding subjects are optional fields

**What this PR does / why we need it**: With this PR, clusterrolebinding and rolebinding subjects are marked optional instead of required. Currently we cannot create clusterrolebinding and rolebinding with subjects are empty using `kubectl create/apply/replace -f`.

```
$ kubectl create rolebinding test --clusterrole view
rolebinding "test" created
$ kubectl get rolebinding test -o yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  creationTimestamp: 2018-03-02T06:58:16Z
  name: test
  namespace: default
  resourceVersion: "5606612"
  selfLink: /apis/rbac.authorization.k8s.io/v1/namespaces/default/rolebindings/test
  uid: 155c5c29-1de7-11e8-9f6f-fa163ec89f2a
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: view
subjects: null
$ kubectl get rolebinding test -o yaml | kubectl replace -f -
error: error validating "STDIN": error validating data: ValidationError(RoleBinding): missing required field "subjects" in io.k8s.api.rbac.v1.RoleBinding; if you choose to ignore these errors, turn validation off with --validate=false
```

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

**Special notes for your reviewer**: This is a same issue with https://github.com/kubernetes/kubernetes/issues/59403. /cc @liggitt 

**Release note**:

```release-note
NONE
```
2018-04-27 17:43:11 -07:00
Kubernetes Submit Queue 5e08ae0bf2
Merge pull request #61285 from soltysh/issue23276
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Deprecate kubectl rolling-update

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

/assign @juanvallejo @tnozicka 

**Release note**:
```release-note
Deprecate kubectl rolling-update 
```
2018-04-25 09:47:27 -07:00
Maciej Szulik 8237e1a034
Generated changes 2018-04-25 13:09:12 +02:00
Kubernetes Submit Queue 8f20a815e5
Merge pull request #62002 from k82cn/k8s_61410_1
Automatic merge from submit-queue (batch tested with PRs 62495, 63003, 62829, 62151, 62002). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Added MatchFields to NodeSelectorTerm

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

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

**Special notes for your reviewer**:
According to the discussion at #61410 , we'd like to introduce a new selector term for node's field.

**Release note**:

```release-note
Added `MatchFields` to `NodeSelectorTerm`; in 1.11, it only support `metadata.name`.
```
2018-04-23 22:45:28 -07:00
Da K. Ma b80a01b210 generated codes.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
2018-04-24 08:55:04 +08:00
Kubernetes Submit Queue a95d9f0e65
Merge pull request #62523 from wackxu/ldoc
Automatic merge from submit-queue (batch tested with PRs 59592, 62308, 62523, 62635, 62243). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 update comments for local volume

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

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

**Special notes for your reviewer**:
/assign @jsafrane @msau42 

**Release note**:

```release-note
NONE
```
2018-04-19 14:50:21 -07:00