mirror of
https://github.com/lukaszraczylo/kubernetes-images-sync-operator.git
synced 2026-06-08 23:09:23 +00:00
Add ability to include/exclude namespaces.
This commit is contained in:
@@ -28,13 +28,14 @@ import (
|
||||
// +kubebuilder:printcolumn:name="Path",type="string",JSONPath=".spec.exportPath"
|
||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
|
||||
type ClusterImageSpec struct {
|
||||
Image string `json:"image,omitempty"`
|
||||
Tag string `json:"tag,omitempty"`
|
||||
Sha string `json:"sha,omitempty"`
|
||||
FullName string `json:"fullName,omitempty"` // Because I'm lazy and it's easier to pull that way
|
||||
Storage string `json:"storage,omitempty"`
|
||||
ExportName string `json:"exportName"`
|
||||
ExportPath string `json:"exportPath,omitempty"`
|
||||
Image string `json:"image,omitempty"`
|
||||
Tag string `json:"tag,omitempty"`
|
||||
Sha string `json:"sha,omitempty"`
|
||||
FullName string `json:"fullName,omitempty"` // Because I'm lazy and it's easier to pull that way
|
||||
Storage string `json:"storage,omitempty"`
|
||||
ExportName string `json:"exportName"`
|
||||
ExportPath string `json:"exportPath,omitempty"`
|
||||
ImageNamespace string `json:"imageNamespace,omitempty"`
|
||||
}
|
||||
|
||||
// ClusterImageStatus defines the observed state of ClusterImage
|
||||
|
||||
@@ -54,7 +54,9 @@ type ClusterImageExportSpec struct {
|
||||
// Exclude images which contain these strings
|
||||
Excludes []string `json:"excludes,omitempty"`
|
||||
// Include only images which contain these strings
|
||||
Includes []string `json:"includes,omitempty"`
|
||||
Includes []string `json:"includes,omitempty"`
|
||||
Namespaces []string `json:"namespaces,omitempty"`
|
||||
ExcludedNamespaces []string `json:"excludedNamespaces,omitempty"`
|
||||
// Base path for the export - both file and S3
|
||||
// +kubebuilder:validation:MinLength=1
|
||||
// +kubebuilder:validation:MaxLength=255
|
||||
|
||||
@@ -124,6 +124,16 @@ func (in *ClusterImageExportSpec) DeepCopyInto(out *ClusterImageExportSpec) {
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Namespaces != nil {
|
||||
in, out := &in.Namespaces, &out.Namespaces
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.ExcludedNamespaces != nil {
|
||||
in, out := &in.ExcludedNamespaces, &out.ExcludedNamespaces
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
out.Storage = in.Storage
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user