v1alpha1

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Group                         = "sme.sap.com"
	Version                       = "v1alpha1"
	CAPApplicationKind            = "CAPApplication"
	CAPApplicationResource        = "capapplications"
	CAPApplicationVersionKind     = "CAPApplicationVersion"
	CAPApplicationVersionResource = "capapplicationversions"
	CAPTenantKind                 = "CAPTenant"
	CAPTenantResource             = "captenants"
	CAPTenantOperationKind        = "CAPTenantOperation"
	CAPTenantOperationResource    = "captenantoperations"
)
View Source
const (
	EnvMaxTenantVersionHistory = "MAX_TENANT_VERSION_HISTORY"
)

Variables

View Source
var (
	// SchemeBuilder initializes a scheme builder
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme is a global function that registers this API group & version to a scheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: Group, Version: Version}

SchemeGroupVersion is group version used to register these objects

Functions

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 ApplicationDomains

type ApplicationDomains struct {
	// +kubebuilder:validation:Pattern=^[a-z0-9-.]+$
	// +kubebuilder:validation:MaxLength=62
	// Primary application domain will be used to generate a wildcard TLS certificate. In SAP Gardener managed clusters this is (usually) a subdomain of the cluster domain
	Primary string `json:"primary"`
	// Customer specific domains to serve application endpoints (optional)
	Secondary []string `json:"secondary,omitempty"`
	// +kubebuilder:validation:Pattern=^[a-z0-9-.]*$
	// Public ingress URL for the cluster Load Balancer
	DnsTarget string `json:"dnsTarget,omitempty"`
	// +kubebuilder:validation:MinItems=1
	// Labels used to identify the istio ingress-gateway component and its corresponding namespace. Usually {"app":"istio-ingressgateway","istio":"ingressgateway"}
	IstioIngressGatewayLabels []NameValue `json:"istioIngressGatewayLabels"`
}

Application domains

func (*ApplicationDomains) DeepCopy

func (in *ApplicationDomains) DeepCopy() *ApplicationDomains

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

func (*ApplicationDomains) DeepCopyInto

func (in *ApplicationDomains) DeepCopyInto(out *ApplicationDomains)

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

type BTP

type BTP struct {
	// Details of BTP Services
	Services []ServiceInfo `json:"services"`
}

func (*BTP) DeepCopy

func (in *BTP) DeepCopy() *BTP

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

func (*BTP) DeepCopyInto

func (in *BTP) DeepCopyInto(out *BTP)

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

type BTPTenantIdentification

type BTPTenantIdentification struct {
	// BTP subaccount subdomain
	SubDomain string `json:"subDomain"`
	// BTP subaccount Tenant ID
	TenantId string `json:"tenantId"`
}

Identifies an SAP BTP subaccount (tenant)

func (*BTPTenantIdentification) DeepCopy

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

func (*BTPTenantIdentification) DeepCopyInto

func (in *BTPTenantIdentification) DeepCopyInto(out *BTPTenantIdentification)

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

type CAPApplication

type CAPApplication struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	// CAPApplication spec
	Spec CAPApplicationSpec `json:"spec"`
	// +kubebuilder:validation:Optional
	// CAPApplication status
	Status CAPApplicationStatus `json:"status"`
}

CAPApplication is the schema for capapplications API

func (*CAPApplication) DeepCopy

func (in *CAPApplication) DeepCopy() *CAPApplication

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

func (*CAPApplication) DeepCopyInto

func (in *CAPApplication) DeepCopyInto(out *CAPApplication)

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

func (*CAPApplication) DeepCopyObject

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

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

func (*CAPApplication) SetStatusCondition

func (ca *CAPApplication) SetStatusCondition(conditionType string, readyStatus metav1.ConditionStatus, reason string, message string)

SetStatusCondition updates/sets the conditions in the Status of the resource.

func (*CAPApplication) SetStatusDomainSpecHash

func (ca *CAPApplication) SetStatusDomainSpecHash(hash string)

func (*CAPApplication) SetStatusWithReadyCondition

func (ca *CAPApplication) SetStatusWithReadyCondition(state CAPApplicationState, readyStatus metav1.ConditionStatus, reason string, message string)

type CAPApplicationList

type CAPApplicationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []CAPApplication `json:"items"`
}

CAPApplicationList contains a list of CAPApplication

func (*CAPApplicationList) DeepCopy

func (in *CAPApplicationList) DeepCopy() *CAPApplicationList

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

func (*CAPApplicationList) DeepCopyInto

func (in *CAPApplicationList) DeepCopyInto(out *CAPApplicationList)

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

func (*CAPApplicationList) DeepCopyObject

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

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

type CAPApplicationSpec

type CAPApplicationSpec struct {
	// Domains used by the application
	Domains ApplicationDomains `json:"domains"`
	// SAP BTP Global Account Identifier where services are entitles for the current application
	GlobalAccountId string `json:"globalAccountId"`
	// Short name for the application (similar to BTP XSAPPNAME)
	BTPAppName string `json:"btpAppName"`
	// Provider subaccount where application services are created
	Provider BTPTenantIdentification `json:"provider"`
	// SAP BTP Services consumed by the application
	BTP BTP `json:"btp"`
}

CAPApplicationSpec defines the desired state of CAPApplication

func (*CAPApplicationSpec) DeepCopy

func (in *CAPApplicationSpec) DeepCopy() *CAPApplicationSpec

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

func (*CAPApplicationSpec) DeepCopyInto

func (in *CAPApplicationSpec) DeepCopyInto(out *CAPApplicationSpec)

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

type CAPApplicationState

type CAPApplicationState string
const (
	// CAPApplication is being reconciled
	CAPApplicationStateProcessing CAPApplicationState = "Processing"
	// An error occurred during reconciliation
	CAPApplicationStateError CAPApplicationState = "Error"
	// Deletion has been triggered
	CAPApplicationStateDeleting CAPApplicationState = "Deleting"
	// CAPApplication has been reconciled and is now consistent
	CAPApplicationStateConsistent CAPApplicationState = "Consistent"
)

type CAPApplicationStatus

type CAPApplicationStatus struct {
	GenericStatus `json:",inline"`
	// +kubebuilder:validation:Enum="";Consistent;Processing;Error;Deleting
	// State of CAPApplication
	State CAPApplicationState `json:"state"`
	// Hash representing last known application domains
	DomainSpecHash string `json:"domainSpecHash,omitempty"`
	// The last time a full reconciliation was completed
	LastFullReconciliationTime metav1.Time `json:"lastFullReconciliationTime,omitempty"`
}

func (*CAPApplicationStatus) DeepCopy

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

func (*CAPApplicationStatus) DeepCopyInto

func (in *CAPApplicationStatus) DeepCopyInto(out *CAPApplicationStatus)

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

type CAPApplicationStatusConditionType

type CAPApplicationStatusConditionType string
const (
	ConditionTypeAllTenantsReady    CAPApplicationStatusConditionType = "AllTenantsReady"
	ConditionTypeLatestVersionReady CAPApplicationStatusConditionType = "LatestVersionReady"
)

type CAPApplicationVersion

type CAPApplicationVersion struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	// CAPApplicationVersion spec
	Spec CAPApplicationVersionSpec `json:"spec"`
	// +kubebuilder:validation:Optional
	// CAPApplicationVersion status
	Status CAPApplicationVersionStatus `json:"status"`
}

CAPApplicationVersion defines the schema for capapplicationversions API

func (*CAPApplicationVersion) CheckFinishedJobs

func (cav *CAPApplicationVersion) CheckFinishedJobs(finishedJob string) bool

func (*CAPApplicationVersion) DeepCopy

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

func (*CAPApplicationVersion) DeepCopyInto

func (in *CAPApplicationVersion) DeepCopyInto(out *CAPApplicationVersion)

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

func (*CAPApplicationVersion) DeepCopyObject

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

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

func (*CAPApplicationVersion) SetStatusFinishedJobs

func (cav *CAPApplicationVersion) SetStatusFinishedJobs(finishedJob string)

func (*CAPApplicationVersion) SetStatusWithReadyCondition

func (cav *CAPApplicationVersion) SetStatusWithReadyCondition(state CAPApplicationVersionState, readyStatus metav1.ConditionStatus, reason string, message string)

type CAPApplicationVersionList

type CAPApplicationVersionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []CAPApplicationVersion `json:"items"`
}

CAPApplicationVersionList contains a list of CAPApplicationVersion

func (*CAPApplicationVersionList) DeepCopy

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

func (*CAPApplicationVersionList) DeepCopyInto

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

func (*CAPApplicationVersionList) DeepCopyObject

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

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

type CAPApplicationVersionSpec

type CAPApplicationVersionSpec struct {
	// Denotes to which CAPApplication the current version belongs
	CAPApplicationInstance string `json:"capApplicationInstance"`
	// Semantic version
	Version string `json:"version"`
	// Registry secrets used to pull images of the application components
	RegistrySecrets []string `json:"registrySecrets,omitempty"`
	// Information about the Workloads
	Workloads []WorkloadDetails `json:"workloads"`
	// Tenant Operations may be used to specify how jobs are sequenced for the different tenant operations
	TenantOperations *TenantOperations `json:"tenantOperations,omitempty"`
	// Content Jobs may be used to specify the sequence of content jobs when several jobs exist
	ContentJobs []string `json:"contentJobs,omitempty"`
}

CAPApplicationVersionSpec specifies the desired state of CAPApplicationVersion

func (*CAPApplicationVersionSpec) DeepCopy

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

func (*CAPApplicationVersionSpec) DeepCopyInto

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

type CAPApplicationVersionState

type CAPApplicationVersionState string
const (
	// CAPApplicationVersion is being processed
	CAPApplicationVersionStateProcessing CAPApplicationVersionState = "Processing"
	// An error occurred during reconciliation
	CAPApplicationVersionStateError CAPApplicationVersionState = "Error"
	// Deletion has been triggered
	CAPApplicationVersionStateDeleting CAPApplicationVersionState = "Deleting"
	// CAPApplicationVersion is now ready for use (dependent resources have been created)
	CAPApplicationVersionStateReady CAPApplicationVersionState = "Ready"
)

type CAPApplicationVersionStatus

type CAPApplicationVersionStatus struct {
	GenericStatus `json:",inline"`
	// +kubebuilder:validation:Enum="";Ready;Error;Processing;Deleting
	// State of CAPApplicationVersion
	State CAPApplicationVersionState `json:"state"`
	// List of finished Content Jobs
	FinishedJobs []string `json:"finishedJobs,omitempty"`
}

func (*CAPApplicationVersionStatus) DeepCopy

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

func (*CAPApplicationVersionStatus) DeepCopyInto

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

type CAPTenant

type CAPTenant struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	// CAPTenant spec
	Spec CAPTenantSpec `json:"spec"`
	// +kubebuilder:validation:Optional
	// CAPTenant status
	Status CAPTenantStatus `json:"status"`
}

CAPTenant defines the schema for captenants API

func (*CAPTenant) DeepCopy

func (in *CAPTenant) DeepCopy() *CAPTenant

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

func (*CAPTenant) DeepCopyInto

func (in *CAPTenant) DeepCopyInto(out *CAPTenant)

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

func (*CAPTenant) DeepCopyObject

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

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

func (*CAPTenant) SetStatusCAPApplicationVersion

func (cat *CAPTenant) SetStatusCAPApplicationVersion(cavName string)

func (*CAPTenant) SetStatusWithReadyCondition

func (cat *CAPTenant) SetStatusWithReadyCondition(state CAPTenantState, readyStatus metav1.ConditionStatus, reason string, message string)

type CAPTenantList

type CAPTenantList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []CAPTenant `json:"items"`
}

CAPTenantList contains a list of CAPTenant

func (*CAPTenantList) DeepCopy

func (in *CAPTenantList) DeepCopy() *CAPTenantList

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

func (*CAPTenantList) DeepCopyInto

func (in *CAPTenantList) DeepCopyInto(out *CAPTenantList)

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

func (*CAPTenantList) DeepCopyObject

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

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

type CAPTenantOperation

type CAPTenantOperation struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	// CAPTenantOperation spec
	Spec CAPTenantOperationSpec `json:"spec"`
	// +kubebuilder:validation:Optional
	// CAPTenantOperation status
	Status CAPTenantOperationStatus `json:"status"`
}

