Skip to content

Commit

Permalink
Merge upstream tag v0.1.29
Browse files Browse the repository at this point in the history
Merge executed via ./UPSTREAM-MERGE.sh v0.1.29 upstream master

Overwritten conflicts:
<NONE>
  • Loading branch information
Jay Boyd committed Aug 15, 2018
2 parents 6f01810 + 44182ac commit 3a54e60
Show file tree
Hide file tree
Showing 66 changed files with 2,182 additions and 650 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ jobs:
make verify-docs
else
echo "Running full build"
make verify build svcat build-integration build-e2e test-integration
# make sure code quality is good and proper
# generate the output binaries for server and client
# ensure the tests build
make verify build svcat build-integration build-e2e
fi
env: GO_VERSION=1.10
# Doc Site svc-cat.io
Expand Down
43 changes: 13 additions & 30 deletions Makefile.sc
Original file line number Diff line number Diff line change
Expand Up @@ -146,42 +146,26 @@ $(BINDIR)/service-catalog: .init .generate_files cmd/service-catalog

# This section contains the code generation stuff
#################################################
.generate_exes: $(BINDIR)/defaulter-gen \
$(BINDIR)/deepcopy-gen \
$(BINDIR)/conversion-gen \
$(BINDIR)/client-gen \
$(BINDIR)/lister-gen \
$(BINDIR)/informer-gen \
$(BINDIR)/openapi-gen
touch $@

$(BINDIR)/defaulter-gen: .init
$(DOCKER_CMD) go build -o $@ $(SC_PKG)/vendor/k8s.io/code-generator/cmd/defaulter-gen

$(BINDIR)/deepcopy-gen: .init
$(DOCKER_CMD) go build -o $@ $(SC_PKG)/vendor/k8s.io/code-generator/cmd/deepcopy-gen

$(BINDIR)/conversion-gen: .init
$(DOCKER_CMD) go build -o $@ $(SC_PKG)/vendor/k8s.io/code-generator/cmd/conversion-gen

$(BINDIR)/client-gen: .init
$(DOCKER_CMD) go build -o $@ $(SC_PKG)/vendor/k8s.io/code-generator/cmd/client-gen
GENERATORS = $(addprefix $(BINDIR)/, defaulter-gen deepcopy-gen conversion-gen \
client-gen lister-gen informer-gen openapi-gen)

$(BINDIR)/lister-gen: .init
$(DOCKER_CMD) go build -o $@ $(SC_PKG)/vendor/k8s.io/code-generator/cmd/lister-gen
.PHONY: generators
generators: $(GENERATORS)

$(BINDIR)/informer-gen: .init
$(DOCKER_CMD) go build -o $@ $(SC_PKG)/vendor/k8s.io/code-generator/cmd/informer-gen
.SECONDEXPANSION:

$(BINDIR)/openapi-gen: vendor/k8s.io/code-generator/cmd/openapi-gen
$(DOCKER_CMD) go build -o $@ $(SC_PKG)/$^
# We specify broad dependencies for these generator binaries: each one depends
# on everything under its source tree as well as gengo's. This uses GNU Make's
# secondary expansion feature to pass $* to `find`.
$(BINDIR)/%-gen: $$(shell find vendor/k8s.io/code-generator/cmd/$$*-gen vendor/k8s.io/gengo) .init
$(DOCKER_CMD) go build -o $@ $(SC_PKG)/vendor/k8s.io/code-generator/cmd/$*-gen

.PHONY: $(BINDIR)/e2e.test
$(BINDIR)/e2e.test: .init
$(DOCKER_CMD) go test -c -o $@ $(SC_PKG)/test/e2e

# Regenerate all files if the gen exes changed or any "types.go" files changed
.generate_files: .init .generate_exes $(TYPES_FILES)
.generate_files: .init generators $(TYPES_FILES)
# generate apiserver deps
$(DOCKER_CMD) $(BUILD_DIR)/update-apiserver-gen.sh
# generate all pkg/client contents
Expand Down Expand Up @@ -242,10 +226,10 @@ verify-docs: .init
@echo Running href checker$(SKIP_COMMENT):
@$(DOCKER_CMD) verify-links.sh -s .pkg -s .bundler -s _plugins -s _includes -t $(SKIP_HTTP) .

verify-generated: .init .generate_exes
verify-generated: .init generators
$(DOCKER_CMD) $(BUILD_DIR)/update-apiserver-gen.sh --verify-only

verify-client-gen: .init .generate_exes
verify-client-gen: .init generators
$(DOCKER_CMD) $(BUILD_DIR)/verify-client-gen.sh

format: .init
Expand Down Expand Up @@ -302,7 +286,6 @@ clean: clean-bin clean-build-image clean-generated clean-coverage

clean-bin: .init $(scBuildImageTarget)
$(DOCKER_CMD) rm -rf $(BINDIR)
rm -f .generate_exes

