Merge pull request #1823 from briansonnenberg/main

Add `unmanagedMetadata` to canary service specification
This commit is contained in:
Stefan Prodan
2025-10-15 09:52:08 +03:00
committed by GitHub
8 changed files with 260 additions and 4 deletions

View File

@@ -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

View File

@@ -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
}