-
Notifications
You must be signed in to change notification settings - Fork 153
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
Implement update profile
to patch a profile's HelmRelease
#1445
Conversation
- Add cobra CLI command func and required flags - Refactor Add Profile func to re-use some functionality for Update Profile - Add acceptance test
- Refactor profiles funcs to fail if profiles.yaml contains no HelmReleases - Refactor func that appends HelmRelease to file so that update fails if HelmRelease does not exist
update profile
to patch a profile's HelmReleaseupdate profile
to patch a profile's HelmRelease
a3ebaf6
to
39e2b04
Compare
update profile
to patch a profile's HelmReleaseupdate profile
to patch a profile's HelmRelease
39e2b04
to
62de952
Compare
67be697
to
5860e00
Compare
5860e00
to
90d5840
Compare
90d5840
to
ff9b92e
Compare
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.
lgtm couple comments
ff9b92e
to
cd0746d
Compare
pkg/helm/releases.go
Outdated
@@ -37,3 +43,58 @@ func MakeHelmRelease(name, version, cluster, namespace string, helmRepository ty | |||
}, | |||
} | |||
} | |||
|
|||
// AppendHelmReleaseToString appends a HelmRelease to a string. |
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.
:D Can you be a tiny bit more descriptive please? :) Why? How? What's the purpose of the append?
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.
Well done! :)
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.
LGTM 🎉
e54bb98
to
28a502e
Compare
…n app with long name'
Closes: #1138
What changed?
This PR implements
gitops update profile
.Why?
Minimum/required flags:
gitops update profile --name=podinfo --cluster=prod --config-repo=ssh://[email protected]/owner/config-repo.git --version=6.0.0
Optional flags:
--namespace
defaults towego-system
--version
defaults tolatest
--profiles-port
for the Profiles API port--auto-merge
--kubeconfig
Implementation Notes
add profile
to reuse some of its functionality.HelmReleases
(separated by---
) directly into a list ofHelmReleases
, rather than[][]bytes
.strings.Builder
to append the new and existingHelmRelease
s as a string to write theprofiles.yaml
file's content.How did you test it?
Install
gitops
on a local kind cluster. Then, add a profile to the cluster:Wait for the pod to appear in the cluster. Wait for ~5 minutes (likely because the Github API caches the results). Then update the profile installation's version:
Example PR: https://github.com/nikimanoledaki/fun-times/pull/22
Release notes
Documentation Changes