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

ServiceBinding does not set to Ready=False or Unknown if the service is not a ProvisionedService #254

Open
gmrodgers opened this issue Nov 16, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@gmrodgers
Copy link

Bug description
Pointing ServiceBinding at a a service which isn't a ProvisionedService should lead to at least one condition according to the binding spec https://github.com/servicebinding/spec#ready-condition-status. At the moment there's no conditions.

It just sets to "" in my case.

Expected behavior

Set Ready=False or Ready=Unknown.

Steps to reproduce the bug

Create ServiceBinding (with appropriate read RBAC) and point it at a service that does not follow the binding spec.

**Version (Tanzu Application Platform verision, K8s version) **

Tried with latest 0.8.1 of binding spec

Environment where the bug was observed (cloud, OS, etc)

Any k8s.

Relevant Debug Output (Logs, etc)

@gmrodgers gmrodgers added the bug Something isn't working label Nov 16, 2022
@gmrodgers gmrodgers changed the title ServiceBinding does not set to Ready=False of the service is not a ProvisionedService ServiceBinding does not set to Ready=False or Unknown if the service is not a ProvisionedService Nov 16, 2022
@ChunyiLyu
Copy link

I cannot reproduce this issue with v0.9.1. I tried creating:

apiVersion: servicebinding.io/v1beta1
kind: ServiceBinding
metadata:
  name: account-service

spec:
  service:
    apiVersion: v1
    kind: Secret
    name: prod-account-service-secret
  workload:
    apiVersion: apps/v1
    kind: Deployment
    name: online-banking

with no service and workload created, I saw status condition Ready being set to False:

apiVersion: servicebinding.io/v1beta1
kind: ServiceBinding
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"servicebinding.io/v1beta1","kind":"ServiceBinding","metadata":{"annotations":{},"name":"account-service","namespace":"apps"},"spec":{"service":{"apiVersion":"v1","kind":"Secret","name":"prod-account-service-secret"},"workload":{"apiVersion":"apps/v1","kind":"Deployment","name":"online-banking"}}}
  creationTimestamp: "2023-08-23T15:40:27Z"
  generation: 1
  name: account-service
  namespace: apps
  resourceVersion: "2738584"
  uid: dd8d920f-fb40-417c-b400-f08c372de07f
spec:
  name: account-service
  service:
    apiVersion: v1
    kind: Secret
    name: prod-account-service-secret
  workload:
    apiVersion: apps/v1
    kind: Deployment
    name: online-banking
status:
  binding:
    name: prod-account-service-secret
  conditions:
  - lastTransitionTime: "2023-08-23T15:40:28Z"
    message: deployments.apps "online-banking" not found
    reason: ProjectionReadyWorkloadMissing
    status: "False"
    type: Ready
  - lastTransitionTime: "2023-08-23T15:40:27Z"
    message: ""
    reason: Available
    status: "True"
    type: ServiceAvailable
  - lastTransitionTime: "2023-08-23T15:40:28Z"
    message: deployments.apps "online-banking" not found
    reason: WorkloadMissing
    status: "False"
    type: ProjectionReady
  observedGeneration: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants