Skip to content

Commit 4007468

Browse files
Merge pull request #20 from jboyd01/v0.1.29-rebase-master
V0.1.29 rebase master
2 parents 884f498 + 3a54e60 commit 4007468

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2182
-650
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ jobs:
4040
make verify-docs
4141
else
4242
echo "Running full build"
43-
make verify build svcat build-integration build-e2e test-integration
43+
# make sure code quality is good and proper
44+
# generate the output binaries for server and client
45+
# ensure the tests build
46+
make verify build svcat build-integration build-e2e
4447
fi
4548
env: GO_VERSION=1.10
4649
# Doc Site svc-cat.io

Makefile.sc

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -146,42 +146,26 @@ $(BINDIR)/service-catalog: .init .generate_files cmd/service-catalog
146146

147147
# This section contains the code generation stuff
148148
#################################################
149-
.generate_exes: $(BINDIR)/defaulter-gen \
150-
$(BINDIR)/deepcopy-gen \
151-
$(BINDIR)/conversion-gen \
152-
$(BINDIR)/client-gen \
153-
$(BINDIR)/lister-gen \
154-
$(BINDIR)/informer-gen \
155-
$(BINDIR)/openapi-gen
156-
touch $@
157-
158-
$(BINDIR)/defaulter-gen: .init
159-
$(DOCKER_CMD) go build -o $@ $(SC_PKG)/vendor/k8s.io/code-generator/cmd/defaulter-gen
160-
161-
$(BINDIR)/deepcopy-gen: .init
162-
$(DOCKER_CMD) go build -o $@ $(SC_PKG)/vendor/k8s.io/code-generator/cmd/deepcopy-gen
163-
164-
$(BINDIR)/conversion-gen: .init
165-
$(DOCKER_CMD) go build -o $@ $(SC_PKG)/vendor/k8s.io/code-generator/cmd/conversion-gen
166-
167-
$(BINDIR)/client-gen: .init
168-
$(DOCKER_CMD) go build -o $@ $(SC_PKG)/vendor/k8s.io/code-generator/cmd/client-gen
149+
GENERATORS = $(addprefix $(BINDIR)/, defaulter-gen deepcopy-gen conversion-gen \
150+
client-gen lister-gen informer-gen openapi-gen)
169151

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

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

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

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

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

245-
verify-generated: .init .generate_exes
229+
verify-generated: .init generators
246230
$(DOCKER_CMD) $(BUILD_DIR)/update-apiserver-gen.sh --verify-only
247231

248-
verify-client-gen: .init .generate_exes
232+
verify-client-gen: .init generators
249233
$(DOCKER_CMD) $(BUILD_DIR)/verify-client-gen.sh
250234

251235
format: .init
@@ -302,7 +286,6 @@ clean: clean-bin clean-build-image clean-generated clean-coverage
302286

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