clean-build-image: .init $(scBuildImageTarget)
$(DOCKER_CMD) rm -rf .pkg
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ Interested in contributing? Check out the [contribution guidelines](./CONTRIBUTI
Also see the [developer's guide](./docs/devguide.md) for information on how to
build and test the code.

We have a mailing list available
[here](https://groups.google.com/forum/#!forum/kubernetes-sig-service-catalog).

We have weekly meetings - see
[our SIG Readme](https://github.com/kubernetes/community/blob/master/sig-service-catalog/README.md#meetings)
for details. For meeting agendas
Expand Down
2 changes: 1 addition & 1 deletion UPSTREAM-VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.1.27
v0.1.29
2 changes: 1 addition & 1 deletion charts/catalog/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name: catalog
description: service-catalog API server and controller-manager helm chart
version: 0.1.27
version: 0.1.29
3 changes: 2 additions & 1 deletion charts/catalog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ chart and their default values.

| Parameter | Description | Default |
|-----------|-------------|---------|
| `image` | apiserver image to use | `quay.io/kubernetes-service-catalog/service-catalog:v0.1.27` |
| `image` | apiserver image to use | `quay.io/kubernetes-service-catalog/service-catalog:v0.1.29` |
| `imagePullPolicy` | `imagePullPolicy` for the service catalog | `Always` |
| `apiserver.annotations` | Annotations for apiserver pods | `{}` |
| `apiserver.nodeSelector` | A nodeSelector value to apply to the apiserver pods. If not specified, no nodeSelector will be applied | |
Expand Down Expand Up @@ -84,6 +84,7 @@ chart and their default values.
| `rbacEnable` | If true, create & use RBAC resources | `true` |
| `originatingIdentityEnabled` | Whether the OriginatingIdentity alpha feature should be enabled | `false` |
| `asyncBindingOperationsEnabled` | Whether or not alpha support for async binding operations is enabled | `false` |
| `namespacedServiceBrokerDisabled` | Whether or not alpha support for namespace scoped brokers is disabled | `false` |

Specify each parameter using the `--set key=value[,key=value]` argument to
`helm install`.
Expand Down
6 changes: 3 additions & 3 deletions charts/catalog/templates/apiserver-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
- {{ .Values.apiserver.audit.logPath }}
{{- end}}
- --enable-admission-plugins
- "KubernetesNamespaceLifecycle,DefaultServicePlan,ServiceBindingsLifecycle,ServicePlanChangeValidator,BrokerAuthSarCheck"
- "NamespaceLifecycle,DefaultServicePlan,ServiceBindingsLifecycle,ServicePlanChangeValidator,BrokerAuthSarCheck"
- --secure-port
- "8443"
- --storage-type
Expand All @@ -60,9 +60,9 @@ spec:
- --feature-gates
- OriginatingIdentity=true
{{- end }}
{{- if .Values.namespacedServiceBrokerEnabled }}
{{- if .Values.namespacedServiceBrokerDisabled }}
- --feature-gates
- NamespacedServiceBroker=true
- NamespacedServiceBroker=false
{{- end }}
{{- if .Values.apiserver.serveOpenAPISpec }}
- --serve-openapi-spec
Expand Down
4 changes: 2 additions & 2 deletions charts/catalog/templates/controller-manager-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ spec:
- --feature-gates
- CatalogRestrictions=true
{{- end }}
{{- if .Values.namespacedServiceBrokerEnabled }}
{{- if .Values.namespacedServiceBrokerDisabled }}
- --feature-gates
- NamespacedServiceBroker=true
- NamespacedServiceBroker=false
{{- end }}
ports:
- containerPort: 8444
Expand Down
2 changes: 1 addition & 1 deletion charts/catalog/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ items:
- apiGroups: ["servicecatalog.k8s.io"]
resources: ["clusterservicebrokers/status","clusterserviceclasses/status","clusterserviceplans/status","serviceinstances/status","serviceinstances/reference","servicebindings/status"]
verbs: ["update"]
{{- if .Values.namespacedServiceBrokerEnabled }}
{{- if not .Values.namespacedServiceBrokerDisabled }}
- apiGroups: ["servicecatalog.k8s.io"]
resources: ["serviceclasses"]
verbs: ["get","list","watch","create","patch","update","delete"]
Expand Down
6 changes: 3 additions & 3 deletions charts/catalog/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Default values for Service Catalog
# service-catalog image to use
image: quay.io/kubernetes-service-catalog/service-catalog:v0.1.27
image: quay.io/kubernetes-service-catalog/service-catalog:v0.1.29
# imagePullPolicy for the service-catalog; valid values are "IfNotPresent",
# "Never", and "Always"
imagePullPolicy: Always
Expand Down Expand Up @@ -152,5 +152,5 @@ controllerManager:
originatingIdentityEnabled: false
# Whether the AsyncBindingOperations alpha feature should be enabled
asyncBindingOperationsEnabled: false
# Whether the NamespacedServiceBroker alpha feature should be enabled
namespacedServiceBrokerEnabled: false
# Whether the NamespacedServiceBroker alpha feature should be disabled
namespacedServiceBrokerDisabled: false
2 changes: 1 addition & 1 deletion charts/ups-broker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Service Broker

| Parameter | Description | Default |
|-----------|-------------|---------|
| `image` | Image to use | `quay.io/kubernetes-service-catalog/user-broker:v0.1.27` |
| `image` | Image to use | `quay.io/kubernetes-service-catalog/user-broker:v0.1.29` |
| `imagePullPolicy` | `imagePullPolicy` for the ups-broker | `Always` |

Specify each parameter using the `--set key=value[,key=value]` argument to
Expand Down
2 changes: 1 addition & 1 deletion charts/ups-broker/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Default values for User-Provided Service Broker
# Image to use
image: quay.io/kubernetes-service-catalog/user-broker:v0.1.27
image: quay.io/kubernetes-service-catalog/user-broker:v0.1.29
# ImagePullPolicy; valid values are "IfNotPresent", "Never", and "Always"
imagePullPolicy: Always
# Whether the broker should also log to stderr instead of to files only
Expand Down
2 changes: 0 additions & 2 deletions cmd/apiserver/app/server/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ import (

// Admission controllers
"github.com/kubernetes-incubator/service-catalog/plugin/pkg/admission/broker/authsarcheck"
"github.com/kubernetes-incubator/service-catalog/plugin/pkg/admission/namespace/lifecycle"
siclifecycle "github.com/kubernetes-incubator/service-catalog/plugin/pkg/admission/servicebindings/lifecycle"
"github.com/kubernetes-incubator/service-catalog/plugin/pkg/admission/serviceplan/changevalidator"
"github.com/kubernetes-incubator/service-catalog/plugin/pkg/admission/serviceplan/defaultserviceplan"
)

// registerAllAdmissionPlugins registers all admission plugins
func registerAllAdmissionPlugins(plugins *admission.Plugins) {
lifecycle.Register(plugins)
defaultserviceplan.Register(plugins)
siclifecycle.Register(plugins)
changevalidator.Register(plugins)
Expand Down
6 changes: 2 additions & 4 deletions cmd/svcat/broker/describe_cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
"k8s.io/apimachinery/pkg/runtime"
k8sfake "k8s.io/client-go/kubernetes/fake"

"github.com/kubernetes-incubator/service-catalog/cmd/svcat/command"
_ "github.com/kubernetes-incubator/service-catalog/internal/test"
)

Expand Down Expand Up @@ -78,9 +77,8 @@ func TestDescribeCommand(t *testing.T) {
cxt := svcattest.NewContext(output, fakeApp)

// Initialize the command arguments
cmd := &getCmd{
Context: cxt,
Formatted: command.NewFormatted(),
cmd := &describeCmd{
Context: cxt,
}
cmd.name = tc.brokerName

Expand Down
23 changes: 17 additions & 6 deletions cmd/svcat/broker/get_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,40 @@ package broker
import (
"github.com/kubernetes-incubator/service-catalog/cmd/svcat/command"
"github.com/kubernetes-incubator/service-catalog/cmd/svcat/output"
"github.com/kubernetes-incubator/service-catalog/pkg/svcat/service-catalog"
"github.com/spf13/cobra"
)

type getCmd struct {
*command.Context
*command.Namespaced
*command.Formatted
*command.Scoped
name string
}

// NewGetCmd builds a "svcat get brokers" command
func NewGetCmd(cxt *command.Context) *cobra.Command {
getCmd := &getCmd{
Context: cxt,
Formatted: command.NewFormatted(),
Namespaced: command.NewNamespaced(cxt),
Formatted: command.NewFormatted(),
Scoped: command.NewScoped(),
}
cmd := &cobra.Command{
Use: "brokers [NAME]",
Aliases: []string{"broker", "brk"},
Short: "List brokers, optionally filtered by name",
Short: "List brokers, optionally filtered by name, scope or namespace",
Example: command.NormalizeExamples(`
svcat get brokers
svcat get broker asb
svcat get brokers --scope=cluster
svcat get brokers --scope=all
svcat get broker minibroker
`),
PreRunE: command.PreRunE(getCmd),
RunE: command.RunE(getCmd),
}
getCmd.AddOutputFlags(cmd.Flags())
getCmd.AddScopedFlags(cmd.Flags(), true)
getCmd.AddNamespaceFlags(cmd.Flags(), true)
return cmd
}

Expand All @@ -66,7 +73,11 @@ func (c *getCmd) Run() error {
}

func (c *getCmd) getAll() error {
brokers, err := c.App.RetrieveBrokers()
opts := servicecatalog.ScopeOptions{
Namespace: c.Namespace,
Scope: c.Scope,
}
brokers, err := c.App.RetrieveBrokers(opts)
if err != nil {
return err
}
Expand Down
Loading

0 comments on commit 3a54e60

Please sign in to comment.