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

Provide a helm chart package #594

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

Conversation

babykart
Copy link
Contributor

@babykart babykart commented Aug 15, 2024

The process could be something like the following:

1 - new release of garnet
2 - increment the helm chart version (chart version and application version)
3 - generate the README.md using the command helm-docs charts/garnet
4 - commit and push to the main branch will trigger the helm-chart github workflow that will package the chart and push it to the helm-charts subdirectory in the Microsoft namespace of the github registry.

From my point of view, there is still a documentation page missing that recalls the commands of the README.md and calls the link to the description of the values.

PS - Feel free to update ...

@darrenge
Copy link
Contributor

FYI - I won't be able to review this until mid next week.

@darrenge
Copy link
Contributor

I have not used Helm charts so I am ramping up on what they all entail, so I might be asking basic questions.

Looking at these:
1 - new release of garnet
2 - increment the helm chart version (chart version and application version)

Question: We wouldn't need to change the "release" of Garnet would we? https://github.com/microsoft/garnet/blob/main/.azure/pipelines/azure-pipelines-external-release.yml

Also ... where is the helm chart version and application version? We would have to increment those manually, right?

@babykart
Copy link
Contributor Author

babykart commented Aug 24, 2024

I have not used Helm charts so I am ramping up on what they all entail, so I might be asking basic questions.

Looking at these:
1 - new release of garnet
2 - increment the helm chart version (chart version and application version)

Question: We wouldn't need to change the "release" of Garnet would we? https://github.com/microsoft/garnet/blob/main/.azure/pipelines/azure-pipelines-external-release.yml

No, indeed.

Also ... where is the helm chart version and application version? We would have to increment those manually, right?

The helm chart version and the application version (the tag of the docker/oci image) are in the Chart.yaml file.
You are right: currently these versions have to be incremented manually.
This workflow only packages the helm chart and pushes it into the OCI registry.

@badrishc
Copy link
Contributor

@badrishc
Copy link
Contributor

badrishc commented Sep 3, 2024

Update the comment here to indicate what we need to change as part of every Garnet release:

@babykart - ping on this.

@babykart
Copy link
Contributor Author

babykart commented Sep 3, 2024

@badrishc Sorry but I wasn't notified on your previous comment.
It's done.

@darrenge
Copy link
Contributor

darrenge commented Sep 5, 2024

I saw this comment "update \charts\garnet\Chart.yaml (~line 5 & 6) and generate \charts\garnet\README.md with helm-docs --
NOTE".

  1. You don't need the "-- NOTE" on the end
  2. Is it Chart.yml or helm-chart.YML? Note too - it is ".yml" and not ".yaml"
  3. Assuming it is helm-chart.Yml --- there is no version number to manually update on line 5 or 6? If it isn't manually updating a version string, then please specify exactly what is needed.

@babykart
Copy link
Contributor Author

babykart commented Sep 5, 2024

I saw this comment "update \charts\garnet\Chart.yaml (~line 5 & 6) and generate \charts\garnet\README.md with helm-docs -- NOTE".

1. You don't need the "-- NOTE" on the end

Fixed by 683744f

2. Is it Chart.yml or helm-chart.YML?  Note too - it is ".yml" and not ".yaml"

https://github.com/microsoft/garnet/blob/main/charts/garnet/Chart.yaml#L5-L6

3. Assuming it is helm-chart.Yml --- there is no version number to manually update on line 5 or 6?  If it isn't manually updating a version string, then please specify exactly what is needed.

https://github.com/microsoft/garnet/blob/main/charts/garnet/Chart.yaml#L5-L6

@darrenge
Copy link
Contributor

darrenge commented Sep 5, 2024

Thanks for your quick response. For this part "and generate \charts\garnet\README.md with helm-docs." what does that all entail? Would the process (as you see it) be:

  1. Update string on in .azure/pipelines/azure-pipelines-external-release.yml with latest version of the nuget package (e.g. 1.0.0)
  2. Update \libs\host\GarnetServer.cs readonly string version (~line 45) -- NOTE - these two values need to be the same
  3. Update \libs\host\GarnetServer.cs readonly string version (~line 45) -- NOTE - these two values need to be the same
  4. Update \charts\garnet\Chart.yaml (~line 5 & 6) (just increment by 1 - should be same as #2 and #3 should these numbers be same?)
  5. Generate \charts\garnet\README.md with helm-docs. How?
  6. Push all these changes to main
  7. Run the release pipeline (azure-pipelines-external-release.yml)

@babykart
Copy link
Contributor Author

babykart commented Sep 5, 2024

On a first iteration and with the aim of having the helm chart process integrated by the teams, I imagined the following process:

  1. Keep the actual process with azure pipeline as it,
  2. When the tag (ie. v1.0.19) is pushed, it will trigger the github workflows that build and push the docker images (required for the helm chart)
  3. Update \charts\garnet\Chart.yaml : the version corresponds to the helm chart version and the appVersion to the tag of the docker image (1.0.19).
    Well, appVersion 1.018 -> 1.019, increment the same digit in the helm chart version : 0.1.1 -> 0.1.2
  4. Generate the \charts\garnet\README.md with the command helm-docs charts/garnet (required https://github.com/norwoodj/helm-docs)
  5. Commit and push to the main branch that will trigger the github workflow (helm package & helm push artifact.)

Actually, the helm chart only implements a standalone deployment but tomorrow we decide to merge a PR that implements the cluster deployment and obviously we want to really release the helm chart (version: 1.0.0):

  1. Update \charts\garnet\Chart.yaml: appVersion is unchanged but the version 0.1.2 will be incremented to the first digit: 1.0.0
  2. Generate the \charts\garnet\README.md with the command helm-docs charts/garnet (required https://github.com/norwoodj/helm-docs)
  3. Commit and push to the main branch that will trigger the github workflow (helm package & helm push artifact.)

Once the helm chart is considered by the teams as a finalized release, we could configure a workflow doing 1), 2) & 3) after the successful docker workflows for every new Garnet release.

@darrenge
Copy link
Contributor

darrenge commented Sep 6, 2024

Thanks for the extra info. This is not as straight forward to me as I originally thought it would be. The big hurdle is I don't know Helm Chart and I will have to install and learn it. Therefore, I can't approve this at this point. I will try to find time in the coming days to understand things better.

Signed-off-by: babykart <[email protected]>
Signed-off-by: babykart <[email protected]>
Signed-off-by: babykart <[email protected]>
Signed-off-by: babykart <[email protected]>
Signed-off-by: babykart <[email protected]>
Signed-off-by: babykart <[email protected]>
@babykart
Copy link
Contributor Author

@darrenge Should i consider this PR as abandoned?

@badrishc
Copy link
Contributor

@darrenge Should i consider this PR as abandoned?

We definitely still want this functionality as it appears many people use Helm charts in open source. Do you think this PR does everything necessary for Helm chart support in Garnet (with automated updates when main is updated), or is there more work to be done. There isn't anyone yet on the team with expertise in this so we will have to depend on OSS contributors such as yourself for now. Thanks!

@darrenge
Copy link
Contributor

Sorry - I didn't see the question in this PR. I agree with what Badrish is saying.

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.

3 participants