1. 21 Jun, 2018 5 commits
    • Kubernetes Submit Queue's avatar
      Merge pull request #57932 from atlassian/cancellable-leader-election · 571b9bea
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 65256, 64236, 64919, 64879, 57932). 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>.
      
      Cancellable leader election
      
      **What this PR does / why we need it**:
      Adds ability to cancel leader election. Useful in integration tests where the whole app is started and stopped in each test.
      
      **Special notes for your reviewer**:
      I used the `context` package - it is impossible/hard to achieve the same behaviour with just channels without spawning additional goroutines but it is trivial with `context`. See `acquire()` and `renew()` methods.
      
      **Release note**:
      
      ```release-note
      NONE
      ```
      /kind enhancement
      /sig api-machinery
      571b9bea
    • Kubernetes Submit Queue's avatar
      Merge pull request #64879 from bertinatto/cinder_block · f9ec17d0
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 65256, 64236, 64919, 64879, 57932). 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 block volume support to Cinder volume plugin
      
      **What this PR does / why we need it**:
      
      This PR adds block volume support to Cinder volume plugin.
      
      **Release note**:
      
      ```release-note
      Added block volume support to Cinder volume plugin.
      ```
      f9ec17d0
    • Kubernetes Submit Queue's avatar
      Merge pull request #64919 from losipiuk/lo/e2e-tests-nap · 03413cc1
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 65256, 64236, 64919, 64879, 57932). 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 cluster autoscaler w/NAP test involving GPUs
      
      This is very trivial e2e tests verifying interoperability of Cluster Autoscaler with Node Auto Provisioning and GPUs.
      More specific tests to come.
      
      ```release-note
      NONE
      ```
      03413cc1
    • Kubernetes Submit Queue's avatar
      Merge pull request #64236 from misterikkit/ecache-move · 14268aef
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 65256, 64236, 64919, 64879, 57932). 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 equivalence cache to its own package
      
      **What this PR does / why we need it**:
      Untangle equivalence class implementation from genericScheduler implementation. This makes it clearer where the two interact, and prevents them from accessing unexported internals.
      
      
      
      **Special notes for your reviewer**:
      Please review https://github.com/kubernetes/kubernetes/pull/63942 first as this is based on it.
      This also needs to rebase on https://github.com/kubernetes/kubernetes/pull/64216 to pass tests.
      **Release note**:
      
      ```release-note
      NONE
      ```
      14268aef
    • Kubernetes Submit Queue's avatar
      Merge pull request #65256 from liggitt/crd-schema-openapi · ed6c8b73
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 65256, 64236, 64919, 64879, 57932). 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 CRD OpenAPI schema
      
      fixes #65243
      depends on https://github.com/kubernetes/kube-openapi/pull/84
      
      without this PR, kubectl complains about creating this CRD with a validation schema (which worked in 1.10):
      ```yaml
      apiVersion: apiextensions.k8s.io/v1beta1
      kind: CustomResourceDefinition
      metadata:
        name: resources.mygroup.example.com
      spec:
        group: mygroup.example.com
        version: v1alpha1
        scope: Namespaced
        names:
          plural: resources
          singular: resource
          kind: Kind
          listKind: KindList
        validation:
          openAPIV3Schema:
            properties:
              spec:
                type: array
                items:
                  type: number
      ```
      
      > error: error validating "/Users/jliggitt/projects/snippets/crd/crd.yaml": error validating data: [ValidationError(CustomResourceDefinition.spec.validation.openAPIV3Schema.properties.spec.items): unknown field "type" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrArray, ValidationError(CustomResourceDefinition.spec.validation.openAPIV3Schema.properties.spec.items): missing required field "Schema" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrArray, ValidationError(CustomResourceDefinition.spec.validation.openAPIV3Schema.properties.spec.items): missing required field "JSONSchemas" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrArray]; if you choose to ignore these errors, turn validation off with --validate=false
      
      that is because the types used to serialize JSONSchema require custom marshaling/unmarshaling, and the OpenAPI generator was not informed of that, so it produced this:
      ```json
      {
          "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrArray": {
          "description": "JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes.",
          "required": [
           "Schema",
           "JSONSchemas"
          ],
          "properties": {
           "JSONSchemas": {
            "type": "array",
            "items": {
             "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps"
            }
           },
           "Schema": {
            "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps"
           }
          }
         }
      }
      ```
      
      OpenAPI isn't able to represent oneOf/anyOf types correctly currently. Until it can, we definitely shouldn't publish a schema containing required fields which aren't even part of the JSON serialization. This PR implements custom openapi type functions, which omit the properties/required/schema attributes for four specific JSONSchema types. This allows kubectl to continue creating these objects without complaining.
      
      /sig api-machinery
      /assign @sttts
      
      ```release-note
      fixed incorrect OpenAPI schema for CustomResourceDefinition objects
      ```
      ed6c8b73
  2. 20 Jun, 2018 35 commits