diff --git a/api/v1beta1/git.go b/api/v1beta1/git.go index 5d4eb69..0924bb7 100644 --- a/api/v1beta1/git.go +++ b/api/v1beta1/git.go @@ -95,4 +95,10 @@ type PushSpec struct { // https://git-scm.com/book/en/v2/Git-Internals-The-Refspec // +optional Refspec string `json:"refspec,omitempty"` + + // Options specifies the push options that are sent to the Git + // server when performing a push operation. For details, see: + // https://git-scm.com/docs/git-push#Documentation/git-push.txt---push-optionltoptiongt + // +optional + Options map[string]string `json:"options,omitempty"` } diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go index 5757cdb..c5bc7b4 100644 --- a/api/v1beta1/zz_generated.deepcopy.go +++ b/api/v1beta1/zz_generated.deepcopy.go @@ -105,7 +105,7 @@ func (in *GitSpec) DeepCopyInto(out *GitSpec) { if in.Push != nil { in, out := &in.Push, &out.Push *out = new(PushSpec) - **out = **in + (*in).DeepCopyInto(*out) } } @@ -239,6 +239,13 @@ func (in *ImageUpdateAutomationStatus) DeepCopy() *ImageUpdateAutomationStatus { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PushSpec) DeepCopyInto(out *PushSpec) { *out = *in + if in.Options != nil { + in, out := &in.Options, &out.Options + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PushSpec. diff --git a/config/crd/bases/image.toolkit.fluxcd.io_imageupdateautomations.yaml b/config/crd/bases/image.toolkit.fluxcd.io_imageupdateautomations.yaml index d27da14..464bc0d 100644 --- a/config/crd/bases/image.toolkit.fluxcd.io_imageupdateautomations.yaml +++ b/config/crd/bases/image.toolkit.fluxcd.io_imageupdateautomations.yaml @@ -135,6 +135,13 @@ spec: to the branch named. The branch is created using `.spec.checkout.branch` as the starting point, if it doesn't already exist. type: string + options: + additionalProperties: + type: string + description: 'Options specifies the push options that are + sent to the Git server when performing a push operation. + For details, see: https://git-scm.com/docs/git-push#Documentation/git-push.txt---push-optionltoptiongt' + type: object refspec: description: 'Refspec specifies the Git Refspec to use for a push operation. If both Branch and Refspec are provided, diff --git a/docs/api/v1beta1/image-automation.md b/docs/api/v1beta1/image-automation.md index 6c5ebfa..21fdedc 100644 --- a/docs/api/v1beta1/image-automation.md +++ b/docs/api/v1beta1/image-automation.md @@ -660,6 +660,20 @@ For more details about Git Refspecs, see: https://git-scm.com/book/en/v2/Git-Internals-The-Refspec
+options
Options specifies the push options that are sent to the Git +server when performing a push operation. For details, see: +https://git-scm.com/docs/git-push#Documentation/git-push.txt—push-optionltoptiongt
+