Documentation ¶
Overview ¶
Copyright 2020 The UnDistro authors
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 ¶
- func ContainsStringInSlice(ss []string, str string) bool
- func CreateOrUpdate(ctx context.Context, r client.Client, o client.Object) (bool, error)
- func GetMachinesForCluster(ctx context.Context, c client.Client, cluster *capi.Cluster) (cp *capi.MachineList, w *capi.MachineList, err error)
- func GetProviderMachinesUnstructured(ctx context.Context, c client.Client, list *capi.MachineList) (*unstructured.UnstructuredList, error)
- func IsControlPlaneMachine(machine *capi.Machine) bool
- func MergeMaps(a, b map[string]interface{}) map[string]interface{}
- func ObjectKeyFromString(str string) client.ObjectKey
- func Ordinalize(n int) string
- func ReleaseRevision(rel *release.Release) int
- func RemoveDuplicateTaints(taints []corev1.Taint) []corev1.Taint
- func ToUnstructured(rawyaml []byte) ([]unstructured.Unstructured, error)
- func ValuesChecksum(values chartutil.Values) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsStringInSlice ¶
func CreateOrUpdate ¶
func GetMachinesForCluster ¶
func GetProviderMachinesUnstructured ¶
func GetProviderMachinesUnstructured(ctx context.Context, c client.Client, list *capi.MachineList) (*unstructured.UnstructuredList, error)
func IsControlPlaneMachine ¶
func MergeMaps ¶
MergeMaps merges map b into given map a and returns the result. It allows overwrites of map values with flat values, and vice versa. This is copied from https://github.com/helm/helm/blob/v3.3.0/pkg/cli/values/options.go#L88, as the public chartutil.CoalesceTables function does not allow overwriting maps with flat values.
func ObjectKeyFromString ¶
func Ordinalize ¶
Ordinalize takes an int and returns the ordinalized version of it. Eg. 1 --> 1st, 103 --> 103rd
func ReleaseRevision ¶
ReleaseRevision returns the revision of the given release.Release.
func RemoveDuplicateTaints ¶ added in v0.18.9
func ToUnstructured ¶
func ToUnstructured(rawyaml []byte) ([]unstructured.Unstructured, error)
ToUnstructured takes a YAML and converts it to a list of Unstructured objects
func ValuesChecksum ¶
ValuesChecksum calculates and returns the SHA1 checksum for the given chartutil.Values.
Types ¶
This section is empty.