api

package
v3.6.0-0.0.alpha.1.804... Latest Latest
Warning

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

Go to latest
Published: May 25, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

+groupName=template.openshift.io Package api is the internal version of the API.

Index

Constants

View Source
const (
	// IconClassAnnotation is the rss class of an icon representing a template
	IconClassAnnotation = "iconClass"

	// LongDescriptionAnnotation is a template's long description
	LongDescriptionAnnotation = "template.openshift.io/long-description"

	// ProviderDisplayNameAnnotation is the name of a template provider, e.g.
	// "Red Hat, Inc."
	ProviderDisplayNameAnnotation = "template.openshift.io/provider-display-name"

	// DocumentationURLAnnotation is the url where documentation associated with
	// a template can be found
	DocumentationURLAnnotation = "template.openshift.io/documentation-url"

	// SupportURLAnnotation is the url where support for a template can be found
	SupportURLAnnotation = "template.openshift.io/support-url"

	// TemplateInstanceLabel is used to label every object created by the
	// TemplateInstance API.
	TemplateInstanceLabel = "template.openshift.io/template-instance"

	// NamespaceParameterKey is the name of the key in the Open Service Broker API
	// ProvisionRequest Parameters object where we receive the name of the
	// namespace into which a template should be provisioned.  The '/' and '.'
	// characters in the name happen to make this an invalid template parameter
	// name so there is no immediate overlap with passed template parameters in
	// the same object.
	NamespaceParameterKey = "template.openshift.io/namespace"

	// RequesterUsernameParameterKey is the name of the key in the Open Service
	// Broker API ProvisionRequest Parameters object where we receive the user
	// name which will be impersonated during template provisioning.  See above
	// note.
	RequesterUsernameParameterKey = "template.openshift.io/requester-username"

	// ServiceBrokerRoot is the API root of the template service broker.
	ServiceBrokerRoot = "/brokers/template.openshift.io"

	// ServiceMetadataIconClass is the key for the template iconClass as returned
	// in the services.metadata map from a service broker catalog response
	ServiceMetadataIconClass = "console.openshift.io/iconClass"

	// TemplateUIDIndex is the name of an index on the generated template lister,
	// initialised and used by the template service broker.
	TemplateUIDIndex = "templateuid"
)

annotation keys

View Source
const (
	GroupName       = "template.openshift.io"
	LegacyGroupName = ""
)

Variables

View Source
var (
	SchemeGroupVersion       = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
	LegacySchemeGroupVersion = schema.GroupVersion{Group: LegacyGroupName, Version: runtime.APIVersionInternal}

	LegacySchemeBuilder    = runtime.NewSchemeBuilder(addLegacyKnownTypes)
	AddToSchemeInCoreGroup = LegacySchemeBuilder.AddToScheme

	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)

SchemeGroupVersion is group version used to register these objects

Functions

func AddObjectsToTemplate added in v1.1.3

func AddObjectsToTemplate(template *Template, objects []runtime.Object, targetVersions ...schema.GroupVersion) error

AddObjectsToTemplate adds the objects to the template using the target versions to choose the conversion destination

func BrokerTemplateInstanceToSelectableFields

func BrokerTemplateInstanceToSelectableFields(brokertemplateinstance *BrokerTemplateInstance) fields.Set

BrokerTemplateInstanceToSelectableFields returns a label set that represents the object changes to the returned keys require registering conversions for existing versions using Scheme.AddFieldLabelConversionFunc

func DeepCopy_api_BrokerTemplateInstance

func DeepCopy_api_BrokerTemplateInstance(in interface{}, out interface{}, c *conversion.Cloner) error

func DeepCopy_api_BrokerTemplateInstanceList

func DeepCopy_api_BrokerTemplateInstanceList(in interface{}, out interface{}, c *conversion.Cloner) error

func DeepCopy_api_BrokerTemplateInstanceSpec

func DeepCopy_api_BrokerTemplateInstanceSpec(in interface{}, out interface{}, c *conversion.Cloner) error

func DeepCopy_api_Parameter added in v1.3.0

func DeepCopy_api_Parameter(in interface{}, out interface{}, c *conversion.Cloner) error

func DeepCopy_api_Template added in v1.3.0

func DeepCopy_api_Template(in interface{}, out interface{}, c *conversion.Cloner) error

func DeepCopy_api_TemplateInstance

func DeepCopy_api_TemplateInstance(in interface{}, out interface{}, c *conversion.Cloner) error

func DeepCopy_api_TemplateInstanceCondition

