diff --git a/api/v1alpha1/deploymenttarget_types.go b/api/v1alpha1/deploymenttarget_types.go deleted file mode 100644 index 31dfb1d..0000000 --- a/api/v1alpha1/deploymenttarget_types.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -Copyright 2023 Red Hat, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. - -// DeploymentTargetSpec defines the desired state of DeploymentTarget -type DeploymentTargetSpec struct { - DeploymentTargetClassName DeploymentTargetClassName `json:"deploymentTargetClassName"` - - KubernetesClusterCredentials DeploymentTargetKubernetesClusterCredentials `json:"kubernetesCredentials"` - - ClaimRef string `json:"claimRef,omitempty"` -} - -// DeploymentTargetKubernetesClusterCredentials defines the K8s cluster credentials for the DeploymentTarget. -type DeploymentTargetKubernetesClusterCredentials struct { - DefaultNamespace string `json:"defaultNamespace"` - - // APIURL is a reference to a cluster API url. - APIURL string `json:"apiURL"` - - // ClusterCredentialsSecret is a reference to the name of k8s Secret that contains a kubeconfig. - ClusterCredentialsSecret string `json:"clusterCredentialsSecret"` - - // Indicates that a Service should not check the TLS certificate when connecting to this target. - AllowInsecureSkipTLSVerify bool `json:"allowInsecureSkipTLSVerify"` -} - -// DeploymentTargetStatus defines the observed state of DeploymentTarget -type DeploymentTargetStatus struct { - Phase DeploymentTargetPhase `json:"phase,omitempty"` - - // Conditions is an array of the DeploymentTarget's status conditions - Conditions []metav1.Condition `json:"conditions,omitempty"` -} - -type DeploymentTargetPhase string - -const ( - // DT is not yet available for binding. - DeploymentTargetPhase_Pending DeploymentTargetPhase = "Pending" - - // DT waits for a Claim to be bound to. - DeploymentTargetPhase_Available DeploymentTargetPhase = "Available" - - // The DT was bounded to a DTC. - DeploymentTargetPhase_Bound DeploymentTargetPhase = "Bound" - - // The DT was previously bound to a DTC which got deleted. external resources were not freed. - DeploymentTargetPhase_Released DeploymentTargetPhase = "Released" - - // DT was released from its claim, but there was a failure during the release of external resources. - DeploymentTargetPhase_Failed DeploymentTargetPhase = "Failed" -) - -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status - -// DeploymentTarget is the Schema for the deploymenttargets API. -// A deployment target, usually a K8s api endpoint. The credentials for connecting -// to the target will be stored in a secret which will be referenced in the clusterCredentialsSecret field -type DeploymentTarget struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec DeploymentTargetSpec `json:"spec,omitempty"` - Status DeploymentTargetStatus `json:"status,omitempty"` -} - -//+kubebuilder:object:root=true - -// DeploymentTargetList contains a list of DeploymentTarget -type DeploymentTargetList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []DeploymentTarget `json:"items"` -} - -func init() { - SchemeBuilder.Register(&DeploymentTarget{}, &DeploymentTargetList{}) -} diff --git a/api/v1alpha1/deploymenttargetclaim_types.go b/api/v1alpha1/deploymenttargetclaim_types.go deleted file mode 100644 index 78c63c0..0000000 --- a/api/v1alpha1/deploymenttargetclaim_types.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -Copyright 2023 Red Hat, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. - -// DeploymentTargetClaimSpec defines the desired state of DeploymentTargetClaim -type DeploymentTargetClaimSpec struct { - DeploymentTargetClassName DeploymentTargetClassName `json:"deploymentTargetClassName"` - TargetName string `json:"targetName,omitempty"` -} - -type DeploymentTargetClassName string - -// DeploymentTargetClaimStatus defines the observed state of DeploymentTargetClaim -type DeploymentTargetClaimStatus struct { - Phase DeploymentTargetClaimPhase `json:"phase,omitempty"` - - // Conditions is an array of the DeploymentTargetClaim's status conditions - Conditions []metav1.Condition `json:"conditions,omitempty"` -} - -type DeploymentTargetClaimPhase string - -const ( - // DTC wait for the binding controller or user to bind it with a DT that satisfies it. - DeploymentTargetClaimPhase_Pending DeploymentTargetClaimPhase = "Pending" - - // The DTC was bounded to a DT that satisfies it by the binding controller. - DeploymentTargetClaimPhase_Bound DeploymentTargetClaimPhase = "Bound" - - // The DTC lost its bounded DT. The DT doesn’t exist anymore because it got deleted. - DeploymentTargetClaimPhase_Lost DeploymentTargetClaimPhase = "Lost" -) - -const ( - // Annotation to indicate that the binding controller completed the binding process. - AnnBindCompleted string = "dt.appstudio.redhat.com/bind-complete" - - // Annotation to indicate that the binding controller bind the DTC to a DT. - // In practice it means that the controller set the DTC.spec.Target to the value of DT.Name - AnnBoundByController string = "dt.appstudio.redhat.com/bound-by-controller" - - // Annotation to indicate that a DT should be dynamically provisioned for the - // DTC by the provisioner whose name appear in the value. - AnnTargetProvisioner string = "provisioner.appstudio.redhat.com/dt-provisioner" - - // Annotation to indicate the name of the provisioner that provisioned the DT. - AnnDynamicallyProvisioned string = "provisioner.appstudio.redhat.com/provisioned-by" - - // Finalizer added by the binding controller to handle the deletion of DeploymentTargetClaim. - FinalizerBinder string = "binder.appstudio.redhat.com/finalizer" - - // AnnBinderValueTrue is a true value to annotations bind-complete and bound-by-controller. - AnnBinderValueTrue string = "true" -) - -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status - -// DeploymentTargetClaim is the Schema for the deploymenttargetclaims API. -// It represents a request for a DeploymentTarget. -type DeploymentTargetClaim struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec DeploymentTargetClaimSpec `json:"spec,omitempty"` - Status DeploymentTargetClaimStatus `json:"status,omitempty"` -} - -//+kubebuilder:object:root=true - -// DeploymentTargetClaimList contains a list of DeploymentTargetClaim -type DeploymentTargetClaimList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []DeploymentTargetClaim `json:"items"` -} - -func init() { - SchemeBuilder.Register(&DeploymentTargetClaim{}, &DeploymentTargetClaimList{}) -} diff --git a/api/v1alpha1/deploymenttargetclass_types.go b/api/v1alpha1/deploymenttargetclass_types.go deleted file mode 100644 index cf3c530..0000000 --- a/api/v1alpha1/deploymenttargetclass_types.go +++ /dev/null @@ -1,86 +0,0 @@ -/* -Copyright 2023 Red Hat, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. - -// DeploymentTargetClassSpec defines the desired state of DeploymentTargetClass -type DeploymentTargetClassSpec struct { - Provisioner Provisioner `json:"provisioner"` - - // Parameters are used to forward additional information to the provisioner. - Parameters DeploymentTargetParameters `json:"parameters,omitempty"` - - // The reclaimPolicy field will tell the provisioner what to do with the DT - // once its corresponding DTC is deleted, the values can be Retain or Delete. - ReclaimPolicy ReclaimPolicy `json:"reclaimPolicy"` -} - -type Provisioner string - -const ( - Provisioner_Devsandbox Provisioner = "appstudio.redhat.com/devsandbox" -) - -type ReclaimPolicy string - -const ( - ReclaimPolicy_Delete ReclaimPolicy = "Delete" - ReclaimPolicy_Retain ReclaimPolicy = "Retain" -) - -// Parameters are used to forward additional information to the provisioner. -type DeploymentTargetParameters struct { -} - -// DeploymentTargetClassStatus defines the observed state of DeploymentTargetClass -type DeploymentTargetClassStatus struct { - // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster - // Important: Run "make" to regenerate code after modifying this file -} - -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status -//+kubebuilder:resource:scope=Cluster - -// DeploymentTargetClass is the Schema for the deploymenttargetclasses API. -// Defines DeploymentTarget properties that should be abstracted from the controller/user -// that creates a DTC and wants a DT to be provisioned automatically for it. -type DeploymentTargetClass struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec DeploymentTargetClassSpec `json:"spec,omitempty"` - Status DeploymentTargetClassStatus `json:"status,omitempty"` -} - -//+kubebuilder:object:root=true - -// DeploymentTargetClassList contains a list of DeploymentTargetClass -type DeploymentTargetClassList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []DeploymentTargetClass `json:"items"` -} - -func init() { - SchemeBuilder.Register(&DeploymentTargetClass{}, &DeploymentTargetClassList{}) -} diff --git a/api/v1alpha1/environment_types.go b/api/v1alpha1/environment_types.go deleted file mode 100644 index 197cc2a..0000000 --- a/api/v1alpha1/environment_types.go +++ /dev/null @@ -1,208 +0,0 @@ -/* -Copyright 2022-2023. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// EnvironmentSpec defines the desired state of Environment -type EnvironmentSpec struct { - - // DEPRECATED: Type is whether the Environment is a POC or non-POC environment - // - This field is deprecated, and should not be used. - Type EnvironmentType `json:"type,omitempty"` - - // DisplayName is the user-visible, user-definable name for the environment (but not used for functional requirements) - DisplayName string `json:"displayName"` - - // DeploymentStrategy is the promotion strategy for the Environment - // See Environment API doc for details. - DeploymentStrategy DeploymentStrategyType `json:"deploymentStrategy"` - - // ParentEnvironment references another Environment defined in the namespace: when automated promotion is enabled, - // promotions to the parent environment will cause this environment to be promoted to. - // See Environment API doc for details. - ParentEnvironment string `json:"parentEnvironment,omitempty"` - - // Tags are a user-visisble, user-definable set of tags that can be applied to the environment - Tags []string `json:"tags,omitempty"` - - // Configuration contains environment-specific details for Applications/Components that are deployed to - // the Environment. - Configuration EnvironmentConfiguration `json:"configuration,omitempty"` - - // UnstableConfigurationFields are experimental/prototype: the API has not been finalized here, and is subject to breaking changes. - // See comment on UnstableEnvironmentConfiguration for details. - UnstableConfigurationFields *UnstableEnvironmentConfiguration `json:"unstableConfigurationFields,omitempty"` -} - -// DEPRECATED: EnvironmentType should no longer be used, and has no replacement. -// - It's original purpose was to indicate whether an environment is POC/Non-POC, but these data were ultimately not required. -type EnvironmentType string - -const ( - // DEPRECATED: EnvironmentType_POC should no longer be used, and has no replacement. - EnvironmentType_POC EnvironmentType = "POC" - - // DEPRECATED: EnvironmentType_NonPOC should no longer be used, and has no replacement. - EnvironmentType_NonPOC EnvironmentType = "Non-POC" -) - -// DeploymentStrategyType defines the available promotion/deployment strategies for an Environment -// See Environment API doc for details. -type DeploymentStrategyType string - -const ( - // DeploymentStrategy_Manual: Promotions to an Environment with this strategy will occur due to explicit user intent - DeploymentStrategy_Manual DeploymentStrategyType = "Manual" - - // DeploymentStrategy_AppStudioAutomated: Promotions to an Environment with this strategy will occur if a previous ("parent") - // environment in the environment graph was successfully promoted to. - // See Environment API doc for details. - DeploymentStrategy_AppStudioAutomated DeploymentStrategyType = "AppStudioAutomated" -) - -// UnstableEnvironmentConfiguration contains fields that are related to configuration of the target environment: -// - credentials for connecting to the cluster -// -// Note: as of this writing (Jul 2022), I expect the contents of this struct to undergo major changes, and the API should not be considered -// complete, or even a reflection of final desired state. -type UnstableEnvironmentConfiguration struct { - // ClusterType indicates whether the target environment is Kubernetes or OpenShift - ClusterType ConfigurationClusterType `json:"clusterType,omitempty"` - - // KubernetesClusterCredentials contains cluster credentials for a target Kubernetes/OpenShift cluster. - KubernetesClusterCredentials `json:"kubernetesCredentials,omitempty"` -} - -type ConfigurationClusterType string - -const ( - // ConfigurationClusterType_Kubernetes indicates the target environment is generic Kubernetes - ConfigurationClusterType_Kubernetes ConfigurationClusterType = "Kubernetes" - - // ConfigurationClusterType_OpenShift indicates the target environment is OpenShift - ConfigurationClusterType_OpenShift ConfigurationClusterType = "OpenShift" -) - -// KubernetesClusterCredentials contains cluster credentials for a target Kubernetes/OpenShift cluster. -// -// See this temporary URL for details on what values to provide for the APIURL and Secret: -// https://github.com/redhat-appstudio/managed-gitops/tree/main/examples/m6-demo#gitopsdeploymentmanagedenvironment-resource -type KubernetesClusterCredentials struct { - - // TargetNamespace is the default destination target on the cluster for deployments. This Namespace will be used - // for any GitOps repository K8s resources where the `.metadata.Namespace` field is not specified. - TargetNamespace string `json:"targetNamespace"` - - // APIURL is a reference to a cluster API url defined within the kube config file of the cluster credentials secret. - APIURL string `json:"apiURL"` - - // IngressDomain is the cluster's ingress domain. - // For example, in minikube it would be $(minikube ip).nip.io and in OCP it would look like apps.xyz.rhcloud.com. - // If clusterType == "Kubernetes", ingressDomain is mandatory and is enforced by the webhook validation - IngressDomain string `json:"ingressDomain,omitempty"` - - // ClusterCredentialsSecret is a reference to the name of k8s Secret, defined within the same namespace as the Environment resource, - // that contains a kubeconfig. - // The Secret must be of type 'managed-gitops.redhat.com/managed-environment' - // - // See this temporary URL for details: - // https://github.com/redhat-appstudio/managed-gitops/tree/main/examples/m6-demo#gitopsdeploymentmanagedenvironment-resource - ClusterCredentialsSecret string `json:"clusterCredentialsSecret"` - - // Indicates that ArgoCD/GitOps Service should not check the TLS certificate. - AllowInsecureSkipTLSVerify bool `json:"allowInsecureSkipTLSVerify"` - - // Namespaces allows one to indicate which Namespaces the Secret's ServiceAccount has access to. - // - // Optional, defaults to empty. If empty, it is assumed that the ServiceAccount has access to all Namespaces. - // - // The ServiceAccount that GitOps Service/Argo CD uses to deploy may not have access to all of the Namespaces on a cluster. - // If not specified, it is assumed that the Argo CD ServiceAccount has read/write at cluster-scope. - // - If you are familiar with Argo CD: this field is equivalent to the field of the same name in the Argo CD Cluster Secret. - Namespaces []string `json:"namespaces,omitempty"` - - // ClusterResources is used in conjuction with the Namespace field. - // If the Namespaces field is non-empty, this field will be used to determine whether Argo CD should - // attempt to manage cluster-scoped resources. - // - If Namespaces field is empty, this field is not used. - // - If you are familiar with Argo CD: this field is equivalent to the field of the same name in the Argo CD Cluster Secret. - // - // Optional, default to false. - ClusterResources bool `json:"clusterResources,omitempty"` -} - -// EnvironmentConfiguration contains Environment-specific configurations details, to be used when generating -// Component/Application GitOps repository resources. -type EnvironmentConfiguration struct { - // Env is an array of standard environment vairables - Env []EnvVarPair `json:"env,omitempty"` - - // Target is used to reference a DeploymentTargetClaim for a target Environment. - // The Environment controller uses the referenced DeploymentTargetClaim to access its bounded - // DeploymentTarget with cluster credential secret. - Target EnvironmentTarget `json:"target,omitempty"` -} - -// EnvironmentTarget provides the configuration for a deployment target. -type EnvironmentTarget struct { - DeploymentTargetClaim DeploymentTargetClaimConfig `json:"deploymentTargetClaim"` -} - -// DeploymentTargetClaimConfig specifies the DeploymentTargetClaim details for a given Environment. -type DeploymentTargetClaimConfig struct { - ClaimName string `json:"claimName"` -} - -// EnvironmentStatus defines the observed state of Environment -type EnvironmentStatus struct { - Conditions []metav1.Condition `json:"conditions,omitempty"` -} - -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status - -// Environment is the Schema for the environments API -// +kubebuilder:resource:path=environments,shortName=env -type Environment struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec EnvironmentSpec `json:"spec,omitempty"` - Status EnvironmentStatus `json:"status,omitempty"` -} - -// GetDeploymentTargetClaimName returns the name of the DeploymentTargetClaim -// associated with this Environment -func (e *Environment) GetDeploymentTargetClaimName() string { - return e.Spec.Configuration.Target.DeploymentTargetClaim.ClaimName -} - -//+kubebuilder:object:root=true - -// EnvironmentList contains a list of Environment -type EnvironmentList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []Environment `json:"items"` -} - -func init() { - SchemeBuilder.Register(&Environment{}, &EnvironmentList{}) -} diff --git a/api/v1alpha1/promotionrun_types.go b/api/v1alpha1/promotionrun_types.go deleted file mode 100644 index 1ab767e..0000000 --- a/api/v1alpha1/promotionrun_types.go +++ /dev/null @@ -1,198 +0,0 @@ -/* -Copyright 2022. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// PromotionRunSpec defines the desired state of PromotionRun -type PromotionRunSpec struct { - - // Snapshot refers to the name of a Snapshot resource defined within the namespace, used to promote container images between Environments. - Snapshot string `json:"snapshot"` - - // Application is the name of an Application resource defined within the namespaced, and which is the target of the promotion - Application string `json:"application"` - - // ManualPromotion is for fields specific to manual promotion. - // Only one field should be defined: either 'manualPromotion' or 'automatedPromotion', but not both. - ManualPromotion ManualPromotionConfiguration `json:"manualPromotion,omitempty"` - - // AutomatedPromotion is for fields specific to automated promotion - // Only one field should be defined: either 'manualPromotion' or 'automatedPromotion', but not both. - AutomatedPromotion AutomatedPromotionConfiguration `json:"automatedPromotion,omitempty"` -} - -// ManualPromotionConfiguration defines promotion parameters specific to manual promotion: the target environment to promote to. -type ManualPromotionConfiguration struct { - // TargetEnvironment is the environment to promote to - TargetEnvironment string `json:"targetEnvironment"` -} - -// AutomatedPromotionConfiguration defines promotion parameters specific to automated promotion: the initial environment -// (in the promotion graph) to begin promoting on. -type AutomatedPromotionConfiguration struct { - // InitialEnvironment: start iterating through the digraph, beginning with the value specified in 'initialEnvironment' - InitialEnvironment string `json:"initialEnvironment"` -} - -// PromotionRunStatus defines the observed state of PromotionRun -type PromotionRunStatus struct { - - // State indicates whether or not the overall promotion (either manual or automated is complete) - State PromotionRunState `json:"state"` - - // CompletionResult indicates success/failure once the promotion has completed all work. - // CompletionResult will only have a value if State field is 'Complete'. - CompletionResult PromotionRunCompleteResult `json:"completionResult,omitempty"` - - // EnvironmentStatus represents the set of steps taken during the current promotion - EnvironmentStatus []PromotionRunEnvironmentStatus `json:"environmentStatus,omitempty"` - - // ActiveBindings is the list of active bindings currently being promoted to: - // - For an automated promotion, there can be multiple active bindings at a time (one for each env at a particular tree depth) - // - For a manual promotion, there will be only one. - ActiveBindings []string `json:"activeBindings,omitempty"` - - // PromotionStartTime is set to the value when the PromotionRun Reconciler first started the promotion. - PromotionStartTime metav1.Time `json:"promotionStartTime,omitempty"` - - Conditions []PromotionRunCondition `json:"conditions,omitempty"` -} - -// PromotionRunState defines the 3 states of an Promotion resource. -type PromotionRunState string - -const ( - PromotionRunState_Active PromotionRunState = "Active" - PromotionRunState_Waiting PromotionRunState = "Waiting" - PromotionRunState_Complete PromotionRunState = "Complete" -) - -// PromotionRunCompleteResult defines the success/failure states if the PromotionRunState is 'Complete'. -type PromotionRunCompleteResult string - -const ( - PromotionRunCompleteResult_Success PromotionRunCompleteResult = "Success" - PromotionRunCompleteResult_Failure PromotionRunCompleteResult = "Failure" -) - -// PromotionRunEnvironmentStatus represents the set of steps taken during the current promotion: -// - manual promotions will only have a single step. -// - automated promotions may have one or more steps, depending on how many environments have been promoted to. -type PromotionRunEnvironmentStatus struct { - - // Step is the sequential number of the step in the array, starting with 1 - Step int `json:"step"` - - // EnvironmentName is the name of the environment that was promoted to in this step - EnvironmentName string `json:"environmentName"` - - // Status is/was the result of promoting to that environment. - Status PromotionRunEnvironmentStatusField `json:"status"` - - // DisplayStatus is human-readible description of the current state/status. - DisplayStatus string `json:"displayStatus"` -} - -// PromotionRunEnvironmentStatusField are the state values for promotion to individual enviroments, as -// used by the Status field of PromotionRunEnvironmentStatus -type PromotionRunEnvironmentStatusField string - -const ( - PromotionRunEnvironmentStatus_Success PromotionRunEnvironmentStatusField = "Success" - PromotionRunEnvironmentStatus_InProgress PromotionRunEnvironmentStatusField = "In Progress" - PromotionRunEnvironmentStatus_Failed PromotionRunEnvironmentStatusField = "Failed" -) - -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status - -// PromotionRun is the Schema for the promotionruns API -// +kubebuilder:resource:path=promotionruns,shortName=apr;promotion -type PromotionRun struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec PromotionRunSpec `json:"spec,omitempty"` - Status PromotionRunStatus `json:"status,omitempty"` -} - -//+kubebuilder:object:root=true - -// PromotionRunList contains a list of PromotionRun -type PromotionRunList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []PromotionRun `json:"items"` -} - -func init() { - SchemeBuilder.Register(&PromotionRun{}, &PromotionRunList{}) -} - -// PromotionRunCondition contains details about an PromotionRun condition, which is usually an error or warning -type PromotionRunCondition struct { - // Type is a PromotionRun condition type - Type PromotionRunConditionType `json:"type"` - - // Message contains human-readable message indicating details about the last condition. - // +optional - Message string `json:"message"` - - // LastProbeTime is the last time the condition was observed. - // +optional - LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"` - - // LastTransitionTime is the last time the condition transitioned from one status to another. - // +optional - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - - // Status is the status of the condition. - Status PromotionRunConditionStatus `json:"status"` - - // Reason is a unique, one-word, CamelCase reason for the condition's last transition. - // +optional - Reason PromotionRunReasonType `json:"reason"` -} - -// PromotionRunConditionType represents type of GitOpsDeployment condition. -type PromotionRunConditionType string - -const ( - PromotionRunConditionErrorOccurred PromotionRunConditionType = "ErrorOccurred" -) - -// PromotionRunConditionStatus is a type which represents possible comparison results -type PromotionRunConditionStatus string - -// PromotionRun Condition Status -const ( - // PromotionRunConditionStatusTrue indicates that a condition type is true - PromotionRunConditionStatusTrue PromotionRunConditionStatus = "True" - // PromotionRunConditionStatusFalse indicates that a condition type is false - PromotionRunConditionStatusFalse PromotionRunConditionStatus = "False" - // PromotionRunConditionStatusUnknown indicates that the condition status could not be reliably determined - PromotionRunConditionStatusUnknown PromotionRunConditionStatus = "Unknown" -) - -type PromotionRunReasonType string - -const ( - PromotionRunReasonErrorOccurred PromotionRunReasonType = "ErrorOccurred" -) diff --git a/api/v1alpha1/snapshotenvironmentbinding_types.go b/api/v1alpha1/snapshotenvironmentbinding_types.go deleted file mode 100644 index 1330c2a..0000000 --- a/api/v1alpha1/snapshotenvironmentbinding_types.go +++ /dev/null @@ -1,231 +0,0 @@ -/* -Copyright 2022-2023 Red Hat, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// Constants used with SnapshotEnvironmentBindingStatus's ComponentDeploymentConditions field -const ( - ComponentDeploymentConditionAllComponentsDeployed = "AllComponentsDeployed" - ComponentDeploymentConditionCommitsSynced = "CommitsSynced" - ComponentDeploymentConditionCommitsUnsynced = "CommitsUnsynced" - ComponentDeploymentConditionErrorOccurred = "ErrorOccurred" -) - -// See 'SnapshotEnvironmentBinding' resource for details of this resource. SnapshotEnvironmentBindingSpec defines the desired state of SnapshotEnvironmentBinding. -type SnapshotEnvironmentBindingSpec struct { - - // Application is a reference to the Application resource (defined in the same namespace) that we are deploying as part of this SnapshotEnvironmentBinding. - // Required - // +required - Application string `json:"application"` - - // Environment is the environment resource (defined in the namespace) that the binding will deploy to. - // Required - // +required - Environment string `json:"environment"` - - // Snapshot is the Snapshot resource (defined in the namespace) that contains the container image versions - // for the components of the Application. - // Required - // +required - Snapshot string `json:"snapshot"` - - // Component-specific configuration information, used when generating GitOps repository resources. - // Required. - // +required - Components []BindingComponent `json:"components"` -} - -// BindingComponent contains individual component data -type BindingComponent struct { - - // Name is the name of the component. - Name string `json:"name"` - - // Configuration describes GitOps repository customizations that are specific to the - // the component-application-environment combination. - // - Values defined in this struct will overwrite values from Application/Environment/Component. - // Optional - // +optional - Configuration BindingComponentConfiguration `json:"configuration,omitempty"` -} - -// BindingComponentConfiguration describes GitOps repository customizations that are specific to the -// the component-application-environment combination. -type BindingComponentConfiguration struct { - // NOTE: The specific fields, and their form, to be included are TBD. - - // API discussion concluded with no obvious need for target port; it is thus excluded here. - // Let us know if you have a requirement here. - // - // TargetPort int `json:"targetPort"` - - // Replicas defines the number of replicas to use for the component - // Optional - // +optional - Replicas *int `json:"replicas,omitempty"` - - // Resources defines the Compute Resources required by the component. - // Optional. - // +optional - Resources *corev1.ResourceRequirements `json:"resources,omitempty"` - - // Env describes environment variables to use for the component. - // Optional. - // +optional - Env []EnvVarPair `json:"env,omitempty"` -} - -// EnvVarPair describes environment variables to use for the component -type EnvVarPair struct { - - // Name is the environment variable name - Name string `json:"name"` - - // Value is the environment variable value - Value string `json:"value"` -} - -// BindingComponentGitOpsRepository is a reference to a GitOps repository, including path/branch -// where the application/component/environment resources can be found (usually via a kustomize overlay). -type BindingComponentGitOpsRepository struct { - - // URL is the Git repository URL - // e.g. The Git repository that contains the K8s resources to deployment for the component of the application. - URL string `json:"url"` - - // Branch is the branch to use when accessing the GitOps repository - Branch string `json:"branch"` - - // Path is a pointer to a folder in the GitOps repo, containing a kustomization.yaml - // NOTE: Each component-env combination must have it's own separate path - Path string `json:"path"` - - // GeneratedResources contains the list of GitOps repository resources generated by the application service controller - // in the overlays/ dir, for example, 'deployment-patch.yaml'. This is stored to differentiate between - // application-service controller generated resources vs resources added by a user - GeneratedResources []string `json:"generatedResources"` - - // CommitID contains the most recent commit ID for which the Kubernetes resources of the Component were modified. - CommitID string `json:"commitID"` -} - -// BindingComponentStatus contains the status of the components -type BindingComponentStatus struct { - - // Name is the name of the component. - Name string `json:"name"` - - // GeneratedRouteName is the name of the route that was generated for the Component, if a Route was generated. - GeneratedRouteName string `json:"generatedRouteName,omitempty"` - - // GitOpsRepository contains the Git URL, path, branch, and most recent commit id for the component - GitOpsRepository BindingComponentGitOpsRepository `json:"gitopsRepository"` -} - -// SnapshotEnvironmentBindingStatus defines the observed state of SnapshotEnvironmentBinding -type SnapshotEnvironmentBindingStatus struct { - - // GitOpsDeployments describes the set of GitOpsDeployment resources that are owned by the SnapshotEnvironmentBinding, and are - // deploying the Components of the Application to the target Environment. - // To determine the health/sync status of a binding, you can look at the GitOpsDeployments decribed here. - GitOpsDeployments []BindingStatusGitOpsDeployment `json:"gitopsDeployments,omitempty"` - - // Components describes a component's GitOps repository information. - // This status is updated by the Application Service controller. - Components []BindingComponentStatus `json:"components,omitempty"` - - // Condition describes operations on the GitOps repository, for example, if there were issues with generating/processing the repository. - // This status is updated by the Application Service controller. - GitOpsRepoConditions []metav1.Condition `json:"gitopsRepoConditions,omitempty"` - - // BindingConditions will contain user-oriented error messages from the SnapshotEnvironmentBinding reconciler. - BindingConditions []metav1.Condition `json:"bindingConditions,omitempty"` - - // ComponentDeploymentConditions describes the deployment status of all of the Components of the Application. - // This status is updated by the Gitops Service's SnapshotEnvironmentBinding controller - ComponentDeploymentConditions []metav1.Condition `json:"componentDeploymentConditions,omitempty"` -} - -// BindingStatusGitOpsDeployment describes an individual reference -// to a GitOpsDeployment resources that is used to deploy this binding. -// -// To determine the health/sync status of a binding, you can look at the GitOpsDeployments decribed here. -type BindingStatusGitOpsDeployment struct { - - // ComponentName is the name of the component in the (component, gitopsdeployment) pair - ComponentName string `json:"componentName"` - - // GitOpsDeployment is a reference to the name of a GitOpsDeployment resource which is used to deploy the binding. - // The Health/sync status for the binding can thus be read from the references GitOpsDeployment - GitOpsDeployment string `json:"gitopsDeployment,omitempty"` - - // GitOpsDeploymentSyncStatus is the sync status of the deployment owned by the binding - GitOpsDeploymentSyncStatus string `json:"syncStatus,omitempty"` - - // GitOpsDeploymentHealthStatus is the health status of the deployment owned by the binding - GitOpsDeploymentHealthStatus string `json:"health,omitempty"` - - // GitOpsDeploymentCommitID is the commit ID of the GitOpsDeployment - GitOpsDeploymentCommitID string `json:"commitID,omitempty"` -} - -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status - -// The `SnapshotEnvironmentBinding` resource specifies the deployment relationship between (a single application, a -// single environment, and a single snapshot) combination. -// -// It can be thought of as a 3-tuple that defines what Application should be deployed to what Environment, and -// which Snapshot should be deployed (Snapshot being the specific component container image versions of that -// Aplication that should be deployed to that Environment). -// -// **Note**: There should not exist multiple SnapshotEnvironmentBinding CRs in a Namespace that share the same -// Application and Environment value. For example: -// - Good: -// - SnapshotEnvironmentBinding A: (application=appA, environment=dev, snapshot=my-snapshot) -// - SnapshotEnvironmentBinding B: (application=appA, environment=staging, snapshot=my-snapshot) -// -// - Bad: -// - SnapshotEnvironmentBinding A: (application=*appA*, environment=*staging*, snapshot=my-snapshot) -// - SnapshotEnvironmentBinding B: (application=*appA*, environment=*staging*, snapshot=second-snapshot) -// -// +kubebuilder:resource:path=snapshotenvironmentbindings,shortName=aseb;binding -type SnapshotEnvironmentBinding struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec SnapshotEnvironmentBindingSpec `json:"spec"` - Status SnapshotEnvironmentBindingStatus `json:"status,omitempty"` -} - -//+kubebuilder:object:root=true - -// SnapshotEnvironmentBindingList contains a list of SnapshotEnvironmentBinding -type SnapshotEnvironmentBindingList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []SnapshotEnvironmentBinding `json:"items"` -} - -func init() { - SchemeBuilder.Register(&SnapshotEnvironmentBinding{}, &SnapshotEnvironmentBindingList{}) -} diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 983c7b9..4a82d68 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -141,118 +141,6 @@ func (in *ApplicationStatus) DeepCopy() *ApplicationStatus { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AutomatedPromotionConfiguration) DeepCopyInto(out *AutomatedPromotionConfiguration) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutomatedPromotionConfiguration. -func (in *AutomatedPromotionConfiguration) DeepCopy() *AutomatedPromotionConfiguration { - if in == nil { - return nil - } - out := new(AutomatedPromotionConfiguration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BindingComponent) DeepCopyInto(out *BindingComponent) { - *out = *in - in.Configuration.DeepCopyInto(&out.Configuration) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BindingComponent. -func (in *BindingComponent) DeepCopy() *BindingComponent { - if in == nil { - return nil - } - out := new(BindingComponent) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BindingComponentConfiguration) DeepCopyInto(out *BindingComponentConfiguration) { - *out = *in - if in.Replicas != nil { - in, out := &in.Replicas, &out.Replicas - *out = new(int) - **out = **in - } - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = new(corev1.ResourceRequirements) - (*in).DeepCopyInto(*out) - } - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]EnvVarPair, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BindingComponentConfiguration. -func (in *BindingComponentConfiguration) DeepCopy() *BindingComponentConfiguration { - if in == nil { - return nil - } - out := new(BindingComponentConfiguration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BindingComponentGitOpsRepository) DeepCopyInto(out *BindingComponentGitOpsRepository) { - *out = *in - if in.GeneratedResources != nil { - in, out := &in.GeneratedResources, &out.GeneratedResources - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BindingComponentGitOpsRepository. -func (in *BindingComponentGitOpsRepository) DeepCopy() *BindingComponentGitOpsRepository { - if in == nil { - return nil - } - out := new(BindingComponentGitOpsRepository) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BindingComponentStatus) DeepCopyInto(out *BindingComponentStatus) { - *out = *in - in.GitOpsRepository.DeepCopyInto(&out.GitOpsRepository) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BindingComponentStatus. -func (in *BindingComponentStatus) DeepCopy() *BindingComponentStatus { - if in == nil { - return nil - } - out := new(BindingComponentStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BindingStatusGitOpsDeployment) DeepCopyInto(out *BindingStatusGitOpsDeployment) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BindingStatusGitOpsDeployment. -func (in *BindingStatusGitOpsDeployment) DeepCopy() *BindingStatusGitOpsDeployment { - if in == nil { - return nil - } - out := new(BindingStatusGitOpsDeployment) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Component) DeepCopyInto(out *Component) { *out = *in @@ -552,100 +440,56 @@ func (in *ComponentStatus) DeepCopy() *ComponentStatus { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentTarget) DeepCopyInto(out *DeploymentTarget) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentTarget. -func (in *DeploymentTarget) DeepCopy() *DeploymentTarget { - if in == nil { - return nil - } - out := new(DeploymentTarget) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DeploymentTarget) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentTargetClaim) DeepCopyInto(out *DeploymentTargetClaim) { +func (in *GitOpsStatus) DeepCopyInto(out *GitOpsStatus) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentTargetClaim. -func (in *DeploymentTargetClaim) DeepCopy() *DeploymentTargetClaim { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitOpsStatus. +func (in *GitOpsStatus) DeepCopy() *GitOpsStatus { if in == nil { return nil } - out := new(DeploymentTargetClaim) + out := new(GitOpsStatus) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DeploymentTargetClaim) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentTargetClaimConfig) DeepCopyInto(out *DeploymentTargetClaimConfig) { +func (in *GitSource) DeepCopyInto(out *GitSource) { *out = *in } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentTargetClaimConfig. -func (in *DeploymentTargetClaimConfig) DeepCopy() *DeploymentTargetClaimConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitSource. +func (in *GitSource) DeepCopy() *GitSource { if in == nil { return nil } - out := new(DeploymentTargetClaimConfig) + out := new(GitSource) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentTargetClaimList) DeepCopyInto(out *DeploymentTargetClaimList) { +func (in *Snapshot) DeepCopyInto(out *Snapshot) { *out = *in out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]DeploymentTargetClaim, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentTargetClaimList. -func (in *DeploymentTargetClaimList) DeepCopy() *DeploymentTargetClaimList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Snapshot. +func (in *Snapshot) DeepCopy() *Snapshot { if in == nil { return nil } - out := new(DeploymentTargetClaimList) + out := new(Snapshot) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DeploymentTargetClaimList) DeepCopyObject() runtime.Object { +func (in *Snapshot) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -653,95 +497,67 @@ func (in *DeploymentTargetClaimList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentTargetClaimSpec) DeepCopyInto(out *DeploymentTargetClaimSpec) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentTargetClaimSpec. -func (in *DeploymentTargetClaimSpec) DeepCopy() *DeploymentTargetClaimSpec { - if in == nil { - return nil - } - out := new(DeploymentTargetClaimSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentTargetClaimStatus) DeepCopyInto(out *DeploymentTargetClaimStatus) { +func (in *SnapshotArtifacts) DeepCopyInto(out *SnapshotArtifacts) { *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + if in.UnstableFields != nil { + in, out := &in.UnstableFields, &out.UnstableFields + *out = new(apiextensionsv1.JSON) + (*in).DeepCopyInto(*out) } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentTargetClaimStatus. -func (in *DeploymentTargetClaimStatus) DeepCopy() *DeploymentTargetClaimStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotArtifacts. +func (in *SnapshotArtifacts) DeepCopy() *SnapshotArtifacts { if in == nil { return nil } - out := new(DeploymentTargetClaimStatus) + out := new(SnapshotArtifacts) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentTargetClass) DeepCopyInto(out *DeploymentTargetClass) { +func (in *SnapshotComponent) DeepCopyInto(out *SnapshotComponent) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status + in.Source.DeepCopyInto(&out.Source) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentTargetClass. -func (in *DeploymentTargetClass) DeepCopy() *DeploymentTargetClass { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotComponent. +func (in *SnapshotComponent) DeepCopy() *SnapshotComponent { if in == nil { return nil } - out := new(DeploymentTargetClass) + out := new(SnapshotComponent) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DeploymentTargetClass) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentTargetClassList) DeepCopyInto(out *DeploymentTargetClassList) { +func (in *SnapshotList) DeepCopyInto(out *SnapshotList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]DeploymentTargetClass, len(*in)) + *out = make([]Snapshot, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentTargetClassList. -func (in *DeploymentTargetClassList) DeepCopy() *DeploymentTargetClassList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotList. +func (in *SnapshotList) DeepCopy() *SnapshotList { if in == nil { return nil } - out := new(DeploymentTargetClassList) + out := new(SnapshotList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DeploymentTargetClassList) DeepCopyObject() runtime.Object { +func (in *SnapshotList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -749,765 +565,42 @@ func (in *DeploymentTargetClassList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentTargetClassSpec) DeepCopyInto(out *DeploymentTargetClassSpec) { - *out = *in - out.Parameters = in.Parameters -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentTargetClassSpec. -func (in *DeploymentTargetClassSpec) DeepCopy() *DeploymentTargetClassSpec { - if in == nil { - return nil - } - out := new(DeploymentTargetClassSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentTargetClassStatus) DeepCopyInto(out *DeploymentTargetClassStatus) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentTargetClassStatus. -func (in *DeploymentTargetClassStatus) DeepCopy() *DeploymentTargetClassStatus { - if in == nil { - return nil - } - out := new(DeploymentTargetClassStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentTargetKubernetesClusterCredentials) DeepCopyInto(out *DeploymentTargetKubernetesClusterCredentials) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentTargetKubernetesClusterCredentials. -func (in *DeploymentTargetKubernetesClusterCredentials) DeepCopy() *DeploymentTargetKubernetesClusterCredentials { - if in == nil { - return nil - } - out := new(DeploymentTargetKubernetesClusterCredentials) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentTargetList) DeepCopyInto(out *DeploymentTargetList) { +func (in *SnapshotSpec) DeepCopyInto(out *SnapshotSpec) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]DeploymentTarget, len(*in)) + if in.Components != nil { + in, out := &in.Components, &out.Components + *out = make([]SnapshotComponent, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } + in.Artifacts.DeepCopyInto(&out.Artifacts) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentTargetList. -func (in *DeploymentTargetList) DeepCopy() *DeploymentTargetList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotSpec. +func (in *SnapshotSpec) DeepCopy() *SnapshotSpec { if in == nil { return nil } - out := new(DeploymentTargetList) + out := new(SnapshotSpec) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DeploymentTargetList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentTargetParameters) DeepCopyInto(out *DeploymentTargetParameters) { +func (in *SnapshotStatus) DeepCopyInto(out *SnapshotStatus) { *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentTargetParameters. -func (in *DeploymentTargetParameters) DeepCopy() *DeploymentTargetParameters { - if in == nil { - return nil + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } - out := new(DeploymentTargetParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentTargetSpec) DeepCopyInto(out *DeploymentTargetSpec) { - *out = *in - out.KubernetesClusterCredentials = in.KubernetesClusterCredentials } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentTargetSpec. -func (in *DeploymentTargetSpec) DeepCopy() *DeploymentTargetSpec { - if in == nil { - return nil - } - out := new(DeploymentTargetSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentTargetStatus) DeepCopyInto(out *DeploymentTargetStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentTargetStatus. -func (in *DeploymentTargetStatus) DeepCopy() *DeploymentTargetStatus { - if in == nil { - return nil - } - out := new(DeploymentTargetStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvVarPair) DeepCopyInto(out *EnvVarPair) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVarPair. -func (in *EnvVarPair) DeepCopy() *EnvVarPair { - if in == nil { - return nil - } - out := new(EnvVarPair) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Environment) DeepCopyInto(out *Environment) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Environment. -func (in *Environment) DeepCopy() *Environment { - if in == nil { - return nil - } - out := new(Environment) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Environment) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvironmentConfiguration) DeepCopyInto(out *EnvironmentConfiguration) { - *out = *in - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]EnvVarPair, len(*in)) - copy(*out, *in) - } - out.Target = in.Target -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvironmentConfiguration. -func (in *EnvironmentConfiguration) DeepCopy() *EnvironmentConfiguration { - if in == nil { - return nil - } - out := new(EnvironmentConfiguration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvironmentList) DeepCopyInto(out *EnvironmentList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Environment, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvironmentList. -func (in *EnvironmentList) DeepCopy() *EnvironmentList { - if in == nil { - return nil - } - out := new(EnvironmentList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EnvironmentList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvironmentSpec) DeepCopyInto(out *EnvironmentSpec) { - *out = *in - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make([]string, len(*in)) - copy(*out, *in) - } - in.Configuration.DeepCopyInto(&out.Configuration) - if in.UnstableConfigurationFields != nil { - in, out := &in.UnstableConfigurationFields, &out.UnstableConfigurationFields - *out = new(UnstableEnvironmentConfiguration) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvironmentSpec. -func (in *EnvironmentSpec) DeepCopy() *EnvironmentSpec { - if in == nil { - return nil - } - out := new(EnvironmentSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvironmentStatus) DeepCopyInto(out *EnvironmentStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvironmentStatus. -func (in *EnvironmentStatus) DeepCopy() *EnvironmentStatus { - if in == nil { - return nil - } - out := new(EnvironmentStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvironmentTarget) DeepCopyInto(out *EnvironmentTarget) { - *out = *in - out.DeploymentTargetClaim = in.DeploymentTargetClaim -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvironmentTarget. -func (in *EnvironmentTarget) DeepCopy() *EnvironmentTarget { - if in == nil { - return nil - } - out := new(EnvironmentTarget) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GitOpsStatus) DeepCopyInto(out *GitOpsStatus) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitOpsStatus. -func (in *GitOpsStatus) DeepCopy() *GitOpsStatus { - if in == nil { - return nil - } - out := new(GitOpsStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GitSource) DeepCopyInto(out *GitSource) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitSource. -func (in *GitSource) DeepCopy() *GitSource { - if in == nil { - return nil - } - out := new(GitSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubernetesClusterCredentials) DeepCopyInto(out *KubernetesClusterCredentials) { - *out = *in - if in.Namespaces != nil { - in, out := &in.Namespaces, &out.Namespaces - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesClusterCredentials. -func (in *KubernetesClusterCredentials) DeepCopy() *KubernetesClusterCredentials { - if in == nil { - return nil - } - out := new(KubernetesClusterCredentials) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ManualPromotionConfiguration) DeepCopyInto(out *ManualPromotionConfiguration) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManualPromotionConfiguration. -func (in *ManualPromotionConfiguration) DeepCopy() *ManualPromotionConfiguration { - if in == nil { - return nil - } - out := new(ManualPromotionConfiguration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PromotionRun) DeepCopyInto(out *PromotionRun) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PromotionRun. -func (in *PromotionRun) DeepCopy() *PromotionRun { - if in == nil { - return nil - } - out := new(PromotionRun) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PromotionRun) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PromotionRunCondition) DeepCopyInto(out *PromotionRunCondition) { - *out = *in - in.LastProbeTime.DeepCopyInto(&out.LastProbeTime) - if in.LastTransitionTime != nil { - in, out := &in.LastTransitionTime, &out.LastTransitionTime - *out = (*in).DeepCopy() - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PromotionRunCondition. -func (in *PromotionRunCondition) DeepCopy() *PromotionRunCondition { - if in == nil { - return nil - } - out := new(PromotionRunCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PromotionRunEnvironmentStatus) DeepCopyInto(out *PromotionRunEnvironmentStatus) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PromotionRunEnvironmentStatus. -func (in *PromotionRunEnvironmentStatus) DeepCopy() *PromotionRunEnvironmentStatus { - if in == nil { - return nil - } - out := new(PromotionRunEnvironmentStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PromotionRunList) DeepCopyInto(out *PromotionRunList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]PromotionRun, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PromotionRunList. -func (in *PromotionRunList) DeepCopy() *PromotionRunList { - if in == nil { - return nil - } - out := new(PromotionRunList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PromotionRunList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PromotionRunSpec) DeepCopyInto(out *PromotionRunSpec) { - *out = *in - out.ManualPromotion = in.ManualPromotion - out.AutomatedPromotion = in.AutomatedPromotion -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PromotionRunSpec. -func (in *PromotionRunSpec) DeepCopy() *PromotionRunSpec { - if in == nil { - return nil - } - out := new(PromotionRunSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PromotionRunStatus) DeepCopyInto(out *PromotionRunStatus) { - *out = *in - if in.EnvironmentStatus != nil { - in, out := &in.EnvironmentStatus, &out.EnvironmentStatus - *out = make([]PromotionRunEnvironmentStatus, len(*in)) - copy(*out, *in) - } - if in.ActiveBindings != nil { - in, out := &in.ActiveBindings, &out.ActiveBindings - *out = make([]string, len(*in)) - copy(*out, *in) - } - in.PromotionStartTime.DeepCopyInto(&out.PromotionStartTime) - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]PromotionRunCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PromotionRunStatus. -func (in *PromotionRunStatus) DeepCopy() *PromotionRunStatus { - if in == nil { - return nil - } - out := new(PromotionRunStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Snapshot) DeepCopyInto(out *Snapshot) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Snapshot. -func (in *Snapshot) DeepCopy() *Snapshot { - if in == nil { - return nil - } - out := new(Snapshot) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Snapshot) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SnapshotArtifacts) DeepCopyInto(out *SnapshotArtifacts) { - *out = *in - if in.UnstableFields != nil { - in, out := &in.UnstableFields, &out.UnstableFields - *out = new(apiextensionsv1.JSON) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotArtifacts. -func (in *SnapshotArtifacts) DeepCopy() *SnapshotArtifacts { - if in == nil { - return nil - } - out := new(SnapshotArtifacts) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SnapshotComponent) DeepCopyInto(out *SnapshotComponent) { - *out = *in - in.Source.DeepCopyInto(&out.Source) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotComponent. -func (in *SnapshotComponent) DeepCopy() *SnapshotComponent { - if in == nil { - return nil - } - out := new(SnapshotComponent) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SnapshotEnvironmentBinding) DeepCopyInto(out *SnapshotEnvironmentBinding) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotEnvironmentBinding. -func (in *SnapshotEnvironmentBinding) DeepCopy() *SnapshotEnvironmentBinding { - if in == nil { - return nil - } - out := new(SnapshotEnvironmentBinding) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SnapshotEnvironmentBinding) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SnapshotEnvironmentBindingList) DeepCopyInto(out *SnapshotEnvironmentBindingList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]SnapshotEnvironmentBinding, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotEnvironmentBindingList. -func (in *SnapshotEnvironmentBindingList) DeepCopy() *SnapshotEnvironmentBindingList { - if in == nil { - return nil - } - out := new(SnapshotEnvironmentBindingList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SnapshotEnvironmentBindingList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SnapshotEnvironmentBindingSpec) DeepCopyInto(out *SnapshotEnvironmentBindingSpec) { - *out = *in - if in.Components != nil { - in, out := &in.Components, &out.Components - *out = make([]BindingComponent, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotEnvironmentBindingSpec. -func (in *SnapshotEnvironmentBindingSpec) DeepCopy() *SnapshotEnvironmentBindingSpec { - if in == nil { - return nil - } - out := new(SnapshotEnvironmentBindingSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SnapshotEnvironmentBindingStatus) DeepCopyInto(out *SnapshotEnvironmentBindingStatus) { - *out = *in - if in.GitOpsDeployments != nil { - in, out := &in.GitOpsDeployments, &out.GitOpsDeployments - *out = make([]BindingStatusGitOpsDeployment, len(*in)) - copy(*out, *in) - } - if in.Components != nil { - in, out := &in.Components, &out.Components - *out = make([]BindingComponentStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.GitOpsRepoConditions != nil { - in, out := &in.GitOpsRepoConditions, &out.GitOpsRepoConditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.BindingConditions != nil { - in, out := &in.BindingConditions, &out.BindingConditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ComponentDeploymentConditions != nil { - in, out := &in.ComponentDeploymentConditions, &out.ComponentDeploymentConditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotEnvironmentBindingStatus. -func (in *SnapshotEnvironmentBindingStatus) DeepCopy() *SnapshotEnvironmentBindingStatus { - if in == nil { - return nil - } - out := new(SnapshotEnvironmentBindingStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SnapshotList) DeepCopyInto(out *SnapshotList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Snapshot, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotList. -func (in *SnapshotList) DeepCopy() *SnapshotList { - if in == nil { - return nil - } - out := new(SnapshotList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SnapshotList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SnapshotSpec) DeepCopyInto(out *SnapshotSpec) { - *out = *in - if in.Components != nil { - in, out := &in.Components, &out.Components - *out = make([]SnapshotComponent, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.Artifacts.DeepCopyInto(&out.Artifacts) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotSpec. -func (in *SnapshotSpec) DeepCopy() *SnapshotSpec { - if in == nil { - return nil - } - out := new(SnapshotSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SnapshotStatus) DeepCopyInto(out *SnapshotStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotStatus. -func (in *SnapshotStatus) DeepCopy() *SnapshotStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotStatus. +func (in *SnapshotStatus) DeepCopy() *SnapshotStatus { if in == nil { return nil } @@ -1515,19 +608,3 @@ func (in *SnapshotStatus) DeepCopy() *SnapshotStatus { in.DeepCopyInto(out) return out } - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UnstableEnvironmentConfiguration) DeepCopyInto(out *UnstableEnvironmentConfiguration) { - *out = *in - in.KubernetesClusterCredentials.DeepCopyInto(&out.KubernetesClusterCredentials) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnstableEnvironmentConfiguration. -func (in *UnstableEnvironmentConfiguration) DeepCopy() *UnstableEnvironmentConfiguration { - if in == nil { - return nil - } - out := new(UnstableEnvironmentConfiguration) - in.DeepCopyInto(out) - return out -}