CAPTenantOperation defines the schema for captenantoperations API

func (*CAPTenantOperation) DeepCopy

func (in *CAPTenantOperation) DeepCopy() *CAPTenantOperation

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

func (*CAPTenantOperation) DeepCopyInto

func (in *CAPTenantOperation) DeepCopyInto(out *CAPTenantOperation)

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

func (*CAPTenantOperation) DeepCopyObject

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

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

func (*CAPTenantOperation) SetStatusCurrentStep

func (ctop *CAPTenantOperation) SetStatusCurrentStep(step *uint32, job *string)

func (*CAPTenantOperation) SetStatusWithReadyCondition

func (ctop *CAPTenantOperation) SetStatusWithReadyCondition(state CAPTenantOperationState, readyStatus metav1.ConditionStatus, reason string, message string)

type CAPTenantOperationList

type CAPTenantOperationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []CAPTenantOperation `json:"items"`
}

CAPTenantOperationList contains a list of CAPTenantOperation

func (*CAPTenantOperationList) DeepCopy

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

func (*CAPTenantOperationList) DeepCopyInto

func (in *CAPTenantOperationList) DeepCopyInto(out *CAPTenantOperationList)

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

func (*CAPTenantOperationList) DeepCopyObject

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

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

type CAPTenantOperationSpec

type CAPTenantOperationSpec struct {
	// +kubebuilder:validation:Enum=provisioning;deprovisioning;upgrade
	// Scope of the tenant lifecycle operation. One of 'provisioning', 'deprovisioning' or 'upgrade'
	Operation CAPTenantOperationType `json:"operation"`
	// BTP sub-account (tenant) for which request is created
	BTPTenantIdentification `json:",inline"`
	// Reference to CAPApplicationVersion for executing the operation
	CAPApplicationVersionInstance string `json:"capApplicationVersionInstance"`
	// Steps (jobs) to be executed for the operation to complete
	Steps []CAPTenantOperationStep `json:"steps"`
}

func (*CAPTenantOperationSpec) DeepCopy

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

func (*CAPTenantOperationSpec) DeepCopyInto

func (in *CAPTenantOperationSpec) DeepCopyInto(out *CAPTenantOperationSpec)

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

type CAPTenantOperationState

type CAPTenantOperationState string
const (
	// CAPTenantOperation is being processed
	CAPTenantOperationStateProcessing CAPTenantOperationState = "Processing"
	// CAPTenantOperation steps have failed
	CAPTenantOperationStateFailed CAPTenantOperationState = "Failed"
	// CAPTenantOperation steps completed
	CAPTenantOperationStateCompleted CAPTenantOperationState = "Completed"
	// CAPTenantOperation deletion has been triggered
	CAPTenantOperationStateDeleting CAPTenantOperationState = "Deleting"
)

type CAPTenantOperationStatus

type CAPTenantOperationStatus struct {
	GenericStatus `json:",inline"`
	// +kubebuilder:validation:Enum="";Processing;Completed;Failed;Deleting
	// State of CAPTenantOperation
	State CAPTenantOperationState `json:"state"`
	// Current step being processed from the sequence of specified steps
	CurrentStep *uint32 `json:"currentStep,omitempty"`
	// Name of the job being executed for the current step
	ActiveJob *string `json:"activeJob,omitempty"`
}

func (*CAPTenantOperationStatus) DeepCopy

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

func (*CAPTenantOperationStatus) DeepCopyInto

func (in *CAPTenantOperationStatus) DeepCopyInto(out *CAPTenantOperationStatus)

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

type CAPTenantOperationStep

type CAPTenantOperationStep struct {
	// Name of the workload from the referenced CAPApplicationVersion
	Name string `json:"name"`
	// +kubebuilder:validation:Enum=CustomTenantOperation;TenantOperation
	// Type of job. One of 'TenantOperation' or 'CustomTenantOperation'
	Type JobType `json:"type"`
	// Indicates whether the operation can continue in case of step failure. Relevant only for type 'CustomTenantOperation'
	ContinueOnFailure bool `json:"continueOnFailure,omitempty"`
}

func (*CAPTenantOperationStep) DeepCopy

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