func DeepCopy_api_TemplateInstanceCondition(in interface{}, out interface{}, c *conversion.Cloner) error

func DeepCopy_api_TemplateInstanceList

func DeepCopy_api_TemplateInstanceList(in interface{}, out interface{}, c *conversion.Cloner) error

func DeepCopy_api_TemplateInstanceRequester

func DeepCopy_api_TemplateInstanceRequester(in interface{}, out interface{}, c *conversion.Cloner) error

func DeepCopy_api_TemplateInstanceSpec

func DeepCopy_api_TemplateInstanceSpec(in interface{}, out interface{}, c *conversion.Cloner) error

func DeepCopy_api_TemplateInstanceStatus

func DeepCopy_api_TemplateInstanceStatus(in interface{}, out interface{}, c *conversion.Cloner) error

func DeepCopy_api_TemplateList added in v1.3.0

func DeepCopy_api_TemplateList(in interface{}, out interface{}, c *conversion.Cloner) error

func IsKindOrLegacy

func IsKindOrLegacy(kind string, gk schema.GroupKind) bool

IsKindOrLegacy checks if the provided GroupKind matches with the given kind by looking up the API group and also the legacy API.

func IsResourceOrLegacy

func IsResourceOrLegacy(resource string, gr schema.GroupResource) bool

IsResourceOrLegacy checks if the provided GroupResources matches with the given resource by looking up the API group and also the legacy API.

func Kind added in v1.1.2

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func LegacyKind

func LegacyKind(kind string) schema.GroupKind

LegacyKind takes an unqualified kind and returns back a Group qualified GroupKind

func LegacyResource

func LegacyResource(resource string) schema.GroupResource

func RegisterDeepCopies added in v1.4.0

func RegisterDeepCopies(scheme *runtime.Scheme) error

RegisterDeepCopies adds deep-copy functions to the given scheme. Public to allow building arbitrary schemes.

func Resource added in v1.1.2

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns back a Group qualified GroupResource

func TemplateInstanceToSelectableFields

func TemplateInstanceToSelectableFields(templateInstance *TemplateInstance) fields.Set

TemplateInstanceToSelectableFields returns a label set that represents the object changes to the returned keys require registering conversions for existing versions using Scheme.AddFieldLabelConversionFunc

func TemplateToSelectableFields added in v1.0.8

func TemplateToSelectableFields(template *Template) fields.Set

TemplateToSelectableFields returns a label set that represents the object changes to the returned keys require registering conversions for existing versions using Scheme.AddFieldLabelConversionFunc

Types

type BrokerTemplateInstance

type BrokerTemplateInstance struct {
	metav1.TypeMeta
	metav1.ObjectMeta

	// Spec describes the state of this BrokerTemplateInstance.
	Spec BrokerTemplateInstanceSpec
}

BrokerTemplateInstance holds the service broker-related state associated with a TemplateInstance. BrokerTemplateInstance is part of an experimental API.

type BrokerTemplateInstanceList

type BrokerTemplateInstanceList struct {
	metav1.TypeMeta
	metav1.ListMeta

	// Items is a list of BrokerTemplateInstances
	Items []BrokerTemplateInstance
}

BrokerTemplateInstanceList is a list of BrokerTemplateInstance objects.

type BrokerTemplateInstanceSpec

type BrokerTemplateInstanceSpec struct {
	// TemplateInstance is a reference to a TemplateInstance object residing
	// in a namespace.
	TemplateInstance kapi.ObjectReference

	// Secret is a reference to a Secret object residing in a namespace,
	// containing the necessary template parameters.
	Secret kapi.ObjectReference

	// BindingIDs is a list of 'binding_id's provided during successive bind
	// calls to the template service broker.
	BindingIDs []string
}

BrokerTemplateInstanceSpec describes the state of a BrokerTemplateInstance.

type Parameter

type Parameter struct {
	// Required: Parameter name must be set and it can be referenced in Template
	// Items using ${PARAMETER_NAME}
	Name string

	// Optional: The name that will show in UI instead of parameter 'Name'
	DisplayName string

	// Optional: Parameter can have description
	Description string

	// Optional: Value holds the Parameter data. If specified, the generator
	// will be ignored. The value replaces all occurrences of the Parameter
	// ${Name} expression during the Template to Config transformation.
	Value string

	// Optional: Generate specifies the generator to be used to generate
	// random string from an input value specified by From field. The result
	// string is stored into Value field. If empty, no generator is being
	// used, leaving the result Value untouched.
	Generate string

	// Optional: From is an input value for the generator.
	From string

	// Optional: Indicates the parameter must have a value.  Defaults to false.
	Required bool
}

