Skip to content

Commit

Permalink
Merge pull request #860 from rabi/deployed
Browse files Browse the repository at this point in the history
Remove the deployed attribute from deployment
  • Loading branch information
openshift-merge-bot[bot] authored Jun 18, 2024
2 parents 85ff47f + 5a55c47 commit 3a6a837
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ spec:
additionalProperties:
type: string
type: object
deployed:
type: boolean
deployedVersion:
type: string
nodeSetConditions:
Expand Down
6 changes: 0 additions & 6 deletions apis/dataplane/v1beta1/openstackdataplanedeployment_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@ type OpenStackDataPlaneDeploymentStatus struct {

// DeployedVersion
DeployedVersion string `json:"deployedVersion,omitempty"`

// +operator-sdk:csv:customresourcedefinitions:type=status,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
// Deployed
Deployed bool `json:"deployed,omitempty" optional:"true"`
}

//+kubebuilder:object:root=true
Expand Down Expand Up @@ -151,6 +147,4 @@ func (instance *OpenStackDataPlaneDeployment) InitConditions() {

}
}

instance.Status.Deployed = false
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ spec:
additionalProperties:
type: string
type: object
deployed:
type: boolean
deployedVersion:
type: string
nodeSetConditions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,6 @@ func (r *OpenStackDataPlaneDeploymentReconciler) Reconcile(ctx context.Context,
Log,
)

// If the deploy is already done, return immediately.
if instance.Status.Deployed {
Log.Info("Already deployed", "instance.Status.Deployed", instance.Status.Deployed)
return ctrl.Result{}, nil
}

// initialize status if Conditions is nil, but do not reset if it already
// exists
isNewInstance := instance.Status.Conditions == nil
Expand Down Expand Up @@ -293,8 +287,6 @@ func (r *OpenStackDataPlaneDeploymentReconciler) Reconcile(ctx context.Context,
for _, nodeSet := range nodeSets.Items {

Log.Info(fmt.Sprintf("Deploying NodeSet: %s", nodeSet.Name))
Log.Info("Set Status.Deployed to false", "instance", instance)
instance.Status.Deployed = false
Log.Info("Set DeploymentReadyCondition false")
instance.Status.Conditions.MarkFalse(
condition.DeploymentReadyCondition, condition.RequestedReason,
Expand Down Expand Up @@ -387,7 +379,6 @@ func (r *OpenStackDataPlaneDeploymentReconciler) Reconcile(ctx context.Context,
Log.Info("Set DeploymentReadyCondition true")
instance.Status.Conditions.MarkTrue(condition.DeploymentReadyCondition, condition.DeploymentReadyMessage)
Log.Info("Set Status.Deployed to true", "instance", instance)
instance.Status.Deployed = true
if version != nil {
instance.Status.DeployedVersion = version.Spec.TargetVersion
}
Expand Down
5 changes: 0 additions & 5 deletions docs/assemblies/dataplane_resources.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,6 @@ OpenStackDataPlaneDeploymentStatus defines the observed state of OpenStackDataPl
| DeployedVersion
| string
| false
| deployed
| Deployed
| bool
| false
|===
<<custom-resources,Back to Custom Resources>>
Expand Down

0 comments on commit 3a6a837

Please sign in to comment.