func (*CAPTenantOperationStep) DeepCopyInto

func (in *CAPTenantOperationStep) DeepCopyInto(out *CAPTenantOperationStep)

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

type CAPTenantOperationType

type CAPTenantOperationType string
const (
	// Provision tenant
	CAPTenantOperationTypeProvisioning CAPTenantOperationType = "provisioning"
	// Deprovision tenant
	CAPTenantOperationTypeDeprovisioning CAPTenantOperationType = "deprovisioning"
	// Upgrade tenant
	CAPTenantOperationTypeUpgrade CAPTenantOperationType = "upgrade"
)

type CAPTenantSpec

type CAPTenantSpec struct {
	// Denotes to which CAPApplication the current tenant belongs
	CAPApplicationInstance string `json:"capApplicationInstance"`
	// Details of consumer sub-account subscribing to the application
	BTPTenantIdentification `json:",inline"`
	// Semver that is used to determine the relevant CAPApplicationVersion that a CAPTenant can be upgraded to (i.e. if it is not already on that version)
	Version string `json:"version,omitempty"`
	// +kubebuilder:validation:Enum=always;never
	// Denotes whether a CAPTenant can be upgraded. One of ('always', 'never')
	VersionUpgradeStrategy VersionUpgradeStrategyType `json:"versionUpgradeStrategy,omitempty"`
}

CAPTenantSpec defines the desired state of the CAPTenant

func (*CAPTenantSpec) DeepCopy

func (in *CAPTenantSpec) DeepCopy() *CAPTenantSpec

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

func (*CAPTenantSpec) DeepCopyInto

func (in *CAPTenantSpec) DeepCopyInto(out *CAPTenantSpec)

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

type CAPTenantState

type CAPTenantState string
const (
	// Tenant is being provisioned
	CAPTenantStateProvisioning CAPTenantState = "Provisioning"
	// Tenant provisioning ended in error
	CAPTenantStateProvisioningError CAPTenantState = "ProvisioningError"
	// Tenant is being upgraded
	CAPTenantStateUpgrading CAPTenantState = "Upgrading"
	// Tenant upgrade failed
	CAPTenantStateUpgradeError CAPTenantState = "UpgradeError"
	// Deletion has been triggered
	CAPTenantStateDeleting CAPTenantState = "Deleting"
	// Tenant has been provisioned/upgraded and is now ready for use
	CAPTenantStateReady CAPTenantState = "Ready"
)

type CAPTenantStatus

type CAPTenantStatus struct {
	GenericStatus `json:",inline"`
	// +kubebuilder:validation:Enum="";Ready;Provisioning;Upgrading;Deleting;ProvisioningError;UpgradeError
	// State of CAPTenant
	State CAPTenantState `json:"state"`
	// Specifies the current version of the tenant after provisioning or upgrade
	CurrentCAPApplicationVersionInstance string `json:"currentCAPApplicationVersionInstance,omitempty"`
	// Previous versions of the tenant (first to last)
	PreviousCAPApplicationVersions []string `json:"previousCAPApplicationVersions,omitempty"`
	// The last time a full reconciliation was completed
	LastFullReconciliationTime metav1.Time `json:"lastFullReconciliationTime,omitempty"`
}

func (*CAPTenantStatus) DeepCopy

func (in *CAPTenantStatus) DeepCopy() *CAPTenantStatus

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

func (*CAPTenantStatus) DeepCopyInto

func (in *CAPTenantStatus) DeepCopyInto(out *CAPTenantStatus)

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

type CommonDetails added in v0.1.0

type CommonDetails struct {
	// Image info for the container
	Image string `json:"image"`
	// Pull policy for the container image
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
	// Entrypoint array for the container
	Command []string `json:"command,omitempty"`
	// Environment Config for the Container
	Env []corev1.EnvVar `json:"env,omitempty"`
	// Volume Configuration for the Pod
	Volumes []corev1.Volume `json:"volumes,omitempty"`
	// Volume Mount Configuration for the Container
	VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
	// Name of the ServiceAccount to use to run the Pod
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
	// Resources
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
	// SecurityContext for the Container
	SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`
	// SecurityContext for the Pod
	PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`
	// The name of the node to which the Pod should be assigned to. See: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodename
	NodeName string `json:"nodeName,omitempty"`
	// The label selectors using which node for the Pod would be determined. See: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// Priority class name mapping used to prioritize and schedule the Pod. See: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass
	PriorityClassName string `json:"priorityClassName,omitempty"`
	// Affinity/anti-affinity used to provide more constraints for node selection. See: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity
	Affinity *corev1.Affinity `json:"affinity,omitempty"`
	// Tolerations used to schedule the Pod. See: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
	// The Topology spread constraints used to control how Pods are spread across regions, zones, nodes etc. See: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#pod-topology-spread-constraints
	TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
}