307290
clean-build-image: .init $(scBuildImageTarget)
308291
$(DOCKER_CMD) rm -rf .pkg

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ Interested in contributing? Check out the [contribution guidelines](./CONTRIBUTI
5959
Also see the [developer's guide](./docs/devguide.md) for information on how to
6060
build and test the code.
6161

62+
We have a mailing list available
63+
[here](https://groups.google.com/forum/#!forum/kubernetes-sig-service-catalog).
64+
6265
We have weekly meetings - see
6366
[our SIG Readme](https://github.com/kubernetes/community/blob/master/sig-service-catalog/README.md#meetings)
6467
for details. For meeting agendas

UPSTREAM-VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.1.27
1+
v0.1.29

charts/catalog/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
name: catalog
22
description: service-catalog API server and controller-manager helm chart
3-
version: 0.1.27
3+
version: 0.1.29

charts/catalog/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ chart and their default values.
4040

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

8889
Specify each parameter using the `--set key=value[,key=value]` argument to
8990
`helm install`.

charts/catalog/templates/apiserver-deployment.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ spec:
3939
- {{ .Values.apiserver.audit.logPath }}
4040
{{- end}}
4141
- --enable-admission-plugins
42-
- "KubernetesNamespaceLifecycle,DefaultServicePlan,ServiceBindingsLifecycle,ServicePlanChangeValidator,BrokerAuthSarCheck"
42+
- "NamespaceLifecycle,DefaultServicePlan,ServiceBindingsLifecycle,ServicePlanChangeValidator,BrokerAuthSarCheck"
4343
- --secure-port
4444
- "8443"
4545
- --storage-type
@@ -60,9 +60,9 @@ spec:
6060
- --feature-gates
6161
- OriginatingIdentity=true
6262
{{- end }}
63-
{{- if .Values.namespacedServiceBrokerEnabled }}
63+
{{- if .Values.namespacedServiceBrokerDisabled }}
6464
- --feature-gates
65-
- NamespacedServiceBroker=true
65+
- NamespacedServiceBroker=false
6666
{{- end }}
6767
{{- if .Values.apiserver.serveOpenAPISpec }}
6868
- --serve-openapi-spec

charts/catalog/templates/controller-manager-deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ spec:
8181
- --feature-gates
8282
- CatalogRestrictions=true
8383
{{- end }}
84-
{{- if .Values.namespacedServiceBrokerEnabled }}
84+
{{- if .Values.namespacedServiceBrokerDisabled }}
8585
- --feature-gates
86-
- NamespacedServiceBroker=true
86+
- NamespacedServiceBroker=false
8787
{{- end }}
8888
ports:
8989
- containerPort: 8444

charts/catalog/templates/rbac.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ items:
106106
- apiGroups: ["servicecatalog.k8s.io"]
107107
resources: ["clusterservicebrokers/status","clusterserviceclasses/status","clusterserviceplans/status","serviceinstances/status","serviceinstances/reference","servicebindings/status"]
108108
verbs: ["update"]
109-
{{- if .Values.namespacedServiceBrokerEnabled }}
109+
{{- if not .Values.namespacedServiceBrokerDisabled }}
110110
- apiGroups: ["servicecatalog.k8s.io"]
111111
resources: ["serviceclasses"]
112112
verbs: ["get","list","watch","create","patch","update","delete"]

charts/catalog/values.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Default values for Service Catalog
22
# service-catalog image to use
3-
image: quay.io/kubernetes-service-catalog/service-catalog:v0.1.27
3+
image: quay.io/kubernetes-service-catalog/service-catalog:v0.1.29
44
# imagePullPolicy for the service-catalog; valid values are "IfNotPresent",
55
# "Never", and "Always"
66
imagePullPolicy: Always
@@ -152,5 +152,5 @@ controllerManager:
152152
originatingIdentityEnabled: false
153153
# Whether the AsyncBindingOperations alpha feature should be enabled
154154
asyncBindingOperationsEnabled: false
155-
# Whether the NamespacedServiceBroker alpha feature should be enabled
156-
namespacedServiceBrokerEnabled: false
155+
# Whether the NamespacedServiceBroker alpha feature should be disabled
156+
namespacedServiceBrokerDisabled: false

charts/ups-broker/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Service Broker
3434

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

4040
Specify each parameter using the `--set key=value[,key=value]` argument to

charts/ups-broker/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Default values for User-Provided Service Broker
22
# Image to use
3-
image: quay.io/kubernetes-service-catalog/user-broker:v0.1.27
3+
image: quay.io/kubernetes-service-catalog/user-broker:v0.1.29
44
# ImagePullPolicy; valid values are "IfNotPresent", "Never", and "Always"
55
imagePullPolicy: Always
66
# Whether the broker should also log to stderr instead of to files only

cmd/apiserver/app/server/plugins.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,13 @@ import (
2424

2525
// Admission controllers
2626
"github.com/kubernetes-incubator/service-catalog/plugin/pkg/admission/broker/authsarcheck"
27-
"github.com/kubernetes-incubator/service-catalog/plugin/pkg/admission/namespace/lifecycle"
2827
siclifecycle "github.com/kubernetes-incubator/service-catalog/plugin/pkg/admission/servicebindings/lifecycle"
2928
"github.com/kubernetes-incubator/service-catalog/plugin/pkg/admission/serviceplan/changevalidator"
3029
"github.com/kubernetes-incubator/service-catalog/plugin/pkg/admission/serviceplan/defaultserviceplan"
3130
)
3231

3332
// registerAllAdmissionPlugins registers all admission plugins
3433
func registerAllAdmissionPlugins(plugins *admission.Plugins) {
35-
lifecycle.Register(plugins)
3634
defaultserviceplan.Register(plugins)
3735
siclifecycle.Register(plugins)
3836
changevalidator.Register(plugins)

cmd/svcat/broker/describe_cmd_test.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import (
2929
"k8s.io/apimachinery/pkg/runtime"
3030
k8sfake "k8s.io/client-go/kubernetes/fake"
3131

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

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

8079
// Initialize the command arguments
81-
cmd := &getCmd{
82-
Context: cxt,
83-
Formatted: command.NewFormatted(),
80+
cmd := &describeCmd{
81+
Context: cxt,
8482
}
8583
cmd.name = tc.brokerName
8684

cmd/svcat/broker/get_cmd.go

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,33 +19,40 @@ package broker
1919
import (
2020
"github.com/kubernetes-incubator/service-catalog/cmd/svcat/command"
2121
"github.com/kubernetes-incubator/service-catalog/cmd/svcat/output"
22+
"github.com/kubernetes-incubator/service-catalog/pkg/svcat/service-catalog"
2223
"github.com/spf13/cobra"
2324
)
2425

2526
type getCmd struct {
26-
*command.Context
27+
*command.Namespaced
2728
*command.Formatted
29+
*command.Scoped
2830
name string
2931
}
3032

3133
// NewGetCmd builds a "svcat get brokers" command
3234
func NewGetCmd(cxt *command.Context) *cobra.Command {
3335
getCmd := &getCmd{
34-
Context: cxt,
35-
Formatted: command.NewFormatted(),
36+
Namespaced: command.NewNamespaced(cxt),
37+
Formatted: command.NewFormatted(),
38+
Scoped: command.NewScoped(),
3639
}
3740
cmd := &cobra.Command{
3841
Use: "brokers [NAME]",
3942
Aliases: []string{"broker", "brk"},
40-
Short: "List brokers, optionally filtered by name",
43+
Short: "List brokers, optionally filtered by name, scope or namespace",
4144
Example: command.NormalizeExamples(`
4245
svcat get brokers
43-
svcat get broker asb
46+
svcat get brokers --scope=cluster
47+
svcat get brokers --scope=all
48+
svcat get broker minibroker
4449
`),
4550
PreRunE: command.PreRunE(getCmd),
4651
RunE: command.RunE(getCmd),
4752
}
4853
getCmd.AddOutputFlags(cmd.Flags())
54+
getCmd.AddScopedFlags(cmd.Flags(), true)
55+
getCmd.AddNamespaceFlags(cmd.Flags(), true)
4956
return cmd
5057
}
5158

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

6875
func (c *getCmd) getAll() error {
69-
brokers, err := c.App.RetrieveBrokers()
76+
opts := servicecatalog.ScopeOptions{
77+
Namespace: c.Namespace,
78+
Scope: c.Scope,
79+
}
80+
brokers, err := c.App.RetrieveBrokers(opts)
7081
if err != nil {
7182
return err
7283
}

0 commit comments

Comments
 (0)