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

Nightly update pipeline using Helm deploy #50

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

azgabur
Copy link

@azgabur azgabur commented Oct 30, 2024

Replaces #39
Closes #41

This nightly-update-pipeline can update specified cluster to newest nightly using helm deploy.
The deploy pipeline can install any choosen Kuadrant image on specified cluster.

Done:

  • Add cron job running the pipeline daily
  • Add parameters for specifying image, channel of kuadrant and maybe other variables
  • Refactor to using helm commands instead of bash install script
  • Refactor to using helm commands instead of bash uninstall script (maybe)

@azgabur
Copy link
Author

azgabur commented Oct 31, 2024

Tools do not need redeploy. The helm-install-nightly pipeline can just reinstall kuadrant and keep tools deployed as they were. That needs sparation of tools deploy with kuadrant namespace deployment

Copy link
Contributor

@trepel trepel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@azgabur I haven't tried yet, no real issues just a few questions. I will approve once I will try on clean cluster.

deploy/pipeline-nightly-update.yaml Outdated Show resolved Hide resolved
tasks/02-uninstall.yaml Outdated Show resolved Hide resolved
tasks/02-uninstall.yaml Outdated Show resolved Hide resolved
trepel
trepel previously approved these changes Nov 5, 2024
Copy link
Contributor

@trepel trepel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried both pipelines on a clean cluster several times and it worked - meaning they finished successfully and Kuadrant was installed. LGTM

@trepel
Copy link
Contributor

trepel commented Nov 5, 2024

@azgabur It would be nice to squash commits ;)

name: kube-api
type: string
- description: Istio deployment. Only these values 'sail', 'ossm', 'ossm3'
name: istioProvider
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: istioProvider
name: istio-provider

Comment on lines 23 to 27
- uninstall
- -n=default
- --ignore-not-found
- --wait
- kuadrant-operators
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inline commands are more readable

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I inlined the shorter commands but the helm commands are kinda long and I think it helps readability in that case. I refactored the helm commands to multi-line so maybe its better now?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the helm commands back as they are more readable that way

limits:
cpu: 250m
memory: 128Mi
image: quay.io/rhn_support_azgabur/alpine/k8s:1.31.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you link a :latest image here, so we don't have to update this every time image changes?

name: kube-api
type: string
- description: Kuadrant image url
name: indexImage
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a convention for the names

Suggested change
name: indexImage
name: index-image

- https://github.com/azgabur/kuadrant-helm-install
- $(workspaces.shared-workspace.path)/kuadrant-helm-install
command:
- git
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using /bin/bash everywhere else for the command. I don't see a good reason to juggle between different commands and not to just use bash -c "git ..." with whatever arguments u want

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed back after discussion

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go by the convention on tasks names please e.g. clone-task.yaml, uninstall-kuadrant-task.yaml, etc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rly want pipelines to have independent deployment if possible. Nightly and release pipelines do not require helm tasks to work, so it'll be good to not install them as a collection.

You can try an approach with differently named kustomization files, for different pipelines, or different directory for the helm tasks

Signed-off-by: Alex Zgabur <[email protected]>
@azgabur azgabur force-pushed the deploy branch 7 times, most recently from 40c0ce2 to 68dd606 Compare November 13, 2024 13:52
- name: istio-provider
value: ossm3
- name: kube-api
value: https://kubernetes.default
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The login task has problem with this url - the sed command, can it be fixed in future PR? @averevki

@azgabur
Copy link
Author

azgabur commented Nov 13, 2024

Ready for re-review @trepel @averevki

@azgabur
Copy link
Author

azgabur commented Nov 14, 2024

Now you really really can do re-review :)

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

Successfully merging this pull request may close these issues.

Kuadrant deploy/update using helm and OLM pipeline
3 participants