CommonDetails specifies the common details of the Container/Pod that may be relevant for both Deployments and Jobs

func (*CommonDetails) DeepCopy added in v0.1.0

func (in *CommonDetails) DeepCopy() *CommonDetails

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

func (*CommonDetails) DeepCopyInto added in v0.1.0

func (in *CommonDetails) DeepCopyInto(out *CommonDetails)

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

type DeploymentDetails

type DeploymentDetails struct {
	CommonDetails `json:",inline"`
	// Type of the Deployment
	Type DeploymentType `json:"type"`
	// Number of replicas
	Replicas *int32 `json:"replicas,omitempty"`
	// Port configuration
	Ports []Ports `json:"ports,omitempty"`
	// Liveness probe
	LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty"`
	//  Readiness probe
	ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty"`
}

DeploymentDetails specifies the details of the Deployment

func (*DeploymentDetails) DeepCopy

func (in *DeploymentDetails) DeepCopy() *DeploymentDetails

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

func (*DeploymentDetails) DeepCopyInto

func (in *DeploymentDetails) DeepCopyInto(out *DeploymentDetails)

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

type DeploymentType

type DeploymentType string

Type of deployment

const (
	// CAP backend server deployment type
	DeploymentCAP DeploymentType = "CAP"
	// Application router deployment type
	DeploymentRouter DeploymentType = "Router"
	// Additional deployment type
	DeploymentAdditional DeploymentType = "Additional"
)

type GenericStatus

