v1alpha1

package
v1.0.1-0...-b3ee44d Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BOSHDeploymentResourceKind is the kind name of BOSHDeployment
	BOSHDeploymentResourceKind = "BOSHDeployment"
	// BOSHDeploymentResourcePlural is the plural name of BOSHDeployment
	BOSHDeploymentResourcePlural = "boshdeployments"
)
View Source
const (
	// ConfigMapReference represents ConfigMap reference
	ConfigMapReference ReferenceType = "configmap"
	// SecretReference represents Secret reference
	SecretReference ReferenceType = "secret"
	// URLReference represents URL reference
	URLReference ReferenceType = "url"

	ManifestSpecName        string = "manifest"
	OpsSpecName             string = "ops"
	ImplicitVariableKeyName string = "value"
)

Valid values for ref types

Variables

View Source
var (

	// AddToScheme is used for schema registrations in the controller package
	// and also in the generated kube code
	AddToScheme = schemeBuilder.AddToScheme

	// BOSHDeploymentResourceShortNames is the short names of BOSHDeployment
	BOSHDeploymentResourceShortNames = []string{"bdpl", "bdpls"}

	// BOSHDeploymentValidation is the validation method for BOSHDeployment
	BOSHDeploymentValidation = extv1.CustomResourceValidation{
		OpenAPIV3Schema: &extv1.JSONSchemaProps{
			Type: "object",
			Properties: map[string]extv1.JSONSchemaProps{
				"spec": {
					Type: "object",
					Properties: map[string]extv1.JSONSchemaProps{
						"manifest": {
							Type: "object",
							Properties: map[string]extv1.JSONSchemaProps{
								"name": {
									Type:      "string",
									MinLength: pointers.Int64(1),
								},
								"type": {
									Type: "string",
									Enum: []extv1.JSON{
										{
											Raw: []byte(`"configmap"`),
										},
										{
											Raw: []byte(`"secret"`),
										},
										{
											Raw: []byte(`"url"`),
										},
									},
								},
							},
							Required: []string{
								"type",
								"name",
							},
						},
						"ops": {
							Type: "array",
							Items: &extv1.JSONSchemaPropsOrArray{
								Schema: &extv1.JSONSchemaProps{
									Type: "object",
									Properties: map[string]extv1.JSONSchemaProps{
										"name": {
											Type:      "string",
											MinLength: pointers.Int64(1),
										},
										"type": {
											Type: "string",
											Enum: []extv1.JSON{
												{
													Raw: []byte(`"configmap"`),
												},
												{
													Raw: []byte(`"secret"`),
												},
												{
													Raw: []byte(`"url"`),
												},
											},
										},
									},
									Required: []string{
										"type",
										"name",
									},
								},
							},
						},
						"vars": {
							Type: "array",
							Items: &extv1.JSONSchemaPropsOrArray{
								Schema: &extv1.JSONSchemaProps{
									Type: "object",
									Properties: map[string]extv1.JSONSchemaProps{
										"name": {
											Type:      "string",
											MinLength: pointers.Int64(1),
										},
										"secret": {
											Type:      "string",
											MinLength: pointers.Int64(1),
										},
									},
									Required: []string{
										"secret",
										"name",
									},
								},
							},
						},
					},
					Required: []string{
						"manifest",
					},
				},
				"status": {
					Type: "object",
					Properties: map[string]extv1.JSONSchemaProps{
						"lastReconcile": {
							Type:     "string",
							Nullable: true,
						},
						"state": {
							Type: "string",
						},
						"message": {
							Type: "string",
						},
						"totalJobCount": {
							Type: "integer",
						},
						"completedJobCount": {
							Type: "integer",
						},
						"totalInstanceGroups": {
							Type: "integer",
						},
						"deployedInstanceGroups": {
							Type: "integer",
						},
						"stateTimestamp": {
							Type:     "string",
							Nullable: true,
						},
					},
				},
			},
		},
	}

	// BOSHDeploymentAdditionalPrinterColumns are used by `kubectl get`
	BOSHDeploymentAdditionalPrinterColumns = []extv1.CustomResourceColumnDefinition{
		{
			Name:     "totalInstanceGroups",
			Type:     "integer",
			Priority: 0,
			JSONPath: ".status.totalInstanceGroups",
		},
		{
			Name:     "deployedInstanceGroups",
			Type:     "integer",
			Priority: 0,
			JSONPath: ".status.deployedInstanceGroups",
		},
		{
			Name:     "completedJobCount",
			Type:     "integer",
			Priority: 10,
			JSONPath: ".status.completedJobCount",
		},
		{
			Name:     "totalJobCount",
			Type:     "integer",
			Priority: 20,
			JSONPath: ".status.totalJobCount",
		},
	}

	// BOSHDeploymentResourceName is the resource name of BOSHDeployment
	BOSHDeploymentResourceName = fmt.Sprintf("%s.%s", BOSHDeploymentResourcePlural, apis.GroupName)

	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: apis.GroupName, Version: "v1alpha1"}
)
View Source
var (
	// LabelDeploymentName is the label key for the deployment manifest name
	LabelDeploymentName = fmt.Sprintf("%s/deployment-name", apis.GroupName)
	// LabelDeploymentSecretType is the label key for secret type
	LabelDeploymentSecretType = fmt.Sprintf("%s/secret-type", apis.GroupName)
	// LabelInstanceGroupName is the name of a label for an instance group name.
	LabelInstanceGroupName = fmt.Sprintf("%s/instance-group-name", apis.GroupName)
	// LabelDeploymentVersion is the name of a label for the deployment's version.
	LabelDeploymentVersion = fmt.Sprintf("%s/deployment-version", apis.GroupName)
	// LabelReferencedJobName is the name key for dependent job
	LabelReferencedJobName = fmt.Sprintf("%s/referenced-job-name", apis.GroupName)
	// AnnotationLinkProvidesKey is the key for the quarks links 'provides' JSON on a secret
	AnnotationLinkProvidesKey = fmt.Sprintf("%s/provides", apis.GroupName)
	// AnnotationLinkProviderName is the annotation key used on services to identify the link it provides addresses for
	AnnotationLinkProviderName = fmt.Sprintf("%s/link-provider-name", apis.GroupName)
	// AnnotationJSONValue is the annotation key used to indicate the implicit variable secret has a JSON value
	AnnotationJSONValue = fmt.Sprintf("%s/json-value", apis.GroupName)
	// LabelEntanglementKey to identify a quarks link
	LabelEntanglementKey = fmt.Sprintf("%s/entanglement", apis.GroupName)
)

