Skip to content

Commit

Permalink
Squashed 'cmd/service-catalog/go/src/github.com/kubernetes-incubator/…
Browse files Browse the repository at this point in the history
…service-catalog/' changes from b69b4a6c80..b758460ba7

b758460ba7 origin build: modify hard coded path
871582f73a origin build: add origin tooling
9fa4e70 chart changes for v0.1.8 (openshift#1741)
cada49c handle instance deletion that occurs during async provisioning or async update (openshift#1587) (openshift#1708)
3032f01 phony output binaries (openshift#1729)
0c98a72 remove last vestiges of glide (openshift#1696)
8435935 Prune vendor (openshift#1739)
0f657ec allow setting go version, clean up alignment
08af73f Disable test-dep target temporarily
41984a5 Check for existing bindings only for instances with DeprovisionStatus == ServiceInstanceDeprovisionStatusRequired. (openshift#1640)
706e555 chart changes for v0.1.7 (openshift#1721)
23644db we inconsistently rm thing with and without docker (openshift#1713)
a38092d Chart changes for Release v0.1.6 (openshift#1718)
2fd4ecf Add PodPreset into settings api group (openshift#1694)
bac68f4 update docs of developer's guide (openshift#1716)
3200b16 add integration test for proper async binding retry (openshift#1688)
6d809c3 Add custom columns to OpenAPI schema (openshift#1597)
fcdefa6 Workaround spf13/viper stringarray bug (openshift#1700)
ebbeb8c undo 6bad71d358ad3ad39eb8c003f5807cca1ec1d1e7 (openshift#1714)
1ee9659 Load all client auth plugins in the cli (openshift#1695)
b9ad10d must run tests (openshift#1698)
c621cdc add stages to Travis
REVERT: b69b4a6c80 origin build: modify hard coded path
REVERT: 527fac4d02 origin build: add origin tooling

git-subtree-dir: cmd/service-catalog/go/src/github.com/kubernetes-incubator/service-catalog
git-subtree-split: b758460ba7a45d370da9d5d634e71c16e9eb282a
  • Loading branch information
Jay Boyd committed Feb 15, 2018
1 parent 83898df commit 241246a
Show file tree
Hide file tree
Showing 8,232 changed files with 4,127 additions and 2,193,297 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
26 changes: 17 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,20 @@ services:
cache:
directories:
- $GOPATH/pkg/dep
script:
- make verify build build-integration build-e2e test images svcat
deploy:
skip_cleanup: true
provider: script
script: contrib/travis/deploy.sh
on:
repo: kubernetes-incubator/service-catalog
all_branches: true
stages:
- test
- name: deploy
if: type != pull_request
jobs:
include:
# Test
- script: make verify build build-integration build-e2e test images svcat
# Deploy
- stage: deploy
deploy:
skip_cleanup: true
provider: script
script: contrib/travis/deploy.sh
on:
repo: kubernetes-incubator/service-catalog
all_branches: true
2 changes: 1 addition & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,17 @@ required = [
[[constraint]]
name = "k8s.io/code-generator"
version = "kubernetes-1.9.1"

[prune]
non-go = true
go-tests = true
unused-packages = true

# Prevent dep from pruning build scripts and codegen templates
[[prune.project]]
name = "github.com/kubernetes/repo-infra"
non-go = false
go-tests = false
unused-packages = false


36 changes: 14 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,13 @@ else
STAT = stat -c '%Y %n'
endif

NEWEST_GO_FILE = $(shell find $(SRC_DIRS) -name \*.go -exec $(STAT) {} \; \
| sort -r | head -n 1 | sed "s/.* //")

NEWEST_E2ETEST_SOURCE = $(shell find test/e2e -name \*.go -exec $(STAT) {} \; \
| sort -r | head -n 1 | sed "s/.* //")

TYPES_FILES = $(shell find pkg/apis -name types.go)
GO_VERSION = 1.9
GO_VERSION ?= 1.9

ALL_ARCH=amd64 arm arm64 ppc64le s390x

PLATFORM?=linux
ARCH?=amd64
PLATFORM ?= linux
ARCH ?= amd64

# TODO: Consider using busybox instead of debian
BASEIMAGE?=gcr.io/google-containers/debian-base-$(ARCH):0.2
Expand Down Expand Up @@ -105,9 +99,6 @@ else
scBuildImageTarget = .scBuildImage
endif

# Even though we migrated to dep, it doesn't replace the `glide nv` command
NON_VENDOR_DIRS = $(shell $(DOCKER_CMD) glide nv)

# This section builds the output binaries.
# Some will have dedicated targets to make it easier to type, for example
# "service-catalog" instead of "bin/service-catalog".
Expand All @@ -116,15 +107,16 @@ build: .init .generate_files \
$(BINDIR)/service-catalog \
$(BINDIR)/user-broker

.PHONY: $(BINDIR)/user-broker
user-broker: $(BINDIR)/user-broker
$(BINDIR)/user-broker: .init contrib/cmd/user-broker \
$(shell find contrib/cmd/user-broker -type f) \
$(shell find contrib/pkg/broker -type f)
$(DOCKER_CMD) $(GO_BUILD) -o $@ $(SC_PKG)/contrib/cmd/user-broker

# We'll rebuild service-catalog if any go file has changed (ie. NEWEST_GO_FILE)
.PHONY: $(BINDIR)/service-catalog
service-catalog: $(BINDIR)/service-catalog
$(BINDIR)/service-catalog: .init .generate_files cmd/service-catalog $(NEWEST_GO_FILE)
$(BINDIR)/service-catalog: .init .generate_files cmd/service-catalog
$(DOCKER_CMD) $(GO_BUILD) -o $@ $(SC_PKG)/cmd/service-catalog

# This section contains the code generation stuff
Expand Down Expand Up @@ -159,7 +151,8 @@ $(BINDIR)/informer-gen: .init
$(BINDIR)/openapi-gen: vendor/k8s.io/code-generator/cmd/openapi-gen
$(DOCKER_CMD) go build -o $@ $(SC_PKG)/$^

$(BINDIR)/e2e.test: .init $(NEWEST_E2ETEST_SOURCE) $(NEWEST_GO_FILE)
.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
Expand Down Expand Up @@ -205,7 +198,7 @@ verify: .init .generate_files verify-generated verify-client-gen verify-vendor
golint --set_exit_status $$i || exit 1; \
done'
@#
$(DOCKER_CMD) go vet $(NON_VENDOR_DIRS)
$(DOCKER_CMD) go vet $(SC_PKG)/...
@echo Running repo-infra verify scripts
@$(DOCKER_CMD) vendor/github.com/kubernetes/repo-infra/verify/verify-boilerplate.sh --rootdir=. | grep -v generated | grep -v .pkg > .out 2>&1 || true
@[ ! -s .out ] || (cat .out && rm .out && false)
Expand All @@ -231,7 +224,8 @@ coverage: .init
$(DOCKER_CMD) contrib/hack/coverage.sh --html "$(COVERAGE)" \
$(addprefix ./,$(TEST_DIRS))

test: .init build test-unit test-integration test-dep
.PHONY: test test-unit test-integration test-e2e
test: .init build test-unit test-integration

# this target checks to see if the go binary is installed on the host
.PHONY: check-go
Expand Down Expand Up @@ -272,11 +266,11 @@ test-e2e: build-e2e
clean: clean-bin clean-build-image clean-generated clean-coverage

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

clean-build-image:
$(DOCKER_CMD) rm -rf .pkg
rm -rf .pkg
rm -f .scBuildImage
docker rmi -f scbuildimage > /dev/null 2>&1 || true

Expand Down Expand Up @@ -310,7 +304,6 @@ images: user-broker-image service-catalog-image

images-all: $(addprefix arch-image-,$(ALL_ARCH))
arch-image-%:
$(MAKE) clean-bin
$(MAKE) ARCH=$* build
$(MAKE) ARCH=$* images

Expand Down Expand Up @@ -367,7 +360,6 @@ endif

release-push: $(addprefix release-push-,$(ALL_ARCH))
release-push-%:
$(MAKE) clean-bin
$(MAKE) ARCH=$* build
$(MAKE) ARCH=$* push

Expand All @@ -379,7 +371,7 @@ $(BINDIR)/svcat: .init .generate_files cmd/svcat/main.go
$(DOCKER_CMD) $(GO_BUILD) -o $@ $(SC_PKG)/cmd/svcat

# Dependency management via dep (https://golang.github.io/dep)
PHONHY: verify-vendor test-dep
.PHONY: verify-vendor test-dep
verify-vendor: .init
# Verify that vendor/ is in sync with Gopkg.lock
$(DOCKER_CMD) $(BUILD_DIR)/verify-vendor.sh
Expand Down
11 changes: 1 addition & 10 deletions build/build-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,8 @@

FROM golang:GO_VERSION

# Avoid permission issues when glide pulls mercurial repos as root
RUN printf "[trusted]\nusers = *\n" > /root/.hgrc

# Install glide as root
ENV GLIDE_VERSION=v0.12.3 \
GLIDE_HOME=/go/src/github.com/kubernetes-incubator/service-catalog/.glide
RUN curl -sSL https://github.com/Masterminds/glide/releases/download/$GLIDE_VERSION/glide-$GLIDE_VERSION-linux-amd64.tar.gz \
| tar -vxz -C /usr/local/bin --strip=1

# Install dep as root
ENV DEP_VERSION=v0.3.2
ENV DEP_VERSION=v0.4.1
RUN curl -sSL -o /usr/local/bin/dep https://github.com/golang/dep/releases/download/$DEP_VERSION/dep-linux-amd64 && \
chmod +x /usr/local/bin/dep

Expand Down
42 changes: 37 additions & 5 deletions build/update-apiserver-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,41 @@ ${BINDIR}/conversion-gen "$@" \
--input-dirs "${SC_PKG}/pkg/apis/servicecatalog" \
--input-dirs "${SC_PKG}/pkg/apis/servicecatalog/v1beta1" \
--output-file-base zz_generated.conversion
# generate openapi

#
# Generate auto-generated code (defaults, deepcopy and conversion) for Settings group
#

# Generate defaults
${BINDIR}/defaulter-gen "$@" \
--v 1 --logtostderr \
--go-header-file "vendor/github.com/kubernetes/repo-infra/verify/boilerplate/boilerplate.go.txt" \
--input-dirs "${SC_PKG}/pkg/apis/settings" \
--input-dirs "${SC_PKG}/pkg/apis/settings/v1alpha1" \
--extra-peer-dirs "${SC_PKG}/pkg/apis/settings" \
--extra-peer-dirs "${SC_PKG}/pkg/apis/settings/v1alpha1" \
--output-file-base "zz_generated.defaults"
# Generate deep copies
${BINDIR}/deepcopy-gen "$@" \
--v 1 --logtostderr \
--go-header-file "vendor/github.com/kubernetes/repo-infra/verify/boilerplate/boilerplate.go.txt" \
--input-dirs "${SC_PKG}/pkg/apis/settings" \
--input-dirs "${SC_PKG}/pkg/apis/settings/v1alpha1" \
--bounding-dirs "github.com/kubernetes-incubator/service-catalog" \
--output-file-base zz_generated.deepcopy
# Generate conversions
${BINDIR}/conversion-gen "$@" \
--v 1 --logtostderr \
--extra-peer-dirs k8s.io/api/core/v1,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/conversion,k8s.io/apimachinery/pkg/runtime \
--go-header-file "vendor/github.com/kubernetes/repo-infra/verify/boilerplate/boilerplate.go.txt" \
--input-dirs "${SC_PKG}/pkg/apis/settings" \
--input-dirs "${SC_PKG}/pkg/apis/settings/v1alpha1" \
--output-file-base zz_generated.conversion

# generate openapi for servicecatalog and settings group
${BINDIR}/openapi-gen "$@" \
--v 1 --logtostderr \
--go-header-file "vendor/github.com/kubernetes/repo-infra/verify/boilerplate/boilerplate.go.txt" \
--input-dirs "${SC_PKG}/pkg/apis/servicecatalog/v1beta1,k8s.io/api/core/v1,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/version,k8s.io/apimachinery/pkg/runtime" \
--output-package "${SC_PKG}/pkg/openapi"
--v 1 --logtostderr \
--go-header-file "vendor/github.com/kubernetes/repo-infra/verify/boilerplate/boilerplate.go.txt" \
--input-dirs "${SC_PKG}/pkg/apis/servicecatalog/v1beta1,k8s.io/api/core/v1,k8s.io/apimachinery/pkg/api/resource,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/version,k8s.io/apimachinery/pkg/runtime" \ \
--input-dirs "${SC_PKG}/pkg/apis/settings/v1alpha1" \
--output-package "${SC_PKG}/pkg/openapi"
6 changes: 6 additions & 0 deletions build/update-client-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,33 @@ BINDIR=${REPO_ROOT}/bin
${BINDIR}/client-gen "$@" \
--input-base "github.com/kubernetes-incubator/service-catalog/pkg/apis/" \
--input servicecatalog/ \
--input settings/ \
--clientset-path "github.com/kubernetes-incubator/service-catalog/pkg/client/clientset_generated/" \
--clientset-name internalclientset \
--go-header-file "vendor/github.com/kubernetes/repo-infra/verify/boilerplate/boilerplate.go.txt"
# Generate the versioned clientset (pkg/client/clientset_generated/clientset)
${BINDIR}/client-gen "$@" \
--input-base "github.com/kubernetes-incubator/service-catalog/pkg/apis/" \
--input "servicecatalog/v1beta1" \
--input "settings/v1alpha1" \
--clientset-path "github.com/kubernetes-incubator/service-catalog/pkg/client/clientset_generated/" \
--clientset-name "clientset" \
--go-header-file "vendor/github.com/kubernetes/repo-infra/verify/boilerplate/boilerplate.go.txt"
# generate lister
${BINDIR}/lister-gen "$@" \
--input-dirs="github.com/kubernetes-incubator/service-catalog/pkg/apis/servicecatalog" \
--input-dirs="github.com/kubernetes-incubator/service-catalog/pkg/apis/servicecatalog/v1beta1" \
--input-dirs="github.com/kubernetes-incubator/service-catalog/pkg/apis/settings" \
--input-dirs="github.com/kubernetes-incubator/service-catalog/pkg/apis/settings/v1alpha1" \
--output-package "github.com/kubernetes-incubator/service-catalog/pkg/client/listers_generated" \
--go-header-file "vendor/github.com/kubernetes/repo-infra/verify/boilerplate/boilerplate.go.txt"
# generate informer
${BINDIR}/informer-gen "$@" \
--go-header-file "vendor/github.com/kubernetes/repo-infra/verify/boilerplate/boilerplate.go.txt" \
--input-dirs "github.com/kubernetes-incubator/service-catalog/pkg/apis/servicecatalog" \
--input-dirs "github.com/kubernetes-incubator/service-catalog/pkg/apis/servicecatalog/v1beta1" \
--input-dirs "github.com/kubernetes-incubator/service-catalog/pkg/apis/settings" \
--input-dirs "github.com/kubernetes-incubator/service-catalog/pkg/apis/settings/v1alpha1" \
--internal-clientset-package "github.com/kubernetes-incubator/service-catalog/pkg/client/clientset_generated/internalclientset" \
--versioned-clientset-package "github.com/kubernetes-incubator/service-catalog/pkg/client/clientset_generated/clientset" \
--listers-package "github.com/kubernetes-incubator/service-catalog/pkg/client/listers_generated" \
Expand Down
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.5
version: 0.1.8
2 changes: 1 addition & 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.5` |
| `image` | apiserver image to use | `quay.io/kubernetes-service-catalog/service-catalog:v0.1.8` |
| `imagePullPolicy` | `imagePullPolicy` for the service catalog | `Always` |
| `apiserver.tls.requestHeaderCA` | Base64-encoded CA used to validate request-header authentication, when receiving delegated authentication from an aggregator. If not set, the service catalog API server will inherit this CA from the `extension-apiserver-authentication` ConfigMap if available. | `nil` |
| `apiserver.service.type` | Type of service; valid values are `LoadBalancer` and `NodePort` | `NodePort` |
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 @@ -89,7 +89,7 @@ spec:
port: 8080
path: /healthz
failureThreshold: 1
initialDelaySeconds: 10
initialDelaySeconds: 20
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 2
Expand All @@ -98,7 +98,7 @@ spec:
port: 8080
path: /healthz
failureThreshold: 3
initialDelaySeconds: 10
initialDelaySeconds: 20
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 2
Expand Down
3 changes: 3 additions & 0 deletions charts/catalog/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ items:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get","create","update","delete"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["get","list","update", "patch", "watch", "delete", "initialize"]
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get","list","watch"]
Expand Down
4 changes: 3 additions & 1 deletion 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.5
image: quay.io/kubernetes-service-catalog/service-catalog:v0.1.8
# imagePullPolicy for the service-catalog; valid values are "IfNotPresent",
# "Never", and "Always"
imagePullPolicy: Always
Expand All @@ -10,6 +10,8 @@ useAggregator: true
##
rbacEnable: true
apiserver:
# PodPreset is an optional feature and can be enabled by uncommenting the line below
# featureGates: "PodPreset=true"
aggregator:
# priority is the priority of the APIService. Please see
# https://github.com/kubernetes/kubernetes/blob/v1.7.0/staging/src/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/types.go#L56-L61
Expand Down
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.5` |
| `image` | Image to use | `quay.io/kubernetes-service-catalog/user-broker:v0.1.8` |
| `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.5
image: quay.io/kubernetes-service-catalog/user-broker:v0.1.8
# ImagePullPolicy; valid values are "IfNotPresent", "Never", and "Always"
imagePullPolicy: Always
# Certificate details to use for TLS. Leave blank to not use TLS
Expand Down
15 changes: 9 additions & 6 deletions cmd/svcat/binding/bind_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ func NewBindCmd(cxt *command.Context) *cobra.Command {
svcat bind wordpress
svcat bind wordpress-mysql-instance --name wordpress-mysql-binding --secret-name wordpress-mysql-secret
`,
RunE: func(cmd *cobra.Command, args []string) error {
return bindCmd.run(args)
},
PreRunE: command.PreRunE(bindCmd),
RunE: command.RunE(bindCmd),
}
cmd.Flags().StringVarP(
&bindCmd.ns,
Expand All @@ -72,15 +71,15 @@ func NewBindCmd(cxt *command.Context) *cobra.Command {
"",
"The name of the secret. Defaults to the name of the instance.",
)
cmd.Flags().StringArrayVarP(&bindCmd.rawParams, "param", "p", nil,
cmd.Flags().StringSliceVarP(&bindCmd.rawParams, "param", "p", nil,
"Additional parameter to use when binding the instance, format: NAME=VALUE")
cmd.Flags().StringArrayVarP(&bindCmd.rawSecrets, "secret", "s", nil,
cmd.Flags().StringSliceVarP(&bindCmd.rawSecrets, "secret", "s", nil,
"Additional parameter, whose value is stored in a secret, to use when binding the instance, format: SECRET[KEY]")

return cmd
}

func (c *bindCmd) run(args []string) error {
func (c *bindCmd) Validate(args []string) error {
if len(args) == 0 {
return fmt.Errorf("instance is required")
}
Expand All @@ -97,6 +96,10 @@ func (c *bindCmd) run(args []string) error {
return fmt.Errorf("invalid --secret value (%s)", err)
}

return nil
}

func (c *bindCmd) Run() error {
return c.bind()
}

Expand Down
Loading

0 comments on commit 241246a

Please sign in to comment.