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
Online Boutique's Helm chart #1353
Conversation
🚲 PR staged at http://35.188.161.244 |
🚲 PR staged at http://35.188.161.244 |
🚲 PR staged at http://35.188.161.244 |
🚲 PR staged at http://35.188.161.244 |
# incremented each time you make changes to the application. Versions are not expected to | ||
# follow Semantic Versioning. They should reflect the version the application is using. | ||
# It is recommended to use it with quotes. | ||
appVersion: "v0.4.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue:
Please add automation to /hack/make-release.sh
such that:
- the versions inside this
Chart.yaml
file are updated. - the file is
git commit
-ed.
Ideally, we would simplify the release process (such that the automation is no longer required), but that would require an audit of docs/demos using Online Boutique.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
🚲 PR staged at http://35.188.161.244 |
1 similar comment
🚲 PR staged at http://35.188.161.244 |
|
||
recommendationservice: | ||
create: true | ||
name: recommendationservice |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought:
What are you thoughts on removing support for variables such as shippingservice.name
and emailservice.name
?
I understand there is a PM that removes the ...service
suffix of each microservice when using Online Boutique — but is there really any value to being able to change the name of microservices?
It also sounds like an edge case.
I am mostly trying to:
- reduce the amount of clutter inside the Helm charts similar to
{{ .Values.shippingservice.name }}
. - reduce the total number of configurations in this Helm chart to simplify the user experience.
To me, the value it adds doesn't seem worth the amount of clutter inside the Helm charts.
What do you think? Am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, building and maintaining an Helm chart is always a compromise of opiniated/hard-coded values versus more variables/parameters/customization. The latter adds more work for the maintainers that's for sure.
In this case, yes because I knew that someone is using Online Boutique this way (change the name of the services), I by design took this into account. I wanted myself do it in my setup/demos in the past, but changing this in the manitests (+ references in other services) was painful, so as the author/maintainer I think that makes sense to have this quick win.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for doing this, Mathieu!
I've made some small commits myself to the mathieu-benoit/helm-chart
branch to reduce back-and-forth.
Failed Testing
I've tested helm template .
It worked. 👍
However, when I ran helm upgrade onlineboutique . --install
, I got the following error:
Error: UPGRADE FAILED: failed to create resource: Deployment in version "v1" cannot be handled as a Deployment: json: cannot unmarshal bool into Go struct field EnvVar.spec.template.spec.containers.env.value of type string
I got the same error for helm upgrade onlineboutique oci://us-docker.pkg.dev/online-boutique-ci/charts/onlineboutique --install
. 🤔
Did it work for you?
Running helm version
gives me:
version.BuildInfo{Version:"v3.9.3", GitCommit:"414ff28d4029ae8c8b05d62aa06c7fe3dee2bc58", GitTreeState:"clean", GoVersion:"go1.17.13"}
I'm doing all this on Cloud Shell with my kubectx
set to a GKE cluster.
Other Concerns
I've left some comments.
My main concerns are:
hack/make-release.sh
- variables for microservice names (e.g.,
.Values.cartservice.name
)
Thanks for your review @NimJay, will tackle your request/feedback later. FYI: I just fixed the issue you faced, |
🚲 PR staged at http://35.188.161.244 |
🚲 PR staged at http://35.188.161.244 |
🚲 PR staged at http://35.188.161.244 |
🚲 PR staged at http://35.188.161.244 |
🚲 PR staged at http://35.188.161.244 |
🚲 PR staged at http://35.188.161.244 |
🚲 PR staged at http://35.188.161.244 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick turn-around, @mathieu-benoit!
My tests worked!
- I ran:
helm upgrade onlineboutique . --install
- I saw:
Release "onlineboutique" has been upgraded. Happy Helming! NAME: onlineboutique LAST DEPLOYED: Thu Dec 8 14:00:28 2022 NAMESPACE: default STATUS: deployed REVISION: 4 TEST SUITE: None NOTES: Get the application URL by running these commands: NOTE: It may take a few minutes for the LoadBalancer IP to be available. You can watch the status of by running 'kubectl get --namespace default svc -w frontend-external' export SERVICE_IP=$(kubectl get svc --namespace default frontend-external --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}") echo http://$SERVICE_IP
- I ran the 3 commands from the output above. All 3 worked! 👍
- I visited the URL for Online Boutique. Worked!
helm upgrade onlineboutique . --install --set frontend.cymbalBranding=true
- I revisited the URL for Online Boutique and saw the Cymbal logo, and successfully checked out my cart.
That UX was amazing! 🤯
🚲 PR staged at http://35.188.161.244 |
1 similar comment
🚲 PR staged at http://35.188.161.244 |
🚲 PR staged at http://35.188.161.244 |
* Create initial Helm chart * currency and email * Complete Helm chart for Online Boutique * cat helm-template.yaml * Add warning about Helm being in experimental mode * Use 2022 for Apache license headers * Link to values.yaml in helm-chart/README.md * Fix issue with bool in env var * Fix issue with bool in env var (take 2/2) * Review naming convention + add externalRedisTlsOrigination * Fix CI issues * Fix CI issue with Sidecar * Add seccompProfile for more security, disable by default * Helm chart push in release process * More elegant and consistent way to automate the Helm chart package/push * Update NOTES.txt * Update NOTES.txt * Update NOTES.txt Co-authored-by: Nim Jayawardena <nimjay@google.com>
Online Boutique's Helm chart - #1319.
You can render the hydrated/generated manifests of this Helm chart from its associated folder:
Or via the manually pushed remote Helm chart:
You can do the same with both for installing it in your cluster:
Or:
Action items:
cd helm-chart
&&helm package .
&&helm push onlineboutique-0.4.2.tgz oci://us-docker.pkg.dev/online-boutique-ci/charts