Functions

func HasDeploymentName

func HasDeploymentName(l map[string]string) bool

HasDeploymentName returns true if the deployment name label is present in the set of labels

func Kind

func Kind(kind string) schema.GroupKind

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

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type BOSHDeployment

type BOSHDeployment struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   BOSHDeploymentSpec   `json:"spec,omitempty"`
	Status BOSHDeploymentStatus `json:"status,omitempty"`
}

BOSHDeployment is the Schema for the boshdeployments API +k8s:openapi-gen=true

func (*BOSHDeployment) DeepCopy

func (in *BOSHDeployment) DeepCopy() *BOSHDeployment

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BOSHDeployment.

func (*BOSHDeployment) DeepCopyInto

func (in *BOSHDeployment) DeepCopyInto(out *BOSHDeployment)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BOSHDeployment) DeepCopyObject

func (in *BOSHDeployment) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*BOSHDeployment) GetNamespacedName

func (bdpl *BOSHDeployment) GetNamespacedName() string

GetNamespacedName returns the resource name with its namespace

type BOSHDeploymentList

type BOSHDeploymentList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []BOSHDeployment `json:"items"`
}

BOSHDeploymentList contains a list of BOSHDeployment

func (*BOSHDeploymentList) DeepCopy

func (in *BOSHDeploymentList) DeepCopy() *BOSHDeploymentList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BOSHDeploymentList.

