Skip to content

Commit

Permalink
fix from reviwe
Browse files Browse the repository at this point in the history
  • Loading branch information
koba1t committed Aug 11, 2022
1 parent 90231f4 commit 16a10df
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions api/types/kustomization.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,14 @@ type Kustomization struct {
// CommonAnnotations to add to all objects.
CommonAnnotations map[string]string `json:"commonAnnotations,omitempty" yaml:"commonAnnotations,omitempty"`

// Deprecated: Replace with the Patches.
// PatchesStrategicMerge specifies the relative path to a file
// containing a strategic merge patch. Format documented at
// https://github.com/kubernetes/community/blob/master/contributors/devel/sig-api-machinery/strategic-merge-patch.md
// URLs and globs are not supported.
PatchesStrategicMerge []PatchStrategicMerge `json:"patchesStrategicMerge,omitempty" yaml:"patchesStrategicMerge,omitempty"`

// Deprecated: Replace with the Patches.
// JSONPatches is a list of JSONPatch for applying JSON patch.
// Format documented at https://tools.ietf.org/html/rfc6902
// and http://jsonpatch.com
Expand All @@ -88,6 +90,7 @@ type Kustomization struct {
// specification. This can also be done with a patch.
Replicas []Replica `json:"replicas,omitempty" yaml:"replicas,omitempty"`

// Deprecated: It will remove in future release.
// Vars allow things modified by kustomize to be injected into a
// kubernetes object specification. A var is a name (e.g. FOO) associated
// with a field in a specific resource instance. The field must
Expand Down Expand Up @@ -116,7 +119,7 @@ type Kustomization struct {
// CRDs themselves are not modified.
Crds []string `json:"crds,omitempty" yaml:"crds,omitempty"`

// Deprecated.
// Deprecated: Replace with the Resources.
// Anything that would have been specified here should
// be specified in the Resources field instead.
Bases []string `json:"bases,omitempty" yaml:"bases,omitempty"`
Expand Down Expand Up @@ -173,10 +176,12 @@ type Kustomization struct {
}

const (
deprecatedBaseWarningMessage = "# Warning: bases was deprecated, Please use 'resources' or try `kustomize edit fix`."
deprecatedPatchesJson6902Message = "# Warning: patchesJson6902 is deprecated, Please use 'patches' or try `kustomize edit fix`."
deprecatedPatchesStrategicMergeMessage = "# Warning: patchesStrategicMerge is deprecated, Please use 'patches'."
deprecatedVarsMessage = "# Warning: vars is deprecated, Please use 'replacements'."
deprecatedWarningToRunEditFix = "# Warning: Run 'kustomize edit fix' to update your Kustomization automatically."
deprecatedWarningToRunEditFixExperimential = "# Warning: [EXPERIMENTAL]Run 'kustomize edit fix' to update your Kustomization automatically."
deprecatedBaseWarningMessage = "# Warning: 'bases' is deprecated. Please use 'resources' instead." + "\n" + deprecatedWarningToRunEditFix
deprecatedPatchesJson6902Message = "# Warning: 'patchesJson6902' is deprecated. Please use 'patches' instead." + "\n" + deprecatedWarningToRunEditFix
deprecatedPatchesStrategicMergeMessage = "# Warning: 'patchesStrategicMerge' is deprecated. Please use 'patches' instead." + "\n" + deprecatedWarningToRunEditFix
deprecatedVarsMessage = "# Warning: 'vars' is deprecated. Please use 'replacements' instead." + "\n" + deprecatedWarningToRunEditFixExperimential
)

// CheckDeprecatedFields check deprecated field is used or not.
Expand Down

0 comments on commit 16a10df

Please sign in to comment.