From 667b9d79599f3fe03c6ee439d51145d9734e54b2 Mon Sep 17 00:00:00 2001 From: Raghavendra Talur Date: Mon, 16 Sep 2024 16:32:52 -0400 Subject: [PATCH] add generated files Signed-off-by: Raghavendra Talur --- api/v1alpha1/zz_generated.deepcopy.go | 88 +++--- .../bases/ramendr.openshift.io_recipes.yaml | 252 +++++++++++++----- 2 files changed, 241 insertions(+), 99 deletions(-) diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 5bcf406..29acfb5 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -28,11 +28,6 @@ import ( // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Check) DeepCopyInto(out *Check) { *out = *in - if in.Timeout != nil { - in, out := &in.Timeout, &out.Timeout - *out = new(v1.Duration) - **out = **in - } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Check. @@ -68,16 +63,36 @@ func (in *Group) DeepCopyInto(out *Group) { *out = new(bool) **out = **in } + if in.IncludedNamespacesByLabel != nil { + in, out := &in.IncludedNamespacesByLabel, &out.IncludedNamespacesByLabel + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) + } if in.IncludedNamespaces != nil { in, out := &in.IncludedNamespaces, &out.IncludedNamespaces *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) + } + if in.RestoreStatus != nil { + in, out := &in.RestoreStatus, &out.RestoreStatus + *out = new(GroupRestoreStatus) + (*in).DeepCopyInto(*out) + } if in.Essential != nil { in, out := &in.Essential, &out.Essential *out = new(bool) **out = **in } + if in.RestoreOverwriteResources != nil { + in, out := &in.RestoreOverwriteResources, &out.RestoreOverwriteResources + *out = new(bool) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Group. @@ -90,6 +105,31 @@ func (in *Group) DeepCopy() *Group { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GroupRestoreStatus) DeepCopyInto(out *GroupRestoreStatus) { + *out = *in + if in.IncludedResources != nil { + in, out := &in.IncludedResources, &out.IncludedResources + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ExcludedResources != nil { + in, out := &in.ExcludedResources, &out.ExcludedResources + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupRestoreStatus. +func (in *GroupRestoreStatus) DeepCopy() *GroupRestoreStatus { + if in == nil { + return nil + } + out := new(GroupRestoreStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Hook) DeepCopyInto(out *Hook) { *out = *in @@ -98,11 +138,6 @@ func (in *Hook) DeepCopyInto(out *Hook) { *out = new(v1.LabelSelector) (*in).DeepCopyInto(*out) } - if in.Timeout != nil { - in, out := &in.Timeout, &out.Timeout - *out = new(v1.Duration) - **out = **in - } if in.Ops != nil { in, out := &in.Ops, &out.Ops *out = make([]*Operation, len(*in)) @@ -110,7 +145,7 @@ func (in *Hook) DeepCopyInto(out *Hook) { if (*in)[i] != nil { in, out := &(*in)[i], &(*out)[i] *out = new(Operation) - (*in).DeepCopyInto(*out) + **out = **in } } } @@ -121,7 +156,7 @@ func (in *Hook) DeepCopyInto(out *Hook) { if (*in)[i] != nil { in, out := &(*in)[i], &(*out)[i] *out = new(Check) - (*in).DeepCopyInto(*out) + **out = **in } } } @@ -145,16 +180,6 @@ func (in *Hook) DeepCopy() *Hook { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Operation) DeepCopyInto(out *Operation) { *out = *in - if in.Command != nil { - in, out := &in.Command, &out.Command - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Timeout != nil { - in, out := &in.Timeout, &out.Timeout - *out = new(v1.Duration) - **out = **in - } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Operation. @@ -256,15 +281,16 @@ func (in *RecipeSpec) DeepCopyInto(out *RecipeSpec) { } } } - if in.CaptureWorkflow != nil { - in, out := &in.CaptureWorkflow, &out.CaptureWorkflow - *out = new(Workflow) - (*in).DeepCopyInto(*out) - } - if in.RecoverWorkflow != nil { - in, out := &in.RecoverWorkflow, &out.RecoverWorkflow - *out = new(Workflow) - (*in).DeepCopyInto(*out) + if in.Workflows != nil { + in, out := &in.Workflows, &out.Workflows + *out = make([]*Workflow, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(Workflow) + (*in).DeepCopyInto(*out) + } + } } } diff --git a/config/crd/bases/ramendr.openshift.io_recipes.yaml b/config/crd/bases/ramendr.openshift.io_recipes.yaml index 4508215..8629d8e 100644 --- a/config/crd/bases/ramendr.openshift.io_recipes.yaml +++ b/config/crd/bases/ramendr.openshift.io_recipes.yaml @@ -44,31 +44,6 @@ spec: Type of application the recipe is designed for. (AppType is not used yet. For now, we will match the name of the app CR) type: string - captureWorkflow: - description: The sequence of actions to capture data to protect from - disaster - properties: - failOn: - default: any-error - description: 'Implies behaviour in case of failure: any-error - (default), essential-error, full-error' - enum: - - any-error - - essential-error - - full-error - type: string - sequence: - description: |- - List of the names of groups or hooks, in the order in which they should be executed - Format: : [/] - items: - additionalProperties: - type: string - type: object - type: array - required: - - sequence - type: object groups: description: List of one or multiple groups items: @@ -86,6 +61,11 @@ spec: description: Defaults to true, if set to false, a failure is not necessarily handled as fatal type: boolean + excludedNamespaces: + description: List of namespace to exclude + items: + type: string + type: array excludedResourceTypes: description: List of resource types to exclude items: @@ -101,6 +81,50 @@ spec: items: type: string type: array + includedNamespacesByLabel: + description: Selects namespaces by label + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic includedResourceTypes: description: List of resource types to include. If unspecified, all resource types are included. @@ -164,6 +188,27 @@ spec: parent group is represented by the implicit default group of Application CR (implies the Application CR does not specify groups explicitly). type: string + restoreOverwriteResources: + description: Whether to overwrite resources during restore. + Default to false. + type: boolean + restoreStatus: + description: RestoreStatus restores status if set to all the + includedResources specified. Specify '*' to restore all statuses + for all the CRs + properties: + excludedResources: + description: List of resource types to exclude. + items: + type: string + type: array + includedResources: + description: List of resource types to include. If unspecified, + all resource types are included. + items: + type: string + type: array + type: object selectResource: description: Determines the resource type which the fields labelSelector and nameSelector apply to for selecting PVCs. Default selection @@ -211,9 +256,9 @@ spec: true. Defaults to Fail. type: string timeout: - description: How long to wait for the check to execute - format: duration - type: string + description: How long to wait for the check to execute, + in seconds + type: integer required: - name type: object @@ -296,10 +341,8 @@ spec: properties: command: description: The command to execute - items: - type: string - minItems: 1 - type: array + minLength: 1 + type: string container: description: The container where the command should be executed @@ -317,9 +360,9 @@ spec: exit code. Defaults to Fail. type: string timeout: - description: How long to wait for the command to execute - format: duration - type: string + description: How long to wait for the command to execute, + in seconds + type: integer required: - command - name @@ -330,10 +373,6 @@ spec: x-kubernetes-list-type: map selectResource: description: Resource type to that a hook applies to - enum: - - pod - - deployment - - statefulset type: string singlePodOnly: description: |- @@ -341,10 +380,9 @@ spec: match the selector type: boolean timeout: - description: Default timeout applied to custom and built-in - operations. If not specified, equals to 30s. - format: duration - type: string + description: Default timeout in seconds applied to custom and + built-in operations. If not specified, equals to 30s. + type: integer type: description: Hook type enum: @@ -354,37 +392,13 @@ spec: type: string required: - name + - namespace - type type: object type: array x-kubernetes-list-map-keys: - name x-kubernetes-list-type: map - recoverWorkflow: - description: The sequence of actions to recover data protected from - disaster - properties: - failOn: - default: any-error - description: 'Implies behaviour in case of failure: any-error - (default), essential-error, full-error' - enum: - - any-error - - essential-error - - full-error - type: string - sequence: - description: |- - List of the names of groups or hooks, in the order in which they should be executed - Format: : [/] - items: - additionalProperties: - type: string - type: object - type: array - required: - - sequence - type: object volumes: description: Volumes to protect from disaster properties: @@ -397,6 +411,11 @@ spec: description: Defaults to true, if set to false, a failure is not necessarily handled as fatal type: boolean + excludedNamespaces: + description: List of namespace to exclude + items: + type: string + type: array excludedResourceTypes: description: List of resource types to exclude items: @@ -412,6 +431,50 @@ spec: items: type: string type: array + includedNamespacesByLabel: + description: Selects namespaces by label + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic includedResourceTypes: description: List of resource types to include. If unspecified, all resource types are included. @@ -475,6 +538,26 @@ spec: parent group is represented by the implicit default group of Application CR (implies the Application CR does not specify groups explicitly). type: string + restoreOverwriteResources: + description: Whether to overwrite resources during restore. Default + to false. + type: boolean + restoreStatus: + description: RestoreStatus restores status if set to all the includedResources + specified. Specify '*' to restore all statuses for all the CRs + properties: + excludedResources: + description: List of resource types to exclude. + items: + type: string + type: array + includedResources: + description: List of resource types to include. If unspecified, + all resource types are included. + items: + type: string + type: array + type: object selectResource: description: Determines the resource type which the fields labelSelector and nameSelector apply to for selecting PVCs. Default selection @@ -496,6 +579,39 @@ spec: - name - type type: object + workflows: + description: Workflow is the sequence of actions to take + items: + description: Workflow is the sequence of actions to take + properties: + failOn: + default: any-error + description: 'Implies behaviour in case of failure: any-error + (default), essential-error, full-error' + enum: + - any-error + - essential-error + - full-error + type: string + name: + description: |- + Name of recipe. Names "backup" and "restore" are reserved and implicitly used by default for + backup or restore respectively + type: string + sequence: + description: |- + List of the names of groups or hooks, in the order in which they should be executed + Format: : [/] + items: + additionalProperties: + type: string + type: object + type: array + required: + - name + - sequence + type: object + type: array required: - appType type: object