Skip to content
This repository was archived by the owner on Jun 26, 2024. It is now read-only.

Conversation

@akashshinde
Copy link
Contributor

@akashshinde akashshinde commented Aug 13, 2020

Motivation

Ref: https://issues.redhat.com/browse/APPSVC-574

Primarily

  • Align the ServiceBinding API with the Proposal which also takes into account the new specification.
  • Open up the API for review by the OLM team. ( There's no point doing an API review for the API which is in master since it was going to change )

Also ..

  • Standardize use of Golang Kubernetes APIs. Example, used corev1.LocalObjectReference instead of name wherever application.

Changes

This is how ServiceBinding CR would look like

---
apiVersion: operators.coreos.com/v1alpha1
kind: ServiceBinding
metadata:
  name: example-servicebinding
  namespace: sbose
spec:
  services:
    - name: demo-database
      group: postgresql.baiju.dev
      kind: Database
      version: v1alpha1

  application:
    name: nodejs-rest-http-crud
    group: apps
    version: v1
    resource: deployments

Set a Group and Kind which is Kubernetes / OperatorFramework friendly.

apiVersion: operators.coreos.com/v1alpha1
kind: ServiceBinding

Following changes have been made in this PR

  • Updated apps.openshift.io group to operators.coreos.com

  • Update ServiceBindingRequest kind to ServiceBinding

  • Removed spec.backingServiceSelector

  • Replaced spec.applicationSelector with spec.application

  • Using Application *Application instead of Application Application ( feedback by OLM team )

  • Using DetectBindingResources *bool instead of DetectBindingResources bool ( feedback by OLM team )

  • Replaced spec.backingServiceSelectors with spec.services

  • Replaced resourceRef in application and services to name

Testing

  • No extra tests added. Ensured existing ones work!
  • Validated manually by creating a binding between a nodejs app & Database. (connecting single service)
  • Validated manually by creating a binding between a nodejs app & Database and etcd (connecting multiple services)

@openshift-ci-robot
Copy link
Collaborator

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@akashshinde
Copy link
Contributor Author

/assign @pedjak
/assign @isutton

@akashshinde
Copy link
Contributor Author

/assign @DhritiShikhar @Avni-Sharma

@akashshinde
Copy link
Contributor Author

/test e2e

@sbose78 sbose78 requested a review from isutton August 18, 2020 11:55
@sbose78
Copy link
Member

sbose78 commented Aug 18, 2020

/hold Let the others continue the review, I'm going to bikeshed on the API group name before this gets merged :)

- "list"
- "watch"
- "update"
- apiGroups:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should revisit the existing roles from above and remove those pointing to the old apigroups.

@akashshinde
Copy link
Contributor Author

/test e2e

@akashshinde
Copy link
Contributor Author

/test 4.5-e2e

@akashshinde
Copy link
Contributor Author

/test e2e

@pedjak
Copy link
Contributor

pedjak commented Aug 24, 2020

could we rename customEnvVar to env, to match the specification better?

@akashshinde akashshinde force-pushed the breaking-api-changes branch 2 times, most recently from 567224e to 3ae312c Compare September 11, 2020 04:47
@akashshinde akashshinde changed the title Breaking api changes - Refactor ServiceBindingRequest api Bug 1878016: Breaking api changes - Refactor ServiceBindingRequest api Sep 11, 2020
@akashshinde akashshinde changed the title Bug 1878016: Breaking api changes - Refactor ServiceBindingRequest api Breaking api changes - Refactor ServiceBindingRequest api Sep 11, 2020
@pmacik
Copy link
Contributor

pmacik commented Sep 11, 2020

/retest

5 similar comments
@akashshinde
Copy link
Contributor Author

/retest

@akashshinde
Copy link
Contributor Author

/retest

@akashshinde
Copy link
Contributor Author

/retest

@akashshinde
Copy link
Contributor Author

/retest

@akashshinde
Copy link
Contributor Author

/retest

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Sep 14, 2020

@akashshinde: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/unit 7441228 link /test unit
ci/prow/lint 7441228 link /test lint
ci/prow/e2e 7441228 link /test e2e

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@pedjak
Copy link
Contributor

pedjak commented Sep 14, 2020

/retest

Updated apps.openshift.io group to operators.coreos.com
Updated ServiceBindingRequest kind to ServiceBinding
Removed spec.backingServiceSelector
Replaced spec.applicationSelector with spec.application
Using Application *Application instead of Application Application ( feedback by OLM team )
Using DetectBindingResources *bool instead of DetectBindingResources bool ( feedback by OLM team )
Replaced spec.backingServiceSelectors with spec.services
Replaced resourceRef in application and services to name
@pedjak
Copy link
Contributor

pedjak commented Sep 15, 2020

/lgtm
/approve

@pedjak
Copy link
Contributor

pedjak commented Sep 15, 2020

/hold cancel

@pedjak
Copy link
Contributor

pedjak commented Sep 15, 2020

/lgtm
/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pedjak

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.