Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: CFServiceInstance and CFServiceBinding resources should implement the ProvisionedService duck type #549

Closed
tcdowney opened this issue Jan 24, 2022 · 1 comment
Assignees
Labels

Comments

@tcdowney
Copy link
Member

tcdowney commented Jan 24, 2022

Blockers/Dependencies

No response

Background

As an App Developer
I want the CFServiceInstance and CFServiceBinding resources to implement the ProvisionedService duck type from the K8s Service Binding specification
So that they can interoperate with other K8s Service Binding aware projects (such as Kpack)

Acceptance Criteria

CFServiceInstance

Secret Exists

GIVEN I have applied a CFServiceInstance CR and the corresponding Secret exists
WHEN I kubectl -n SPACE_GUID get cfserviceinstance CF_SERVICE_INSTANCE_NAME
THEN I see that status.binding.name on the CFServiceInstance is set to the name of the Secret
AND I see a BindingSecretAvailable condition in status.conditions indicating that the secret is available

status:
  binding:
    name: service-instance-secret-name
  conditions:
  - type:   BindingSecretAvailable
    status: 'True'
    reason: 'SecretFound'
    message: ''
    lastTransitionTime: '2021-01-20T17:00:00Z'

Secret Does Not Exist

GIVEN I have applied a CFServiceInstance CR that has status.binding.name set on it
WHEN I delete the referenced Secret
THEN I see that status.binding.name on the CFServiceInstance is removed
AND I see a BindingSecretAvailable condition in status.conditions indicating that the secret does not exist

status:
  binding:
    name: ""
  conditions:
  - type:   BindingSecretAvailable
    status: 'False'
    reason: 'SecretNotFound'
    message: 'Binding secret does not exist'
    lastTransitionTime: '2021-01-20T17:00:00Z'

CFServiceBinding

Secret Exists

GIVEN I have applied a CFServiceBinding CR and the corresponding Secret exists
WHEN I kubectl -n SPACE_GUID get cfservicebinding CF_SERVICE_BINDING_NAME
THEN I see that status.binding.name on the CFServiceBinding is set to the name of the Secret
AND I see a BindingSecretAvailable condition in status.conditions indicating that the secret is available

status:
  binding:
    name: service-instance-secret-name
  conditions:
  - type:   BindingSecretAvailable
    status: 'True'
    reason: 'SecretFound'
    message: ''
    lastTransitionTime: '2021-01-20T17:00:00Z'

Secret Does Not Exist

GIVEN I have applied a CFServiceBinding CR that has status.binding.name set on it
WHEN I delete the referenced Secret
THEN I see that status.binding.name on the CFServiceBinding is removed
AND I see a BindingSecretAvailable condition in status.conditions indicating that the secret does not exist

status:
  binding:
    name: ""
  conditions:
  - type:   BindingSecretAvailable
    status: 'False'
    reason: 'SecretNotFound'
    message: 'Binding secret does not exist'
    lastTransitionTime: '2021-01-20T17:00:00Z'

Dev Notes

@tcdowney tcdowney added the UPSI label Jan 24, 2022
gnovv added a commit that referenced this issue Feb 3, 2022
- Added status conditions field to service bindings
- WIP Completed happy-path integration tests

Co-authored-by: Andrew Costa <[email protected]>
Co-authored-by: Akira Wong <[email protected]>
julian-hj added a commit that referenced this issue Feb 8, 2022
update CFServiceInstance and CFServiceBinding

[finishes #549]
julian-hj added a commit that referenced this issue Feb 8, 2022
- cfservicebinding_controller_test and cfserviceinstance_controller_test
  had variables not getting re-initialized between test runs, causing
  flakiness.

  #549

Co-authored-by: Julian Hjortshoj <[email protected]>
julian-hj added a commit that referenced this issue Feb 8, 2022
- cfservicebinding_controller_test and cfserviceinstance_controller_test
  had variables not getting re-initialized between test runs, causing
  flakiness.

  #549

Co-authored-by: Julian Hjortshoj <[email protected]>
davewalter added a commit that referenced this issue Feb 8, 2022
Fix cross test contamination in controller units
@tcdowney
Copy link
Member Author

Closing: This was completed by PRs #631 and #628 and passed acceptance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

5 participants