Parameter defines a name/value variable that is to be processed during the Template to Config transformation.

type Template

type Template struct {
	metav1.TypeMeta
	metav1.ObjectMeta

	// message is an optional instructional message that will
	// be displayed when this template is instantiated.
	// This field should inform the user how to utilize the newly created resources.
	// Parameter substitution will be performed on the message before being
	// displayed so that generated credentials and other parameters can be
	// included in the output.
	Message string

	// parameters is an optional array of Parameters used during the
	// Template to Config transformation.
	Parameters []Parameter

	// objects is an array of resources to include in this template.
	// If a namespace value is hardcoded in the object, it will be removed
	// during template instantiation, however if the namespace value
	// is, or contains, a ${PARAMETER_REFERENCE}, the resolved
	// value after parameter substitution will be respected and the object
	// will be created in that namespace.
	Objects []runtime.Object

	// objectLabels is an optional set of labels that are applied to every
	// object during the Template to Config transformation.
	ObjectLabels map[string]string
}

Template contains the inputs needed to produce a Config.

type TemplateInstance

type TemplateInstance struct {
	metav1.TypeMeta
	metav1.ObjectMeta

	// Spec describes the desired state of this TemplateInstance.
	Spec TemplateInstanceSpec

	// Status describes the current state of this TemplateInstance.
	Status TemplateInstanceStatus
}

TemplateInstance requests and records the instantiation of a Template. TemplateInstance is part of an experimental API.

type TemplateInstanceCondition

type TemplateInstanceCondition struct {
	// Type of the condition, currently Ready or InstantiateFailure.
	Type TemplateInstanceConditionType
	// Status of the condition, one of True, False or Unknown.
	Status kapi.ConditionStatus
	// LastTransitionTime is the last time a condition status transitioned from
	// one state to another.
	LastTransitionTime metav1.Time
	// Reason is a brief machine readable explanation for the condition's last
	// transition.
	Reason string
	// Message is a human readable description of the details of the last
	// transition, complementing reason.
	Message string
}

TemplateInstanceCondition contains condition information for a TemplateInstance.

type TemplateInstanceConditionType

type TemplateInstanceConditionType string

TemplateInstanceConditionType is the type of condition pertaining to a TemplateInstance.

const (
	// TemplateInstanceReady indicates the readiness of the template
	// instantiation.
	TemplateInstanceReady TemplateInstanceConditionType = "Ready"
	// TemplateInstanceInstantiateFailure indicates the failure of the template
	// instantiation
	TemplateInstanceInstantiateFailure TemplateInstanceConditionType = "InstantiateFailure"
)

type TemplateInstanceList

type TemplateInstanceList struct {
	metav1.TypeMeta
	metav1.ListMeta

	// Items is a list of Templateinstances
	Items []TemplateInstance
}

TemplateInstanceList is a list of TemplateInstance objects.

type TemplateInstanceRequester

type TemplateInstanceRequester struct {
	// Username is the username of the agent requesting a template instantiation.
	Username string
}

TemplateInstanceRequester holds the identity of an agent requesting a template instantiation.

type TemplateInstanceSpec

type TemplateInstanceSpec struct {
	// Template is a full copy of the template for instantiation.
	Template Template

	// Secret is a reference to a Secret object containing the necessary
	// template parameters.
	Secret kapi.LocalObjectReference

	// Requester holds the identity of the agent requesting the template
	// instantiation.
	Requester *TemplateInstanceRequester
}

TemplateInstanceSpec describes the desired state of a TemplateInstance.

type TemplateInstanceStatus

type TemplateInstanceStatus struct {
	// Conditions represent the latest available observations of a
	// TemplateInstance's current state.
	Conditions []TemplateInstanceCondition
}

TemplateInstanceStatus describes the current state of a TemplateInstance.

type TemplateList added in v0.3.2

type TemplateList struct {
	metav1.TypeMeta
	metav1.ListMeta
	Items []Template
}

TemplateList is a list of Template objects.

Directories

Path Synopsis
+groupName=template.openshift.io Package v1 is the v1 version of the API.
+groupName=template.openshift.io Package v1 is the v1 version of the API.
Package validation has functions for validating the correctness of Template objects and explaining what is wrong with them when they aren't valid.
Package validation has functions for validating the correctness of Template objects and explaining what is wrong with them when they aren't valid.

Jump to

Keyboard shortcuts

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