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

Service deployment with hooks are still waiting #2288

Closed
enrichman opened this issue May 8, 2023 · 2 comments · Fixed by #2364
Closed

Service deployment with hooks are still waiting #2288

enrichman opened this issue May 8, 2023 · 2 comments · Fixed by #2364
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@enrichman
Copy link
Member

Ref: #2136

Describe the bug
Trying to deploy a service containing a Helm hook will still apparently hang the CLI because of how Helm hooks work: https://helm.sh/docs/topics/charts_hooks/

There is a feature request on Helm on how they will address this, but still under development: helm/helm#10555

We can think about doing the installation in background (goroutine?) without the client waiting.

To Reproduce
Try to deploy a service with an hanging Job/hook: https://github.com/enrichman/helm-charts/tree/main/charts/simplejob

apiVersion: application.epinio.io/v1
kind: Service
metadata:
  name: simplejob
  namespace: {{ .Release.Namespace }}
spec:
  name: simplejob
  shortDescription: A simplejob
  description: |
    This simplejob
  chart: simplejob
  chartVersion: 0.0.1
  appVersion: 0.0.1
  helmRepo:
    name: enrichman
    url: https://enrichman.github.io/helm-charts
  values: |-
    {{- template "epinio.catalog-service-values" . }}

Installing this service will wait for the Job completion.

Expected behavior
Without the --wait flag I'm expecting the CLI to exit immediately without waiting for the service deployment.

@enrichman enrichman added the kind/bug Something isn't working label May 8, 2023
@enrichman enrichman added this to the v1.9.0 milestone May 10, 2023
@enrichman enrichman self-assigned this Jun 5, 2023
@enrichman enrichman linked a pull request Jun 5, 2023 that will close this issue
@thehejik
Copy link
Contributor

thehejik commented Jul 3, 2023

Tested as follows prior v1.9.0 release:

TL;DR - works as expected

  • created a custom service catalog entry using enrico's helmchart with hooked job:
cat <<EOF | kubectl apply -f -
apiVersion: application.epinio.io/v1
kind: Service
metadata:
  name: simplejob
  namespace: epinio
spec:
  name: simplejob
  shortDescription: A simplejob
  description: |
    This simplejob
  chart: simplejob
  chartVersion: 0.0.2
  appVersion: 0.0.2
  helmRepo:
    name: enrichman
    url: https://enrichman.github.io/helm-charts
  values: |-
    help: me
EOF
  • deploy the service on epinio v1.8.1 to reproduce the issue:
epinio service create simplejob smp2

🚢  Creating Service...
Catalog: simplejob
Service: smp2
Wait For Completion: false

❌  error creating service: service create failed: Internal Server Error: error deploying service helm chart: failed post-install: timed out waiting for the condition
  • update to latest epinio-server by make patch-epinio-deployment
  • deploy the service on updated epinio
 ./dist/epinio-linux-amd64 service create simplejob smp4

🚢  Creating Service...
Catalog: simplejob
Service: smp4
Wait For Completion: false

The service creation command doesn't hang anymore and returns immediately, but anyway the service won't be deployed because the job is waiting for 9999d to finish.

@thehejik
Copy link
Contributor

thehejik commented Jul 4, 2023

Verified in Epinio v1.9.0-rc3 according to the report above - all good

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

Successfully merging a pull request may close this issue.

2 participants