Skip to content

Commit 9a2bf6f

Browse files
K8SPG-771 | Backup concurrency guard improvements (#1520)
* fix backup concurrency protection Signed-off-by: Mayank Shah <mayank.shah@percona.com> * fail the backup if feature gate disabled Signed-off-by: Mayank Shah <mayank.shah@percona.com> * wait for snapshot finalizer before releasing lease Signed-off-by: Mayank Shah <mayank.shah@percona.com> --------- Signed-off-by: Mayank Shah <mayank.shah@percona.com>
1 parent 256c310 commit 9a2bf6f

11 files changed

Lines changed: 935 additions & 387 deletions

File tree

build/crd/percona/generated/pgv2.percona.com_perconapgbackups.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,62 @@ spec:
313313
completed:
314314
format: date-time
315315
type: string
316+
conditions:
317+
items:
318+
description: Condition contains details for one aspect of the current
319+
state of this API Resource.
320+
properties:
321+
lastTransitionTime:
322+
description: |-
323+
lastTransitionTime is the last time the condition transitioned from one status to another.
324+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
325+
format: date-time
326+
type: string
327+
message:
328+
description: |-
329+
message is a human readable message indicating details about the transition.
330+
This may be an empty string.
331+
maxLength: 32768
332+
type: string
333+
observedGeneration:
334+
description: |-
335+
observedGeneration represents the .metadata.generation that the condition was set based upon.
336+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
337+
with respect to the current state of the instance.
338+
format: int64
339+
minimum: 0
340+
type: integer
341+
reason:
342+
description: |-
343+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
344+
Producers of specific condition types may define expected values and meanings for this field,
345+
and whether the values are considered a guaranteed API.
346+
The value should be a CamelCase string.
347+
This field may not be empty.
348+
maxLength: 1024
349+
minLength: 1
350+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
351+
type: string
352+
status:
353+
description: status of the condition, one of True, False, Unknown.
354+
enum:
355+
- "True"
356+
- "False"
357+
- Unknown
358+
type: string
359+
type:
360+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
361+
maxLength: 316
362+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
363+
type: string
364+
required:
365+
- lastTransitionTime
366+
- message
367+
- reason
368+
- status
369+
- type
370+
type: object
371+
type: array
316372
crVersion:
317373
type: string
318374
destination:

config/crd/bases/pgv2.percona.com_perconapgclusters.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,62 @@ spec:
312312
completed:
313313
format: date-time
314314
type: string
315+
conditions:
316+
items:
317+
description: Condition contains details for one aspect of the current
318+
state of this API Resource.
319+
properties:
320+
lastTransitionTime:
321+
description: |-
322+
lastTransitionTime is the last time the condition transitioned from one status to another.
323+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
324+
format: date-time
325+
type: string
326+
message:
327+
description: |-
328+
message is a human readable message indicating details about the transition.
329+
This may be an empty string.
330+
maxLength: 32768
331+
type: string
332+
observedGeneration:
333+
description: |-
334+
observedGeneration represents the .metadata.generation that the condition was set based upon.
335+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
336+
with respect to the current state of the instance.
337+
format: int64
338+
minimum: 0
339+
type: integer
340+
reason:
341+
description: |-
342+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
343+
Producers of specific condition types may define expected values and meanings for this field,
344+
and whether the values are considered a guaranteed API.
345+
The value should be a CamelCase string.
346+
This field may not be empty.
347+
maxLength: 1024
348+
minLength: 1
349+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
350+
type: string
351+
status:
352+
description: status of the condition, one of True, False, Unknown.
353+
enum:
354+
- "True"
355+
- "False"
356+
- Unknown
357+
type: string
358+
type:
359+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
360+
maxLength: 316
361+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
362+
type: string
363+
required:
364+
- lastTransitionTime
365+
- message
366+
- reason
367+
- status
368+
- type
369+
type: object
370+
type: array
315371
crVersion:
316372
type: string
317373
destination:

deploy/bundle.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,62 @@ spec:
607607
completed:
608608
format: date-time
609609
type: string
610+
conditions:
611+
items:
612+
description: Condition contains details for one aspect of the current
613+
state of this API Resource.
614+
properties:
615+
lastTransitionTime:
616+
description: |-
617+
lastTransitionTime is the last time the condition transitioned from one status to another.
618+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
619+
format: date-time
620+
type: string
621+
message:
622+
description: |-
623+
message is a human readable message indicating details about the transition.
624+
This may be an empty string.
625+
maxLength: 32768
626+
type: string
627+
observedGeneration:
628+
description: |-
629+
observedGeneration represents the .metadata.generation that the condition was set based upon.
630+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
631+
with respect to the current state of the instance.
632+
format: int64
633+
minimum: 0
634+
type: integer
635+
reason:
636+
description: |-
637+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
638+
Producers of specific condition types may define expected values and meanings for this field,
639+
and whether the values are considered a guaranteed API.
640+
The value should be a CamelCase string.
641+
This field may not be empty.
642+
maxLength: 1024
643+
minLength: 1
644+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
645+
type: string
646+
status:
647+
description: status of the condition, one of True, False, Unknown.
648+
enum:
649+
- "True"
650+
- "False"
651+
- Unknown
652+
type: string
653+
type:
654+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
655+
maxLength: 316
656+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
657+
type: string
658+
required:
659+
- lastTransitionTime
660+
- message
661+
- reason
662+
- status
663+
- type
664+
type: object
665+
type: array
610666
crVersion:
611667
type: string
612668
destination:

deploy/crd.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,62 @@ spec:
607607
completed:
608608
format: date-time
609609
type: string
610+
conditions:
611+
items:
612+
description: Condition contains details for one aspect of the current
613+
state of this API Resource.
614+
properties:
615+
lastTransitionTime:
616+
description: |-
617+
lastTransitionTime is the last time the condition transitioned from one status to another.
618+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
619+
format: date-time
620+
type: string
621+
message:
622+
description: |-
623+
message is a human readable message indicating details about the transition.
624+
This may be an empty string.
625+
maxLength: 32768
626+
type: string
627+
observedGeneration:
628+
description: |-
629+
observedGeneration represents the .metadata.generation that the condition was set based upon.
630+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
631+
with respect to the current state of the instance.
632+
format: int64
633+
minimum: 0
634+
type: integer
635+
reason:
636+
description: |-
637+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
638+
Producers of specific condition types may define expected values and meanings for this field,
639+
and whether the values are considered a guaranteed API.
640+
The value should be a CamelCase string.
641+
This field may not be empty.
642+
maxLength: 1024
643+
minLength: 1
644+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
645+
type: string
646+
status:
647+
description: status of the condition, one of True, False, Unknown.
648+
enum:
649+
- "True"
650+
- "False"
651+
- Unknown
652+
type: string
653+
type:
654+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
655+
maxLength: 316
656+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
657+
type: string
658+
required:
659+
- lastTransitionTime
660+
- message
661+
- reason
662+
- status
663+
- type
664+
type: object
665+
type: array
610666
crVersion:
611667
type: string
612668
destination:

deploy/cw-bundle.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,62 @@ spec:
607607
completed:
608608
format: date-time
609609
type: string
610+
conditions:
611+
items:
612+
description: Condition contains details for one aspect of the current
613+
state of this API Resource.
614+
properties:
615+
lastTransitionTime:
616+
description: |-
617+
lastTransitionTime is the last time the condition transitioned from one status to another.
618+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
619+
format: date-time
620+
type: string
621+
message:
622+
description: |-
623+
message is a human readable message indicating details about the transition.
624+
This may be an empty string.
625+
maxLength: 32768
626+
type: string
627+
observedGeneration:
628+
description: |-
629+
observedGeneration represents the .metadata.generation that the condition was set based upon.
630+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
631+
with respect to the current state of the instance.
632+
format: int64
633+
minimum: 0
634+
type: integer
635+
reason:
636+
description: |-
637+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
638+
Producers of specific condition types may define expected values and meanings for this field,
639+
and whether the values are considered a guaranteed API.
640+
The value should be a CamelCase string.
641+
This field may not be empty.
642+
maxLength: 1024
643+
minLength: 1
644+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
645+
type: string
646+
status:
647+
description: status of the condition, one of True, False, Unknown.
648+
enum:
649+
- "True"
650+
- "False"
651+
- Unknown
652+
type: string
653+
type:
654+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
655+
maxLength: 316
656+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
657+
type: string
658+
required:
659+
- lastTransitionTime
660+
- message
661+
- reason
662+
- status
663+
- type
664+
type: object
665+
type: array
610666
crVersion:
611667
type: string
612668
destination:

0 commit comments

Comments
 (0)