mirror of
https://github.com/fluxcd/flagger.git
synced 2026-04-15 06:57:34 +00:00
Merge pull request #1823 from briansonnenberg/main
Add `unmanagedMetadata` to canary service specification
This commit is contained in:
@@ -230,6 +230,17 @@ type CanaryService struct {
|
||||
// Canary is the metadata to add to the canary service
|
||||
// +optional
|
||||
Canary *CustomMetadata `json:"canary,omitempty"`
|
||||
|
||||
// UnmanagedMetadata is a list of metadata keys that should be ignored by Flagger.
|
||||
// Flagger will not add, remove or change the value of these annotations.
|
||||
// +optional
|
||||
UnmanagedMetadata *UnmanagedMetadata `json:"unmanagedMetadata,omitempty"`
|
||||
}
|
||||
|
||||
// UnmanagedMetadata is a list of metadata keys that should be ignored by Flagger.
|
||||
type UnmanagedMetadata struct {
|
||||
Annotations []string `json:"annotations,omitempty"`
|
||||
Labels []string `json:"labels,omitempty"`
|
||||
}
|
||||
|
||||
// CanaryAnalysis is used to describe how the analysis should be done
|
||||
|
||||
@@ -452,6 +452,11 @@ func (in *CanaryService) DeepCopyInto(out *CanaryService) {
|
||||
*out = new(CustomMetadata)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.UnmanagedMetadata != nil {
|
||||
in, out := &in.UnmanagedMetadata, &out.UnmanagedMetadata
|
||||
*out = new(UnmanagedMetadata)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -926,3 +931,29 @@ func (in *SessionAffinity) DeepCopy() *SessionAffinity {
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *UnmanagedMetadata) DeepCopyInto(out *UnmanagedMetadata) {
|
||||
*out = *in
|
||||
if in.Annotations != nil {
|
||||
in, out := &in.Annotations, &out.Annotations
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Labels != nil {
|
||||
in, out := &in.Labels, &out.Labels
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnmanagedMetadata.
|
||||
func (in *UnmanagedMetadata) DeepCopy() *UnmanagedMetadata {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(UnmanagedMetadata)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user