Documentation ¶
Overview ¶
Copyright 2022 Google LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Rename ¶
func Rename(object *fn.KubeObject, newName string, newNamespace string, objects fn.KubeObjects) error
Rename will rename/renamespace an object, and will update all references to it found in the specified objects. This is a convenience wrapper around RenameSpec.
Types ¶
type RenameSpec ¶
type RenameSpec struct { OldName string `json:"oldName"` Name string `json:"name"` OldNamespace string `json:"oldNamespace,omitempty"` Namespace string `json:"namespace,omitempty"` // TODO: Accept group instead of group+version? APIVersion string `json:"apiVersion"` Kind string `json:"kind"` IgnoreObjectNotFound bool `json:"ignoreObjectNotFound"` }
RenameSpec describes an object rename where references to that object are also updated.
func (*RenameSpec) LoadConfig ¶
func (f *RenameSpec) LoadConfig(fnConfig *fn.KubeObject) error
LoadConfig parses the configuration from a specified KubeObject.
func (*RenameSpec) Transform ¶
func (f *RenameSpec) Transform(objects fn.KubeObjects) error
Transform runs the Rename operation.
func (*RenameSpec) Validate ¶
func (f *RenameSpec) Validate() error
Validate verifies that required fields are set.