Documentation
¶
Overview ¶
Copyright © 2020 Sam Chinellato <samuele.chinellato@bt.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright © 2020 Sam Chinellato <samuele.chinellato@bt.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright © 2020 Sam Chinellato <samuele.chinellato@bt.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
- func AddTrailingSlash(dirname string) string
- func ApplyGVKUnstructuredObjMap(mapper meta.RESTMapper, dynamicSet dynamic.Interface, ...) bool
- func DirToBytes(dirname string) ([][]byte, error)
- func Execute()
- func FileBytesToUnstructuredObjGVKMap(decoder *yamlutil.YAMLOrJSONDecoder, fileByte []byte) map[*schema.GroupVersionKind]*unstructured.Unstructured
- func FileCheck(filename string) os.FileInfo
- func FileToBytes(filename string) ([]byte, error)
- func K8sApply(dynamicResourceInterface dynamic.ResourceInterface, ...) bool
- func K8sDelete(mapper meta.RESTMapper, groupVersionKind *schema.GroupVersionKind, ...)
- func SyncGVKUnstructuredObjMapToK8s(gvkUnstructuredObjMap map[*schema.GroupVersionKind]*unstructured.Unstructured, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddTrailingSlash ¶
func AddTrailingSlash(dirname string) string
AddTrailingSlash takes a string and adds a trailing slash if not found
func ApplyGVKUnstructuredObjMap ¶
func ApplyGVKUnstructuredObjMap(mapper meta.RESTMapper,
dynamicSet dynamic.Interface,
groupVersionKind *schema.GroupVersionKind,
unstructuredObj *unstructured.Unstructured) bool
ApplyGVKUnstructuredObjMap iterates a map of gvk[unstructuredObj] and applies the object to k8s
func DirToBytes ¶
func DirToBytes(dirname string) ([][]byte, error)
DirToBytes takes a directory as string ang returns an array of byt Arrays
func FileBytesToUnstructuredObjGVKMap ¶
func FileBytesToUnstructuredObjGVKMap(decoder *yamlutil.YAMLOrJSONDecoder, fileByte []byte) map[*schema.GroupVersionKind]*unstructured.Unstructured
FileBytesToUnstructuredObjGVKMap takes a yaml Decoder and file bytes and returns a map of gvk[unstructuredObj]
func FileCheck ¶
func FileCheck(filename string) os.FileInfo
FileCheck returns a os.FileInfo object if file is found
func FileToBytes ¶
func FileToBytes(filename string) ([]byte, error)
FileToBytes takes in a string and returns a byte array
func K8sApply ¶
func K8sApply(dynamicResourceInterface dynamic.ResourceInterface, unstructuredObj *unstructured.Unstructured) bool
K8sApply applies a given resource interface and unstructured object to k8s. retryObj = true if some dependencies are not found.
func K8sDelete ¶
func K8sDelete(mapper meta.RESTMapper, groupVersionKind *schema.GroupVersionKind, dynamicSet dynamic.Interface, unstructuredObj *unstructured.Unstructured)
K8sDelete Takes in a mapper, gvk and Ustructured obj and applies it against the cluster.
func SyncGVKUnstructuredObjMapToK8s ¶
func SyncGVKUnstructuredObjMapToK8s(
gvkUnstructuredObjMap map[*schema.GroupVersionKind]*unstructured.Unstructured,
mapper meta.RESTMapper,
dynamicSet dynamic.Interface,
interval int)
SyncGVKUnstructuredObjMapToK8s reapplies objects that failed due to not found dependencies
Types ¶
This section is empty.