Skip to content

Commit 6d5ca02

Browse files
authored
Fixes inconsistent JSON tags (#934)
1 parent 5a0ab52 commit 6d5ca02

8 files changed

+237
-237
lines changed

apis/cluster/v1beta1/zz_generated.deepcopy.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/placement/v1beta1/clusterresourceplacement_types.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ type ApplyStrategy struct {
461461
// +kubebuilder:default=PartialComparison
462462
// +kubebuilder:validation:Enum=PartialComparison;FullComparison
463463
// +kubebuilder:validation:Optional
464-
ComparisonOption ComparisonOptionType `json:"compareOption,omitempty"`
464+
ComparisonOption ComparisonOptionType `json:"comparisonOption,omitempty"`
465465

466466
// WhenToApply controls when Fleet would apply the manifests on the hub cluster to the member
467467
// clusters.
@@ -600,7 +600,7 @@ type ApplyStrategy struct {
600600
// +kubebuilder:default=Always
601601
// +kubebuilder:validation:Enum=Always;IfNoDiff
602602
// +kubebuilder:validation:Optional
603-
WhenToTakeOver WhenToTakeOverType `json:"actionType,omitempty"`
603+
WhenToTakeOver WhenToTakeOverType `json:"whenToTakeOver,omitempty"`
604604
}
605605

606606
// ComparisonOptionType describes the compare option that Fleet uses to detect drifts and/or

apis/placement/v1beta1/zz_generated.deepcopy.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/v1alpha1/zz_generated.deepcopy.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/placement.kubernetes-fleet.io_clusterresourcebindings.yaml

+58-58
Original file line numberDiff line numberDiff line change
@@ -428,71 +428,14 @@ spec:
428428
ApplyStrategy describes how to resolve the conflict if the resource to be placed already exists in the target cluster
429429
and is owned by other appliers.
430430
properties:
431-
actionType:
432-
default: Always
433-
description: |-
434-
WhenToTakeOver determines the action to take when Fleet applies resources to a member
435-
cluster for the first time and finds out that the resource already exists in the cluster.
436-
437-
438-
This setting is most relevant in cases where you would like Fleet to manage pre-existing
439-
resources on a member cluster.
440-
441-
442-
Available options include:
443-
444-
445-
* Always: with this action, Fleet will apply the hub cluster manifests to the member
446-
clusters even if the affected resources already exist. This is the default action.
447-
448-
449-
Note that this might lead to fields being overwritten on the member clusters, if they
450-
are specified in the hub cluster manifests.
451-
452-
453-
* IfNoDiff: with this action, Fleet will apply the hub cluster manifests to the member
454-
clusters if (and only if) pre-existing resources look the same as the hub cluster manifests.
455-
This is a safer option as pre-existing resources that are inconsistent with the hub cluster
456-
manifests will not be overwritten; in fact, Fleet will ignore them until the inconsistencies
457-
are resolved properly: any change you make to the hub cluster manifests would not be
458-
applied, and if you delete the manifests or even the ClusterResourcePlacement itself
459-
from the hub cluster, these pre-existing resources would not be taken away.
460-
461-
462-
Fleet will check for inconsistencies in accordance with the ComparisonOption setting. See also
463-
the comments on the ComparisonOption field for more information.
464-
465-
466-
If a diff has been found in a field that is **managed** by Fleet (i.e., the field
467-
**is specified ** in the hub cluster manifest), consider one of the following actions:
468-
* set the field in the member cluster to be of the same value as that in the hub cluster
469-
manifest.
470-
* update the hub cluster manifest so that its field value matches with that in the member
471-
cluster.
472-
* switch to the Always action, which will allow Fleet to overwrite the field with the
473-
value in the hub cluster manifest.
474-
475-
476-
If a diff has been found in a field that is **not managed** by Fleet (i.e., the field
477-
**is not specified** in the hub cluster manifest), consider one of the following actions:
478-
* remove the field from the member cluster.
479-
* update the hub cluster manifest so that the field is included in the hub cluster manifest.
480-
481-
482-
If appropriate, you may also delete the object from the member cluster; Fleet will recreate
483-
it using the hub cluster manifest.
484-
enum:
485-
- Always
486-
- IfNoDiff
487-
type: string
488431
allowCoOwnership:
489432
description: |-
490433
AllowCoOwnership defines whether to apply the resource if it already exists in the target cluster and is not
491434
solely owned by fleet (i.e., metadata.ownerReferences contains only fleet custom resources).
492435
If true, apply the resource and add fleet as a co-owner.
493436
If false, leave the resource unchanged and fail the apply.
494437
type: boolean
495-
compareOption:
438+
comparisonOption:
496439
default: PartialComparison
497440
description: |-
498441
ComparisonOption controls how Fleet compares the desired state of a resource, as kept in
@@ -651,6 +594,63 @@ spec:
651594
- Always
652595
- IfNotDrifted
653596
type: string
597+
whenToTakeOver:
598+
default: Always
599+
description: |-
600+
WhenToTakeOver determines the action to take when Fleet applies resources to a member
601+
cluster for the first time and finds out that the resource already exists in the cluster.
602+
603+
604+
This setting is most relevant in cases where you would like Fleet to manage pre-existing
605+
resources on a member cluster.
606+
607+
608+
Available options include:
609+
610+
611+
* Always: with this action, Fleet will apply the hub cluster manifests to the member
612+
clusters even if the affected resources already exist. This is the default action.
613+
614+
615+
Note that this might lead to fields being overwritten on the member clusters, if they
616+
are specified in the hub cluster manifests.
617+
618+
619+
* IfNoDiff: with this action, Fleet will apply the hub cluster manifests to the member
620+
clusters if (and only if) pre-existing resources look the same as the hub cluster manifests.
621+
This is a safer option as pre-existing resources that are inconsistent with the hub cluster
622+
manifests will not be overwritten; in fact, Fleet will ignore them until the inconsistencies
623+
are resolved properly: any change you make to the hub cluster manifests would not be
624+
applied, and if you delete the manifests or even the ClusterResourcePlacement itself
625+
from the hub cluster, these pre-existing resources would not be taken away.
626+
627+
628+
Fleet will check for inconsistencies in accordance with the ComparisonOption setting. See also
629+
the comments on the ComparisonOption field for more information.
630+
631+
632+
If a diff has been found in a field that is **managed** by Fleet (i.e., the field
633+
**is specified ** in the hub cluster manifest), consider one of the following actions:
634+
* set the field in the member cluster to be of the same value as that in the hub cluster
635+
manifest.
636+
* update the hub cluster manifest so that its field value matches with that in the member
637+
cluster.
638+
* switch to the Always action, which will allow Fleet to overwrite the field with the
639+
value in the hub cluster manifest.
640+
641+
642+
If a diff has been found in a field that is **not managed** by Fleet (i.e., the field
643+
**is not specified** in the hub cluster manifest), consider one of the following actions:
644+
* remove the field from the member cluster.
645+
* update the hub cluster manifest so that the field is included in the hub cluster manifest.
646+
647+
648+
If appropriate, you may also delete the object from the member cluster; Fleet will recreate
649+
it using the hub cluster manifest.
650+
enum:
651+
- Always
652+
- IfNoDiff
653+
type: string
654654
type: object
655655
clusterDecision:
656656
description: ClusterDecision explains why the scheduler selected this

config/crd/bases/placement.kubernetes-fleet.io_clusterresourceplacements.yaml

+58-58
Original file line numberDiff line numberDiff line change
@@ -1756,71 +1756,14 @@ spec:
17561756
description: ApplyStrategy describes when and how to apply the
17571757
selected resources to the target cluster.
17581758
properties:
1759-
actionType:
1760-
default: Always
1761-
description: |-
1762-
WhenToTakeOver determines the action to take when Fleet applies resources to a member
1763-
cluster for the first time and finds out that the resource already exists in the cluster.
1764-
1765-
1766-
This setting is most relevant in cases where you would like Fleet to manage pre-existing
1767-
resources on a member cluster.
1768-
1769-
1770-
Available options include:
1771-
1772-
1773-
* Always: with this action, Fleet will apply the hub cluster manifests to the member
1774-
clusters even if the affected resources already exist. This is the default action.
1775-
1776-
1777-
Note that this might lead to fields being overwritten on the member clusters, if they
1778-
are specified in the hub cluster manifests.
1779-
1780-
1781-
* IfNoDiff: with this action, Fleet will apply the hub cluster manifests to the member
1782-
clusters if (and only if) pre-existing resources look the same as the hub cluster manifests.
1783-
This is a safer option as pre-existing resources that are inconsistent with the hub cluster
1784-
manifests will not be overwritten; in fact, Fleet will ignore them until the inconsistencies
1785-
are resolved properly: any change you make to the hub cluster manifests would not be
1786-
applied, and if you delete the manifests or even the ClusterResourcePlacement itself
1787-
from the hub cluster, these pre-existing resources would not be taken away.
1788-
1789-
1790-
Fleet will check for inconsistencies in accordance with the ComparisonOption setting. See also
1791-
the comments on the ComparisonOption field for more information.
1792-
1793-
1794-
If a diff has been found in a field that is **managed** by Fleet (i.e., the field
1795-
**is specified ** in the hub cluster manifest), consider one of the following actions:
1796-
* set the field in the member cluster to be of the same value as that in the hub cluster
1797-
manifest.
1798-
* update the hub cluster manifest so that its field value matches with that in the member
1799-
cluster.
1800-
* switch to the Always action, which will allow Fleet to overwrite the field with the
1801-
value in the hub cluster manifest.
1802-
1803-
1804-
If a diff has been found in a field that is **not managed** by Fleet (i.e., the field
1805-
**is not specified** in the hub cluster manifest), consider one of the following actions:
1806-
* remove the field from the member cluster.
1807-
* update the hub cluster manifest so that the field is included in the hub cluster manifest.
1808-
1809-
1810-
If appropriate, you may also delete the object from the member cluster; Fleet will recreate
1811-
it using the hub cluster manifest.
1812-
enum:
1813-
- Always
1814-
- IfNoDiff
1815-
type: string
18161759
allowCoOwnership:
18171760
description: |-
18181761
AllowCoOwnership defines whether to apply the resource if it already exists in the target cluster and is not
18191762
solely owned by fleet (i.e., metadata.ownerReferences contains only fleet custom resources).
18201763
If true, apply the resource and add fleet as a co-owner.
18211764
If false, leave the resource unchanged and fail the apply.
18221765
type: boolean
1823-
compareOption:
1766+
comparisonOption:
18241767
default: PartialComparison
18251768
description: |-
18261769
ComparisonOption controls how Fleet compares the desired state of a resource, as kept in
@@ -1979,6 +1922,63 @@ spec:
19791922
- Always
19801923
- IfNotDrifted
19811924
type: string
1925+
whenToTakeOver:
1926+
default: Always
1927+
description: |-
1928+
WhenToTakeOver determines the action to take when Fleet applies resources to a member
1929+
cluster for the first time and finds out that the resource already exists in the cluster.
1930+
1931+
1932+
This setting is most relevant in cases where you would like Fleet to manage pre-existing
1933+
resources on a member cluster.
1934+
1935+
1936+
Available options include:
1937+
1938+
1939+
* Always: with this action, Fleet will apply the hub cluster manifests to the member
1940+
clusters even if the affected resources already exist. This is the default action.
1941+
1942+
1943+
Note that this might lead to fields being overwritten on the member clusters, if they
1944+
are specified in the hub cluster manifests.
1945+
1946+
1947+
* IfNoDiff: with this action, Fleet will apply the hub cluster manifests to the member
1948+
clusters if (and only if) pre-existing resources look the same as the hub cluster manifests.
1949+
This is a safer option as pre-existing resources that are inconsistent with the hub cluster
1950+
manifests will not be overwritten; in fact, Fleet will ignore them until the inconsistencies
1951+
are resolved properly: any change you make to the hub cluster manifests would not be
1952+
applied, and if you delete the manifests or even the ClusterResourcePlacement itself
1953+
from the hub cluster, these pre-existing resources would not be taken away.
1954+
1955+
1956+
Fleet will check for inconsistencies in accordance with the ComparisonOption setting. See also
1957+
the comments on the ComparisonOption field for more information.
1958+
1959+
1960+
If a diff has been found in a field that is **managed** by Fleet (i.e., the field
1961+
**is specified ** in the hub cluster manifest), consider one of the following actions:
1962+
* set the field in the member cluster to be of the same value as that in the hub cluster
1963+
manifest.
1964+
* update the hub cluster manifest so that its field value matches with that in the member
1965+
cluster.
1966+
* switch to the Always action, which will allow Fleet to overwrite the field with the
1967+
value in the hub cluster manifest.
1968+
1969+
1970+
If a diff has been found in a field that is **not managed** by Fleet (i.e., the field
1971+
**is not specified** in the hub cluster manifest), consider one of the following actions:
1972+
* remove the field from the member cluster.
1973+
* update the hub cluster manifest so that the field is included in the hub cluster manifest.
1974+
1975+
1976+
If appropriate, you may also delete the object from the member cluster; Fleet will recreate
1977+
it using the hub cluster manifest.
1978+
enum:
1979+
- Always
1980+
- IfNoDiff
1981+
type: string
19821982
type: object
19831983
rollingUpdate:
19841984
description: Rolling update config params. Present only if RolloutStrategyType

0 commit comments

Comments
 (0)