Skip to content

fix(gitops): support --set/--del for cluster, repository, and application (no -f required) - #209

Open
BlueLabelscotch wants to merge 1 commit into
mainfrom
fix/gitops-file
Open

fix(gitops): support --set/--del for cluster, repository, and application (no -f required)#209
BlueLabelscotch wants to merge 1 commit into
mainfrom
fix/gitops-file

Conversation

@BlueLabelscotch

Copy link
Copy Markdown
Collaborator

Summary

  • Adds flags_builtin.set/del support to create/update gitops_cluster, gitops_repository, and gitops_application, so the major fields (server/connection_type, repo_url/type/connection_type, name/repo_url/path/target_revision/destination_server/namespace) can be set via --set field=value instead of requiring a -f YAML file.
  • file_body on these six commands changes from required to optional — existing -f usage is unaffected (the file always wins over --set when both are given; create_body_init/--set only fill in what the file didn't provide).
  • Update commands additionally support --del field via a new get-then-put merge, with update_body_pick trimmed to just the writable subset of each resource (excludes server-computed fields like connectionState/info/status/operation, which caused a 400: json: cannot unmarshal string into Go value of type map[string]json.RawMessage when naively round-tripped).

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.

1 participant