util

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package util offers Configmap and Secret generation utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleConfigMapFromEnvFileSource

func HandleConfigMapFromEnvFileSource(configMap *v1.ConfigMap, envFileSource string) error

HandleConfigMapFromEnvFileSource adds the specified env file source information into the provided configMap

func HandleConfigMapFromFileSources

func HandleConfigMapFromFileSources(configMap *v1.ConfigMap, fileSources []string) error

HandleConfigMapFromFileSources adds the specified file source information into the provided configMap

func HandleConfigMapFromLiteralSources

func HandleConfigMapFromLiteralSources(configMap *v1.ConfigMap, literalSources []string) error

HandleConfigMapFromLiteralSources adds the specified literal source information into the provided configMap.

func HandleFromEnvFileSource

func HandleFromEnvFileSource(secret *v1.Secret, envFileSource string) error

HandleFromEnvFileSource adds the specified env file source information into the provided secret

func HandleFromFileSources

func HandleFromFileSources(secret *v1.Secret, fileSources []string) error

HandleFromFileSources adds the specified file source information into the provided secret

func HandleFromLiteralSources

func HandleFromLiteralSources(secret *v1.Secret, literalSources []string) error

HandleFromLiteralSources adds the specified literal source information into the provided secret

func HashObject

func HashObject(obj runtime.Object, codec runtime.Encoder) (string, error)

HashObject encodes object using given codec and returns MD5 sum of the result.

func ParseFileSource

func ParseFileSource(source string) (keyName, filePath string, err error)

ParseFileSource parses the source given.

Acceptable formats include:
 1.  source-path: the basename will become the key name
 2.  source-name=source-path: the source-name will become the key name and
     source-path is the path to the key file.

Key names cannot include '='.

func ParseLiteralSource

func ParseLiteralSource(source string) (keyName, value string, err error)

ParseLiteralSource parses the source key=val pair into its component pieces. This functionality is distinguished from strings.SplitN(source, "=", 2) since it returns an error in the case of empty keys, values, or a missing equals sign.

func ParseRFC3339

func ParseRFC3339(s string) (metav1.Time, error)

ParseRFC3339 parses an RFC3339 date in either RFC3339Nano or RFC3339 format.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL