Change SourceRef to use CrossNamespaceSourceReference
This commit is contained in:
parent
ea627e3448
commit
c113c2043f
|
@ -50,8 +50,7 @@ type KustomizationSpec struct {
|
||||||
// +required
|
// +required
|
||||||
Prune bool `json:"prune"`
|
Prune bool `json:"prune"`
|
||||||
|
|
||||||
// A list of workloads (Deployments, DaemonSets and StatefulSets)
|
// A list of resources to be included in the health assessment.
|
||||||
// to be included in the health assessment.
|
|
||||||
// +optional
|
// +optional
|
||||||
HealthChecks []CrossNamespaceObjectReference `json:"healthChecks,omitempty"`
|
HealthChecks []CrossNamespaceObjectReference `json:"healthChecks,omitempty"`
|
||||||
|
|
||||||
|
@ -61,7 +60,7 @@ type KustomizationSpec struct {
|
||||||
|
|
||||||
// Reference of the source where the kustomization file is.
|
// Reference of the source where the kustomization file is.
|
||||||
// +required
|
// +required
|
||||||
SourceRef CrossNamespaceObjectReference `json:"sourceRef"`
|
SourceRef CrossNamespaceSourceReference `json:"sourceRef"`
|
||||||
|
|
||||||
// This flag tells the controller to suspend subsequent kustomize executions,
|
// This flag tells the controller to suspend subsequent kustomize executions,
|
||||||
// it does not apply to already started executions. Defaults to false.
|
// it does not apply to already started executions. Defaults to false.
|
||||||
|
|
|
@ -35,3 +35,24 @@ type CrossNamespaceObjectReference struct {
|
||||||
// +optional
|
// +optional
|
||||||
Namespace string `json:"namespace,omitempty"`
|
Namespace string `json:"namespace,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CrossNamespaceSourceReference contains enough information to let you locate the
|
||||||
|
// typed referenced object at cluster level
|
||||||
|
type CrossNamespaceSourceReference struct {
|
||||||
|
// API version of the referent
|
||||||
|
// +optional
|
||||||
|
APIVersion string `json:"apiVersion,omitempty"`
|
||||||
|
|
||||||
|
// Kind of the referent
|
||||||
|
// +kubebuilder:validation:Enum=GitRepository
|
||||||
|
// +required
|
||||||
|
Kind string `json:"kind"`
|
||||||
|
|
||||||
|
// Name of the referent
|
||||||
|
// +required
|
||||||
|
Name string `json:"name"`
|
||||||
|
|
||||||
|
// Namespace of the referent
|
||||||
|
// +optional
|
||||||
|
Namespace string `json:"namespace,omitempty"`
|
||||||
|
}
|
||||||
|
|
|
@ -57,6 +57,21 @@ func (in *CrossNamespaceObjectReference) DeepCopy() *CrossNamespaceObjectReferen
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
|
func (in *CrossNamespaceSourceReference) DeepCopyInto(out *CrossNamespaceSourceReference) {
|
||||||
|
*out = *in
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrossNamespaceSourceReference.
|
||||||
|
func (in *CrossNamespaceSourceReference) DeepCopy() *CrossNamespaceSourceReference {
|
||||||
|
if in == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
out := new(CrossNamespaceSourceReference)
|
||||||
|
in.DeepCopyInto(out)
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
func (in *Decryption) DeepCopyInto(out *Decryption) {
|
func (in *Decryption) DeepCopyInto(out *Decryption) {
|
||||||
*out = *in
|
*out = *in
|
||||||
|
|
|
@ -133,6 +133,8 @@ spec:
|
||||||
type: string
|
type: string
|
||||||
kind:
|
kind:
|
||||||
description: Kind of the referent
|
description: Kind of the referent
|
||||||
|
enum:
|
||||||
|
- GitRepository
|
||||||
type: string
|
type: string
|
||||||
name:
|
name:
|
||||||
description: Name of the referent
|
description: Name of the referent
|
||||||
|
|
Loading…
Reference in New Issue