Skip to content

Commit

Permalink
Fixes inconsistent JSON tags (#934)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelawyu authored Oct 23, 2024
1 parent 5a0ab52 commit 6d5ca02
Show file tree
Hide file tree
Showing 8 changed files with 237 additions and 237 deletions.
2 changes: 1 addition & 1 deletion apis/cluster/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions apis/placement/v1beta1/clusterresourceplacement_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ type ApplyStrategy struct {
// +kubebuilder:default=PartialComparison
// +kubebuilder:validation:Enum=PartialComparison;FullComparison
// +kubebuilder:validation:Optional
ComparisonOption ComparisonOptionType `json:"compareOption,omitempty"`
ComparisonOption ComparisonOptionType `json:"comparisonOption,omitempty"`

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

// ComparisonOptionType describes the compare option that Fleet uses to detect drifts and/or
Expand Down
2 changes: 1 addition & 1 deletion apis/placement/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -428,71 +428,14 @@ spec:
ApplyStrategy describes how to resolve the conflict if the resource to be placed already exists in the target cluster
and is owned by other appliers.
properties:
actionType:
default: Always
description: |-
WhenToTakeOver determines the action to take when Fleet applies resources to a member
cluster for the first time and finds out that the resource already exists in the cluster.
This setting is most relevant in cases where you would like Fleet to manage pre-existing
resources on a member cluster.
Available options include:
* Always: with this action, Fleet will apply the hub cluster manifests to the member
clusters even if the affected resources already exist. This is the default action.
Note that this might lead to fields being overwritten on the member clusters, if they
are specified in the hub cluster manifests.
* IfNoDiff: with this action, Fleet will apply the hub cluster manifests to the member
clusters if (and only if) pre-existing resources look the same as the hub cluster manifests.
This is a safer option as pre-existing resources that are inconsistent with the hub cluster
manifests will not be overwritten; in fact, Fleet will ignore them until the inconsistencies
are resolved properly: any change you make to the hub cluster manifests would not be
applied, and if you delete the manifests or even the ClusterResourcePlacement itself
from the hub cluster, these pre-existing resources would not be taken away.
Fleet will check for inconsistencies in accordance with the ComparisonOption setting. See also
the comments on the ComparisonOption field for more information.
If a diff has been found in a field that is **managed** by Fleet (i.e., the field
**is specified ** in the hub cluster manifest), consider one of the following actions:
* set the field in the member cluster to be of the same value as that in the hub cluster
manifest.
* update the hub cluster manifest so that its field value matches with that in the member
cluster.
* switch to the Always action, which will allow Fleet to overwrite the field with the
value in the hub cluster manifest.
If a diff has been found in a field that is **not managed** by Fleet (i.e., the field
**is not specified** in the hub cluster manifest), consider one of the following actions:
* remove the field from the member cluster.
* update the hub cluster manifest so that the field is included in the hub cluster manifest.
If appropriate, you may also delete the object from the member cluster; Fleet will recreate
it using the hub cluster manifest.
enum:
- Always
- IfNoDiff
type: string
allowCoOwnership:
description: |-
AllowCoOwnership defines whether to apply the resource if it already exists in the target cluster and is not
solely owned by fleet (i.e., metadata.ownerReferences contains only fleet custom resources).
If true, apply the resource and add fleet as a co-owner.
If false, leave the resource unchanged and fail the apply.
type: boolean
compareOption:
comparisonOption:
default: PartialComparison
description: |-
ComparisonOption controls how Fleet compares the desired state of a resource, as kept in
Expand Down Expand Up @@ -651,6 +594,63 @@ spec:
- Always
- IfNotDrifted
type: string
whenToTakeOver:
default: Always
description: |-
WhenToTakeOver determines the action to take when Fleet applies resources to a member
cluster for the first time and finds out that the resource already exists in the cluster.
This setting is most relevant in cases where you would like Fleet to manage pre-existing
resources on a member cluster.
Available options include:
* Always: with this action, Fleet will apply the hub cluster manifests to the member
clusters even if the affected resources already exist. This is the default action.
Note that this might lead to fields being overwritten on the member clusters, if they
are specified in the hub cluster manifests.
* IfNoDiff: with this action, Fleet will apply the hub cluster manifests to the member
clusters if (and only if) pre-existing resources look the same as the hub cluster manifests.
This is a safer option as pre-existing resources that are inconsistent with the hub cluster
manifests will not be overwritten; in fact, Fleet will ignore them until the inconsistencies
are resolved properly: any change you make to the hub cluster manifests would not be
applied, and if you delete the manifests or even the ClusterResourcePlacement itself
from the hub cluster, these pre-existing resources would not be taken away.
Fleet will check for inconsistencies in accordance with the ComparisonOption setting. See also
the comments on the ComparisonOption field for more information.
If a diff has been found in a field that is **managed** by Fleet (i.e., the field
**is specified ** in the hub cluster manifest), consider one of the following actions:
* set the field in the member cluster to be of the same value as that in the hub cluster
manifest.
* update the hub cluster manifest so that its field value matches with that in the member
cluster.
* switch to the Always action, which will allow Fleet to overwrite the field with the
value in the hub cluster manifest.
If a diff has been found in a field that is **not managed** by Fleet (i.e., the field
**is not specified** in the hub cluster manifest), consider one of the following actions:
* remove the field from the member cluster.
* update the hub cluster manifest so that the field is included in the hub cluster manifest.
If appropriate, you may also delete the object from the member cluster; Fleet will recreate
it using the hub cluster manifest.
enum:
- Always
- IfNoDiff
type: string
type: object
clusterDecision:
description: ClusterDecision explains why the scheduler selected this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1756,71 +1756,14 @@ spec:
description: ApplyStrategy describes when and how to apply the
selected resources to the target cluster.
properties:
actionType:
default: Always
description: |-
WhenToTakeOver determines the action to take when Fleet applies resources to a member
cluster for the first time and finds out that the resource already exists in the cluster.
This setting is most relevant in cases where you would like Fleet to manage pre-existing
resources on a member cluster.
Available options include:
* Always: with this action, Fleet will apply the hub cluster manifests to the member
clusters even if the affected resources already exist. This is the default action.
Note that this might lead to fields being overwritten on the member clusters, if they
are specified in the hub cluster manifests.
* IfNoDiff: with this action, Fleet will apply the hub cluster manifests to the member
clusters if (and only if) pre-existing resources look the same as the hub cluster manifests.
This is a safer option as pre-existing resources that are inconsistent with the hub cluster
manifests will not be overwritten; in fact, Fleet will ignore them until the inconsistencies
are resolved properly: any change you make to the hub cluster manifests would not be
applied, and if you delete the manifests or even the ClusterResourcePlacement itself
from the hub cluster, these pre-existing resources would not be taken away.
Fleet will check for inconsistencies in accordance with the ComparisonOption setting. See also
the comments on the ComparisonOption field for more information.
If a diff has been found in a field that is **managed** by Fleet (i.e., the field
**is specified ** in the hub cluster manifest), consider one of the following actions:
* set the field in the member cluster to be of the same value as that in the hub cluster
manifest.
* update the hub cluster manifest so that its field value matches with that in the member
cluster.
* switch to the Always action, which will allow Fleet to overwrite the field with the
value in the hub cluster manifest.
If a diff has been found in a field that is **not managed** by Fleet (i.e., the field
**is not specified** in the hub cluster manifest), consider one of the following actions:
* remove the field from the member cluster.
* update the hub cluster manifest so that the field is included in the hub cluster manifest.
If appropriate, you may also delete the object from the member cluster; Fleet will recreate
it using the hub cluster manifest.
enum:
- Always
- IfNoDiff
type: string
allowCoOwnership:
description: |-
AllowCoOwnership defines whether to apply the resource if it already exists in the target cluster and is not
solely owned by fleet (i.e., metadata.ownerReferences contains only fleet custom resources).
If true, apply the resource and add fleet as a co-owner.
If false, leave the resource unchanged and fail the apply.
type: boolean
compareOption:
comparisonOption:
default: PartialComparison
description: |-
ComparisonOption controls how Fleet compares the desired state of a resource, as kept in
Expand Down Expand Up @@ -1979,6 +1922,63 @@ spec:
- Always
- IfNotDrifted
type: string
whenToTakeOver:
default: Always
description: |-
WhenToTakeOver determines the action to take when Fleet applies resources to a member
cluster for the first time and finds out that the resource already exists in the cluster.
This setting is most relevant in cases where you would like Fleet to manage pre-existing
resources on a member cluster.
Available options include:
* Always: with this action, Fleet will apply the hub cluster manifests to the member
clusters even if the affected resources already exist. This is the default action.
Note that this might lead to fields being overwritten on the member clusters, if they
are specified in the hub cluster manifests.
* IfNoDiff: with this action, Fleet will apply the hub cluster manifests to the member
clusters if (and only if) pre-existing resources look the same as the hub cluster manifests.
This is a safer option as pre-existing resources that are inconsistent with the hub cluster
manifests will not be overwritten; in fact, Fleet will ignore them until the inconsistencies
are resolved properly: any change you make to the hub cluster manifests would not be
applied, and if you delete the manifests or even the ClusterResourcePlacement itself
from the hub cluster, these pre-existing resources would not be taken away.
Fleet will check for inconsistencies in accordance with the ComparisonOption setting. See also
the comments on the ComparisonOption field for more information.
If a diff has been found in a field that is **managed** by Fleet (i.e., the field
**is specified ** in the hub cluster manifest), consider one of the following actions:
* set the field in the member cluster to be of the same value as that in the hub cluster
manifest.
* update the hub cluster manifest so that its field value matches with that in the member
cluster.
* switch to the Always action, which will allow Fleet to overwrite the field with the
value in the hub cluster manifest.
If a diff has been found in a field that is **not managed** by Fleet (i.e., the field
**is not specified** in the hub cluster manifest), consider one of the following actions:
* remove the field from the member cluster.
* update the hub cluster manifest so that the field is included in the hub cluster manifest.
If appropriate, you may also delete the object from the member cluster; Fleet will recreate
it using the hub cluster manifest.
enum:
- Always
- IfNoDiff
type: string
type: object
rollingUpdate:
description: Rolling update config params. Present only if RolloutStrategyType
Expand Down
Loading

0 comments on commit 6d5ca02

Please sign in to comment.