func (*BOSHDeploymentList) DeepCopyInto

func (in *BOSHDeploymentList) DeepCopyInto(out *BOSHDeploymentList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BOSHDeploymentList) DeepCopyObject

func (in *BOSHDeploymentList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type BOSHDeploymentSpec

type BOSHDeploymentSpec struct {
	Manifest ResourceReference   `json:"manifest"`
	Ops      []ResourceReference `json:"ops,omitempty"`
	Vars     []VarReference      `json:"vars,omitempty"`
}

BOSHDeploymentSpec defines the desired state of BOSHDeployment

func (*BOSHDeploymentSpec) DeepCopy

func (in *BOSHDeploymentSpec) DeepCopy() *BOSHDeploymentSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BOSHDeploymentSpec.

func (*BOSHDeploymentSpec) DeepCopyInto

func (in *BOSHDeploymentSpec) DeepCopyInto(out *BOSHDeploymentSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BOSHDeploymentStatus

type BOSHDeploymentStatus struct {
	// Timestamp for the last reconcile
	LastReconcile          *metav1.Time `json:"lastReconcile"`
	State                  string       `json:"state"`
	Message                string       `json:"message"`
	TotalJobCount          int          `json:"totalJobCount"`
	CompletedJobCount      int          `json:"completedJobCount"`
	TotalInstanceGroups    int          `json:"totalInstanceGroups"`
	DeployedInstanceGroups int          `json:"deployedInstanceGroups"`
	StateTimestamp         *metav1.Time `json:"stateTimestamp"`
}

BOSHDeploymentStatus defines the observed state of BOSHDeployment

func (*BOSHDeploymentStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BOSHDeploymentStatus.

func (*BOSHDeploymentStatus) DeepCopyInto

func (in *BOSHDeploymentStatus) DeepCopyInto(out *BOSHDeploymentStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DeploymentSecretType

type DeploymentSecretType int

DeploymentSecretType lists all the types of secrets used in the lifecycle of a BOSHDeployment

const (
	// DeploymentSecretTypeManifestWithOps is a manifest that has ops files applied
	DeploymentSecretTypeManifestWithOps DeploymentSecretType = iota
	// DeploymentSecretTypeDesiredManifest is a manifest whose variables have been interpolated
	DeploymentSecretTypeDesiredManifest
	// DeploymentSecretTypeVariable is a BOSH variable generated using an QuarksSecret
	DeploymentSecretTypeVariable
	// DeploymentSecretTypeInstanceGroupResolvedProperties is a YAML file containing all properties needed to render an Instance Group
	DeploymentSecretTypeInstanceGroupResolvedProperties
	// DeploymentSecretBPMInformation is a YAML file containing the BPM information for one instance group
	DeploymentSecretBPMInformation
)

func (DeploymentSecretType) Prefix

func (s DeploymentSecretType) Prefix() string

Prefix returns the prefix used for our k8s secrets: `<secretType>.`

func (DeploymentSecretType) String

func (s DeploymentSecretType) String() string

type ReferenceType

type ReferenceType = string

ReferenceType lists all the types of Reference we can supports

type ResourceReference

type ResourceReference struct {
	Name string        `json:"name"`
	Type ReferenceType `json:"type"`
}

ResourceReference defines the resource reference type and location

func (*ResourceReference) DeepCopy

func (in *ResourceReference) DeepCopy() *ResourceReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceReference.

func (*ResourceReference) DeepCopyInto

func (in *ResourceReference) DeepCopyInto(out *ResourceReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VarReference

type VarReference struct {
	Name   string `json:"name"`
	Secret string `json:"secret"`
}

VarReference represents a user-defined secret for an explicit variable

func (*VarReference) DeepCopy

func (in *VarReference) DeepCopy() *VarReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VarReference.

func (*VarReference) DeepCopyInto

func (in *VarReference) DeepCopyInto(out *VarReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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