type GenericStatus struct {
	// Observed generation of the resource where this status was identified
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// State expressed as conditions
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

Custom resource status

func (*GenericStatus) DeepCopy

func (in *GenericStatus) DeepCopy() *GenericStatus

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

func (*GenericStatus) DeepCopyInto

func (in *GenericStatus) DeepCopyInto(out *GenericStatus)

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

func (*GenericStatus) SetStatusCondition

func (status *GenericStatus) SetStatusCondition(condition metav1.Condition)

type JobDetails

type JobDetails struct {
	CommonDetails `json:",inline"`
	// Type of Job
	Type JobType `json:"type"`
	// Specifies the number of retries before marking this job failed.
	BackoffLimit *int32 `json:"backoffLimit,omitempty"`
	// Specifies the time after which the job may be cleaned up.
	TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"`
}

JobDetails specifies the details of the Job

func (*JobDetails) DeepCopy

func (in *JobDetails) DeepCopy() *JobDetails

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

func (*JobDetails) DeepCopyInto

func (in *JobDetails) DeepCopyInto(out *JobDetails)

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

type JobType

type JobType string

Type of Job

const (
	// job for deploying content or configuration to (BTP) services
	JobContent JobType = "Content"
	// job for tenant operation e.g. deploying relevant data to a tenant
	JobTenantOperation JobType = "TenantOperation"
	// job for custom tenant operation e.g. pre/post hooks for a tenant operation
	JobCustomTenantOperation JobType = "CustomTenantOperation"
)

type NameValue

type NameValue struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

Generic Name/Value configuration

func (*NameValue) DeepCopy

func (in *NameValue) DeepCopy() *NameValue

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

func (*NameValue) DeepCopyInto

func (in *NameValue) DeepCopyInto(out *NameValue)

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

type PortNetworkPolicyType

type PortNetworkPolicyType string

Type of NetworkPolicy for the port

const (
	// Expose the port for the current application versions pod(s) scope
	PortNetworkPolicyTypeApplication PortNetworkPolicyType = "Application"
	// Expose the port for any pod(s) in the overall cluster scope
	PortNetworkPolicyTypeCluster PortNetworkPolicyType = "Cluster"
)

type Ports

type Ports struct {
	// App protocol used by the service port
	AppProtocol *string `json:"appProtocol,omitempty"`
	// Name of the service port
	Name string `json:"name"`
	// +kubebuilder:validation:Enum=Application;Cluster
	// Network Policy of the service port
	NetworkPolicy PortNetworkPolicyType `json:"networkPolicy,omitempty"`
	// The port number used for container and the corresponding service (if any)
	Port int32 `json:"port"`
	// Destination name which may be used by the Router deployment to reach this backend service
	RouterDestinationName string `json:"routerDestinationName,omitempty"`
}

Configuration of Service Ports for the deployment

func (*Ports) DeepCopy

func (in *Ports) DeepCopy() *Ports

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

func (*Ports) DeepCopyInto

func (in *Ports) DeepCopyInto(out *Ports)

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

type ServiceInfo

type ServiceInfo struct {
	// A unique name of service based on usage in the app (this may be the name of the instance or binding)
	Name string `json:"name"`
	// Secret containing service access credentials
	Secret string `json:"secret"`
	// Type of service
	Class string `json:"class"`
}

Service information

func (*ServiceInfo) DeepCopy

func (in *ServiceInfo) DeepCopy() *ServiceInfo

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

func (*ServiceInfo) DeepCopyInto

func (in *ServiceInfo) DeepCopyInto(out *ServiceInfo)

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

type StatusConditionType

type StatusConditionType string
const (
	ConditionTypeReady StatusConditionType = "Ready"
)

type TenantOperationWorkloadReference

type TenantOperationWorkloadReference struct {
	// Reference to a specified workload of type 'TenantOperation' or 'CustomTenantOperation'
	WorkloadName string `json:"workloadName"`
	// Indicates whether to proceed with remaining operation steps in case of failure. Relevant only for 'CustomTenantOperation'
	ContinueOnFailure bool `json:"continueOnFailure,omitempty"`
}

func (*TenantOperationWorkloadReference) DeepCopy

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

func (*TenantOperationWorkloadReference) DeepCopyInto

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

type TenantOperations

type TenantOperations struct {
	// Tenant provisioning steps
	Provisioning []TenantOperationWorkloadReference `json:"provisioning,omitempty"`
	// Tenant upgrade steps
	Upgrade []TenantOperationWorkloadReference `json:"upgrade,omitempty"`
	// Tenant deprovisioning steps
	Deprovisioning []TenantOperationWorkloadReference `json:"deprovisioning,omitempty"`
}

Configuration used to sequence tenant related jobs for a given tenant operation

func (*TenantOperations) DeepCopy

func (in *TenantOperations) DeepCopy() *TenantOperations

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

func (*TenantOperations) DeepCopyInto

func (in *TenantOperations) DeepCopyInto(out *TenantOperations)

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

type VersionUpgradeStrategyType

type VersionUpgradeStrategyType string
const (
	// Always (default)
	VersionUpgradeStrategyTypeAlways VersionUpgradeStrategyType = "always"
	// Never
	VersionUpgradeStrategyTypeNever VersionUpgradeStrategyType = "never"
)

type WorkloadDetails

type WorkloadDetails struct {
	// Name of the workload
	Name string `json:"name"`
	// List of BTP services consumed by the current application component workload. These services must be defined in the corresponding CAPApplication.
	ConsumedBTPServices []string `json:"consumedBTPServices"`
	// Custom labels for the current workload
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations for the current workload, in case of `Deployments` this also get copied over to any `Service` that may be created
	Annotations map[string]string `json:"annotations,omitempty"`
	// Definition of a deployment
	DeploymentDefinition *DeploymentDetails `json:"deploymentDefinition,omitempty"`
	// Definition of a job
	JobDefinition *JobDetails `json:"jobDefinition,omitempty"`
}

WorkloadDetails specifies the details of the Workload

func (*WorkloadDetails) DeepCopy

func (in *WorkloadDetails) DeepCopy() *WorkloadDetails

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

func (*WorkloadDetails) DeepCopyInto

func (in *WorkloadDetails) DeepCopyInto(out *WorkloadDetails)

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