Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertFileToConfigmap ¶
func ConvertFileToConfigmap(ctx context.Context, c client.Client, config *Config, namespace string, integrationName string, content string, rawContent []byte) (*corev1.ConfigMap, error)
ConvertFileToConfigmap convert a local file resource type in a configmap type taking care to create the Configmap on the cluster. The method will change the value of config parameter to reflect the conversion applied transparently.
func ParseFileValue ¶
ParseFileValue will parse a file resource/config option to return the local path and the destination path expected.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config represents a config option.
func ParseConfig ¶
ParseConfig will parse a config and return a Config.
func ParseResource ¶
ParseResource will parse a resource and return a Config.
func ParseVolume ¶
ParseVolume will parse a volume and return a Config.
func (*Config) ContentType ¶
func (config *Config) ContentType() ContentType
ContentType is the type of content used for the configuration.
func (*Config) DestinationPath ¶
DestinationPath is the location where the resource will be stored on destination.
func (*Config) StorageType ¶
func (config *Config) StorageType() StorageType
StorageType is the type of storage used for the configuration.
type ContentType ¶
type ContentType string
ContentType represent what kind of a content is, either data or purely text configuration.
const ( // ContentTypeData can contain binary content, won't be parsed to look for user properties. ContentTypeData ContentType = "data" // ContentTypeText can't contain binary content, will be parsed to look for user properties. ContentTypeText ContentType = "text" )
type StorageType ¶
type StorageType string
StorageType represent a resource/config type such as configmap, secret or local file.
const ( // StorageTypeConfigmap --. StorageTypeConfigmap StorageType = "configmap" // StorageTypeSecret --. StorageTypeSecret StorageType = "secret" // StorageTypeFile --. StorageTypeFile StorageType = "file" // StorageTypePVC --. StorageTypePVC StorageType = "pvc" )