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

Release in Ready state before connection details are available #81

Closed
srueg opened this issue Mar 25, 2021 · 2 comments · Fixed by #82
Closed

Release in Ready state before connection details are available #81

srueg opened this issue Mar 25, 2021 · 2 comments · Fixed by #82
Labels
bug Something isn't working

Comments

@srueg
Copy link
Contributor

srueg commented Mar 25, 2021

What happened?

Using the connectionDetails feature (#73) we read the IP of a LoadBalancer service. Unfortunately the Release resource goes to a ready state before the info was read and therefore the connection detail is missing.

How can we reproduce it?

Create a Release which reads the IP of a service:

connectionDetails:
  - apiVersion: v1
    fieldPath: status.loadBalancer.ingress[0].ip
    kind: Service
    name: haproxy
    namespace: b6d9f1ac-d636-44df-a538-5d0cc2a12e9b
    toConnectionSecretKey: endpoint

What environment did it happen in?

Crossplane version: v1.1.0
provider-helm version: v0.5.0

@srueg srueg added the bug Something isn't working label Mar 25, 2021
@srueg
Copy link
Contributor Author

srueg commented Mar 25, 2021

We should probably skip setting the Release to available here? https://github.com/crossplane-contrib/provider-helm/blob/master/pkg/controller/release/release.go#L313

@turkenh
Copy link
Collaborator

turkenh commented Mar 25, 2021

I think, this behaviour is expected since it is consistent with helm itself. For example, if you install a chart that creates a load balancer, helm installation returns success once all resources created on k8s API and the release is marked as done unless you set --wait.

I see two possible solutions/workarounds here:

  • Set wait: true in release spec.
  • Build the wait logic on the consumer part, who waits for connection details.

Stating this, I could also not see an immediate problem with removing the line you pointed 🤔

srueg added a commit to srueg/provider-helm that referenced this issue Mar 25, 2021
Only mark a release as available once all connection details are ready.

Fixes crossplane-contrib#81

Signed-off-by: Simon Rüegg <simon@rueggs.ch>
srueg added a commit to srueg/provider-helm that referenced this issue Mar 25, 2021
Only mark a release as available once all connection details are ready.

Fixes crossplane-contrib#81

Signed-off-by: Simon Rüegg <simon@rueggs.ch>
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

Successfully merging a pull request may close this issue.

2 participants