Feat: add GitOps CLI module with complete functionalities.#59
Merged
Conversation
This reverts commit c56b0eb.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
gitopsmodule to the Harness CLI covering the five nouns from harness/cli#29.Issue #29 verb matrix
gitops_agentinstallupdategitops_cluster-f--setdeferredgitops_repository-f/--setgitops_application-f/--setsync,refreshgitops_application_set-f/--setexecute:syncWhat this PR adds
Module & wiring
pkg/spec/gitops.spec.yaml— nouns, fields, 28 commandsmodules/gitops/gitops.go—execute gitops_agent:installworkflow (Helm/YAML artifact fetch)cmd/harness/main-harness.goCRUD (spec-only)
-fYAML/applicationset+agentIdentifierquery param); server-assigned UUID--setround-tripUpdate UX (
--set/get-then-put)update gitops_repository—--set name,repo_url,typeupdate gitops_application—--set target_revision,path,namespace,repo_urlupdate gitops_application_set—--set name(separateget_pathfor GET vs PUT)update gitops_cluster—-fonly; doc note that--setis unsupportedEngine fix
pkg/registry/endpoint.go— applyyaml_excludeduringget-then-putso read-only GET fields (e.g.status, maskedpassword) are not sent on PUTTest plan
-fregression on all three update commands aboveharness create/update/deleteround-trip for cluster, repository, application_setharness execute gitops_application:syncand:refreshharness execute gitops_agent:install <id> --output_file install.yamlCloses #29