Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Rename resources. closes #1080 (#1142)
* builds after renames

* add modified files

* clean up unnecessary mechanical changes to openservicebroker client

* some tests pass, just checkpointing work

* More tests pass, checkpointing

* unit tests pass

* manual testing for cluster works

* rebase related changes

* address make verify complaints

* first set of integration tests pass now

* integration tests

* address make verify complaints

* fix up some typos in the docs, integration tests now pass!!!

* update jenkins to look for correct resources

* update jenkins tests for new names

* update jenkins tests for new names

* more jenkins test fixes

* Replace Service Service with Service
  • Loading branch information
Ville Aikas authored and kibbles-n-bytes committed Aug 22, 2017
1 parent 70c2b9b commit 33cb345
Show file tree
Hide file tree
Showing 152 changed files with 6,695 additions and 6,700 deletions.
12 changes: 6 additions & 6 deletions cmd/controller-manager/app/controller_manager.go
Expand Up @@ -84,7 +84,7 @@ the core control loops shipped with the service catalog.`,
const controllerManagerAgentName = "service-catalog-controller-manager"
const controllerDiscoveryAgentName = "service-catalog-controller-discovery"

var catalogGVR = schema.GroupVersionResource{Group: "servicecatalog.k8s.io", Version: "v1alpha1", Resource: "brokers"}
var catalogGVR = schema.GroupVersionResource{Group: "servicecatalog.k8s.io", Version: "v1alpha1", Resource: "servicebrokers"}

// Run runs the service-catalog controller-manager; should never exit.
func Run(controllerManagerOptions *options.ControllerManagerServer) error {
Expand Down Expand Up @@ -323,16 +323,16 @@ func StartControllers(s *options.ControllerManagerServer,
// All shared informers are v1alpha1 API level
serviceCatalogSharedInformers := informerFactory.Servicecatalog().V1alpha1()

glog.V(5).Infof("Creating controller; broker relist interval: %v", s.BrokerRelistInterval)
glog.V(5).Infof("Creating controller; broker relist interval: %v", s.ServiceBrokerRelistInterval)
serviceCatalogController, err := controller.NewController(
coreClient,
serviceCatalogClientBuilder.ClientOrDie(controllerManagerAgentName).ServicecatalogV1alpha1(),
serviceCatalogSharedInformers.Brokers(),
serviceCatalogSharedInformers.ServiceBrokers(),
serviceCatalogSharedInformers.ServiceClasses(),
serviceCatalogSharedInformers.Instances(),
serviceCatalogSharedInformers.Bindings(),
serviceCatalogSharedInformers.ServiceInstances(),
serviceCatalogSharedInformers.ServiceInstanceCredentials(),
osb.NewClient,
s.BrokerRelistInterval,
s.ServiceBrokerRelistInterval,
s.OSBAPIPreferredVersion,
recorder,
)
Expand Down
8 changes: 4 additions & 4 deletions cmd/controller-manager/app/options/options.go
Expand Up @@ -16,7 +16,7 @@ limitations under the License.

// The controller is responsible for running control loops that reconcile
// the state of service catalog API resources with service brokers, service
// classes, service instances, and service bindings.
// classes, service instances, and service instance credentials.

package options

Expand All @@ -39,7 +39,7 @@ type ControllerManagerServer struct {

const (
defaultResyncInterval = 5 * time.Minute
defaultBrokerRelistInterval = 24 * time.Hour
defaultServiceBrokerRelistInterval = 24 * time.Hour
defaultContentType = "application/json"
defaultBindAddress = "0.0.0.0"
defaultPort = 10000
Expand All @@ -63,7 +63,7 @@ func NewControllerManagerServer() *ControllerManagerServer {
K8sKubeconfigPath: defaultK8sKubeconfigPath,
ServiceCatalogKubeconfigPath: defaultServiceCatalogKubeconfigPath,
ResyncInterval: defaultResyncInterval,
BrokerRelistInterval: defaultBrokerRelistInterval,
ServiceBrokerRelistInterval: defaultServiceBrokerRelistInterval,
OSBAPIContextProfile: defaultOSBAPIContextProfile,
OSBAPIPreferredVersion: defaultOSBAPIPreferredVersion,
ConcurrentSyncs: defaultConcurrentSyncs,
Expand All @@ -88,7 +88,7 @@ func (s *ControllerManagerServer) AddFlags(fs *pflag.FlagSet) {
fs.StringVar(&s.ServiceCatalogKubeconfigPath, "service-catalog-kubeconfig", "", "Path to service-catalog kubeconfig")
fs.BoolVar(&s.ServiceCatalogInsecureSkipVerify, "service-catalog-insecure-skip-verify", s.ServiceCatalogInsecureSkipVerify, "Skip verification of the TLS certificate for the service-catalog API server")
fs.DurationVar(&s.ResyncInterval, "resync-interval", s.ResyncInterval, "The interval on which the controller will resync its informers")
fs.DurationVar(&s.BrokerRelistInterval, "broker-relist-interval", s.BrokerRelistInterval, "The interval on which a broker's catalog is relisted after the broker becomes ready")
fs.DurationVar(&s.ServiceBrokerRelistInterval, "broker-relist-interval", s.ServiceBrokerRelistInterval, "The interval on which a broker's catalog is relisted after the broker becomes ready")
fs.BoolVar(&s.OSBAPIContextProfile, "enable-osb-api-context-profile", s.OSBAPIContextProfile, "This does nothing.")
fs.MarkHidden("enable-osb-api-context-profile")
fs.StringVar(&s.OSBAPIPreferredVersion, "osb-api-preferred-version", s.OSBAPIPreferredVersion, "The string to send as the version header.")
Expand Down
2 changes: 1 addition & 1 deletion contrib/examples/apiserver/binding.yaml
@@ -1,5 +1,5 @@
apiVersion: servicecatalog.k8s.io/v1alpha1
kind: Binding
kind: ServiceInstanceCredential
metadata:
name: test-binding
namespace: test-ns
Expand Down
2 changes: 1 addition & 1 deletion contrib/examples/apiserver/broker.yaml
@@ -1,5 +1,5 @@
apiVersion: servicecatalog.k8s.io/v1alpha1
kind: Broker
kind: ServiceBroker
metadata:
name: test-broker
spec:
Expand Down
2 changes: 1 addition & 1 deletion contrib/examples/apiserver/instance.yaml
@@ -1,5 +1,5 @@
apiVersion: servicecatalog.k8s.io/v1alpha1
kind: Instance
kind: ServiceInstance
metadata:
name: test-instance
namespace: test-ns
Expand Down
2 changes: 1 addition & 1 deletion contrib/examples/walkthrough/ups-binding.yaml
@@ -1,5 +1,5 @@
apiVersion: servicecatalog.k8s.io/v1alpha1
kind: Binding
kind: ServiceInstanceCredential
metadata:
name: ups-binding
namespace: test-ns
Expand Down
2 changes: 1 addition & 1 deletion contrib/examples/walkthrough/ups-broker.yaml
@@ -1,5 +1,5 @@
apiVersion: servicecatalog.k8s.io/v1alpha1
kind: Broker
kind: ServiceBroker
metadata:
name: ups-broker
spec:
Expand Down
2 changes: 1 addition & 1 deletion contrib/examples/walkthrough/ups-instance-default-sp.yaml
@@ -1,5 +1,5 @@
apiVersion: servicecatalog.k8s.io/v1alpha1
kind: Instance
kind: ServiceInstance
metadata:
name: ups-instance-default
namespace: test-ns
Expand Down
2 changes: 1 addition & 1 deletion contrib/examples/walkthrough/ups-instance.yaml
@@ -1,5 +1,5 @@
apiVersion: servicecatalog.k8s.io/v1alpha1
kind: Instance
kind: ServiceInstance
metadata:
name: ups-instance
namespace: test-ns
Expand Down
2 changes: 1 addition & 1 deletion contrib/hack/cleanup.sh
Expand Up @@ -18,7 +18,7 @@ set -o nounset
set -o errexit

KUBECTL=kubectl
TYPES='servicebrokers serviceclasses serviceinstances servicebindings'
TYPES='servicebrokers serviceclasses serviceinstances serviceinstancecredentials'

for i in $TYPES; do
for j in `$KUBECTL get --no-headers $i | cut -d ' ' -f 1`; do
Expand Down
6 changes: 3 additions & 3 deletions contrib/hack/test-apiserver.sh
Expand Up @@ -47,10 +47,10 @@ NO_TTY=1 kubectl create -f contrib/examples/apiserver/serviceclass.yaml
NO_TTY=1 kubectl create -f contrib/examples/apiserver/instance.yaml
NO_TTY=1 kubectl create -f contrib/examples/apiserver/binding.yaml

NO_TTY=1 kubectl get broker test-broker -o yaml
NO_TTY=1 kubectl get servicebroker test-broker -o yaml
NO_TTY=1 kubectl get serviceclass test-serviceclass -o yaml
NO_TTY=1 kubectl get instance test-instance --namespace test-ns -o yaml
NO_TTY=1 kubectl get binding test-binding --namespace test-ns -o yaml
NO_TTY=1 kubectl get serviceinstance test-instance --namespace test-ns -o yaml
NO_TTY=1 kubectl get serviceinstancecredential test-binding --namespace test-ns -o yaml

NO_TTY=1 kubectl delete -f contrib/examples/apiserver/broker.yaml
NO_TTY=1 kubectl delete -f contrib/examples/apiserver/serviceclass.yaml
Expand Down
2 changes: 1 addition & 1 deletion contrib/jenkins/install_catalog.sh
Expand Up @@ -114,7 +114,7 @@ ${ROOT}/contrib/jenkins/setup-sc-context.sh \
|| error_exit 'Error when setting up context for service catalog.'

retry &> /dev/null \
kubectl --context=service-catalog get brokers,serviceclasses,instances,bindings \
kubectl --context=service-catalog get servicebrokers,serviceclasses,serviceinstances,serviceinstancecredentials \
|| error_exit 'Timed out waiting for expected response from service catalog API server.'

echo 'Service Catalog installed successfully.'
6 changes: 3 additions & 3 deletions contrib/jenkins/run_e2e.sh
Expand Up @@ -64,9 +64,9 @@ function cleanup() {
# TODO: Hack in order to delete TPRs. Will need to be removed when TPRs can be deleted
# by the catalog API server.
if [[ -n "${WITH_TPR:-}" ]]; then
kubectl delete thirdpartyresources binding.servicecatalog.k8s.io
kubectl delete thirdpartyresources instance.servicecatalog.k8s.io
kubectl delete thirdpartyresources broker.servicecatalog.k8s.io
kubectl delete thirdpartyresources service-instance-credential.servicecatalog.k8s.io
kubectl delete thirdpartyresources service-instance.servicecatalog.k8s.io
kubectl delete thirdpartyresources service-broker.servicecatalog.k8s.io
kubectl delete thirdpartyresources service-class.servicecatalog.k8s.io
fi
} &> /dev/null
Expand Down
30 changes: 15 additions & 15 deletions contrib/jenkins/test_walkthrough.sh
Expand Up @@ -136,15 +136,15 @@ kubectl --context=service-catalog create -f "${ROOT}/contrib/examples/walkthroug
|| error_exit 'Error when creating ups-broker.'

wait_for_expected_output -e 'FetchedCatalog' \
kubectl --context=service-catalog get brokers ups-broker -o yaml \
kubectl --context=service-catalog get servicebrokers ups-broker -o yaml \
|| {
kubectl --context=service-catalog get brokers ups-broker -o yaml
kubectl --context=service-catalog get servicebrokers ups-broker -o yaml
error_exit 'Did not receive expected condition when creating ups-broker.'
}

[[ "$(kubectl --context=service-catalog get brokers ups-broker -o yaml)" == *"status: \"True\""* ]] \
[[ "$(kubectl --context=service-catalog get servicebrokers ups-broker -o yaml)" == *"status: \"True\""* ]] \
|| {
kubectl --context=service-catalog get brokers ups-broker -o yaml
kubectl --context=service-catalog get servicebrokers ups-broker -o yaml
error_exit 'Failure status reported when attempting to fetch catalog from ups-broker.'
}

Expand All @@ -159,15 +159,15 @@ kubectl --context=service-catalog create -f "${ROOT}/contrib/examples/walkthroug
|| error_exit 'Error when creating ups-instance.'

wait_for_expected_output -e 'ProvisionedSuccessfully' \
kubectl --context=service-catalog get instances -n test-ns ups-instance -o yaml \
kubectl --context=service-catalog get serviceinstances -n test-ns ups-instance -o yaml \
|| {
kubectl --context=service-catalog get instances -n test-ns ups-instance -o yaml
kubectl --context=service-catalog get serviceinstances -n test-ns ups-instance -o yaml
error_exit 'Did not receive expected condition when provisioning ups-instance.'
}

[[ "$(kubectl --context=service-catalog get instances -n test-ns ups-instance -o yaml)" == *"status: \"True\""* ]] \
[[ "$(kubectl --context=service-catalog get serviceinstances -n test-ns ups-instance -o yaml)" == *"status: \"True\""* ]] \
|| {
kubectl --context=service-catalog get instances -n test-ns ups-instance -o yaml
kubectl --context=service-catalog get serviceinstances -n test-ns ups-instance -o yaml
error_exit 'Failure status reported when attempting to provision ups-instance.'
}

Expand All @@ -179,15 +179,15 @@ kubectl --context=service-catalog create -f "${ROOT}/contrib/examples/walkthroug
|| error_exit 'Error when creating ups-binding.'

wait_for_expected_output -e 'InjectedBindResult' \
kubectl --context=service-catalog get bindings -n test-ns ups-binding -o yaml \
kubectl --context=service-catalog get serviceinstancecredentials -n test-ns ups-binding -o yaml \
|| {
kubectl --context=service-catalog get bindings -n test-ns ups-binding -o yaml
kubectl --context=service-catalog get serviceinstancecredentials -n test-ns ups-binding -o yaml
error_exit 'Did not receive expected condition when injecting ups-binding.'
}

[[ "$(kubectl --context=service-catalog get bindings -n test-ns ups-binding -o yaml)" == *"status: \"True\""* ]] \
[[ "$(kubectl --context=service-catalog get serviceinstancecredentials -n test-ns ups-binding -o yaml)" == *"status: \"True\""* ]] \
|| {
kubectl --context=service-catalog get bindings -n test-ns ups-binding -o yaml
kubectl --context=service-catalog get serviceinstancecredentials -n test-ns ups-binding -o yaml
error_exit 'Failure status reported when attempting to inject ups-binding.'
}

Expand All @@ -200,7 +200,7 @@ if [[ "${WITH_TPR}" != true ]]; then

echo 'Unbinding from instance...'

kubectl --context=service-catalog delete -n test-ns bindings ups-binding \
kubectl --context=service-catalog delete -n test-ns serviceinstancecredentials ups-binding \
|| error_exit 'Error when deleting ups-binding.'

wait_for_expected_output -x -e "ups-binding" \
Expand All @@ -211,14 +211,14 @@ if [[ "${WITH_TPR}" != true ]]; then

echo 'Deprovisioning instance...'

kubectl --context=service-catalog delete -n test-ns instances ups-instance \
kubectl --context=service-catalog delete -n test-ns serviceinstances ups-instance \
|| error_exit 'Error when deleting ups-instance.'

# Delete the broker

echo 'Deleting broker...'

kubectl --context=service-catalog delete brokers ups-broker \
kubectl --context=service-catalog delete servicebrokers ups-broker \
|| error_exit 'Error when deleting ups-broker.'

wait_for_expected_output -x -e 'user-provided-service' \
Expand Down

0 comments on commit 33cb345

Please sign in to comment.