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 always says a Secret is available/ready even if Secret isnt present #257

Open
gmrodgers opened this issue Nov 21, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@gmrodgers
Copy link

gmrodgers commented Nov 21, 2022

Bug description

When I create ServiceBinding where:

  • the workload is a Pod that exists
  • I've provided the correct RBAC for reading service
  • the service is a Secret that doesn't exist

I get Ready=True

Expected behaviour

I getReady=False, the service does not exist.

Steps to reproduce the bug

$ kubectl run nginx --image=nginx --restart=Never

$ kapply() { kaf <(echo "$1") } # func for convenience

$ kapply '# iterate-stk-secret-reader.yaml
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: stk-secret-reader
  labels:
    servicebinding.io/controller: "true"
rules:
- apiGroups: [""]
  resources: ["secrets", "pods" ]
  verbs: ["get", "list", "watch"]'

$ kapply 'apiVersion: servicebinding.io/v1beta1
kind: ServiceBinding
metadata:
  name: test-sb
spec:
  name: database
  service:
    apiVersion: v1
    kind: Secret
    name: test
  workload:
    apiVersion: v1
    kind: Pod
    name: nginx'

$ kubectl get secrets        
No resources found in default namespace.

$ kubectl get servicebinding         
NAME      READY   REASON   AGE
test-sb   True    Ready    6m55s

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

Definitely in 0.7.2 of this, unsure what versions are affecred.

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

I observed it in Kind

@gmrodgers gmrodgers added the bug Something isn't working label Nov 21, 2022
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

1 participant