Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,43 @@ spec:
type: string
description: AnsibleEEHashes
type: object
ansibleExecutionSummaries:
additionalProperties:
description: |-
AnsibleExecutionSummary captures the final ansible-runner execution result
reported by the AEE pod.
properties:
failedHostList:
description: FailedHostList contains the hosts that failed.
items:
type: string
type: array
failedHosts:
description: FailedHosts is the number of hosts with Ansible
task failures.
type: integer
failurePercent:
description: FailurePercent is the percent of total hosts that
failed or were unreachable.
type: integer
totalHosts:
description: TotalHosts is the number of hosts included in the
Ansible execution summary.
type: integer
unreachableHostList:
description: UnreachableHostList contains the hosts that were
unreachable.
items:
type: string
type: array
unreachableHosts:
description: UnreachableHosts is the number of hosts that were
unreachable.
type: integer
type: object
description: AnsibleExecutionSummaries stores the most recent AEE
execution summary per Job name.
type: object
bmhRefHashes:
additionalProperties:
type: string
Expand Down
40 changes: 40 additions & 0 deletions api/bases/dataplane.openstack.org_openstackdataplanenodesets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1925,6 +1925,46 @@ spec:
deployedVersion:
description: DeployedVersion
type: string
deploymentExecutionSummaries:
additionalProperties:
additionalProperties:
description: |-
AnsibleExecutionSummary captures the final ansible-runner execution result
reported by the AEE pod.
properties:
failedHostList:
description: FailedHostList contains the hosts that failed.
items:
type: string
type: array
failedHosts:
description: FailedHosts is the number of hosts with Ansible
task failures.
type: integer
failurePercent:
description: FailurePercent is the percent of total hosts
that failed or were unreachable.
type: integer
totalHosts:
description: TotalHosts is the number of hosts included in
the Ansible execution summary.
type: integer
unreachableHostList:
description: UnreachableHostList contains the hosts that were
unreachable.
items:
type: string
type: array
unreachableHosts:
description: UnreachableHosts is the number of hosts that
were unreachable.
type: integer
type: object
type: object
description: |-
DeploymentExecutionSummaries stores the most recent AEE execution summary
per deployment and Job name.
type: object
deploymentStatuses:
additionalProperties:
description: Conditions provide observations of the operational
Expand Down
23 changes: 23 additions & 0 deletions api/dataplane/v1beta1/openstackdataplanedeployment_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,23 @@ type OpenStackDataPlaneDeploymentSpec struct {
AnsibleEEEnvConfigMapName string `json:"ansibleEEEnvConfigMapName,omitempty"`
}

// AnsibleExecutionSummary captures the final ansible-runner execution result
// reported by the AEE pod.
type AnsibleExecutionSummary struct {
// TotalHosts is the number of hosts included in the Ansible execution summary.
TotalHosts *int `json:"totalHosts,omitempty" optional:"true"`
// FailedHosts is the number of hosts with Ansible task failures.
FailedHosts *int `json:"failedHosts,omitempty" optional:"true"`
// UnreachableHosts is the number of hosts that were unreachable.
UnreachableHosts *int `json:"unreachableHosts,omitempty" optional:"true"`
// FailurePercent is the percent of total hosts that failed or were unreachable.
FailurePercent *int `json:"failurePercent,omitempty" optional:"true"`
// FailedHostList contains the hosts that failed.
FailedHostList *[]string `json:"failedHostList,omitempty" optional:"true"`
// UnreachableHostList contains the hosts that were unreachable.
UnreachableHostList *[]string `json:"unreachableHostList,omitempty" optional:"true"`
}

// OpenStackDataPlaneDeploymentStatus defines the observed state of OpenStackDataPlaneDeployment
type OpenStackDataPlaneDeploymentStatus struct {
// NodeSetConditions
Expand All @@ -88,6 +105,9 @@ type OpenStackDataPlaneDeploymentStatus struct {
// AnsibleEEHashes
AnsibleEEHashes map[string]string `json:"ansibleEEHashes,omitempty" optional:"true"`

// AnsibleExecutionSummaries stores the most recent AEE execution summary per Job name.
AnsibleExecutionSummaries map[string]AnsibleExecutionSummary `json:"ansibleExecutionSummaries,omitempty" optional:"true"`

// ConfigMapHashes
ConfigMapHashes map[string]string `json:"configMapHashes,omitempty" optional:"true"`

Expand Down Expand Up @@ -192,6 +212,9 @@ func (instance *OpenStackDataPlaneDeployment) InitHashesAndImages() {
if instance.Status.AnsibleEEHashes == nil {
instance.Status.AnsibleEEHashes = make(map[string]string)
}
if instance.Status.AnsibleExecutionSummaries == nil {
instance.Status.AnsibleExecutionSummaries = make(map[string]AnsibleExecutionSummary)
}
if instance.Status.ContainerImages == nil {
instance.Status.ContainerImages = make(map[string]string)
}
Expand Down
13 changes: 9 additions & 4 deletions api/dataplane/v1beta1/openstackdataplanenodeset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ type OpenStackDataPlaneNodeSetStatus struct {
// DeploymentStatuses
DeploymentStatuses map[string]condition.Conditions `json:"deploymentStatuses,omitempty" optional:"true"`

// DeploymentExecutionSummaries stores the most recent AEE execution summary
// per deployment and Job name.
DeploymentExecutionSummaries map[string]map[string]AnsibleExecutionSummary `json:"deploymentExecutionSummaries,omitempty" optional:"true"`

// AllHostnames
AllHostnames map[string]map[infranetworkv1.NetNameStr]string `json:"allHostnames,omitempty" optional:"true"`

Expand Down Expand Up @@ -187,6 +191,7 @@ func (instance OpenStackDataPlaneNodeSet) IsReady() bool {
func (instance *OpenStackDataPlaneNodeSet) InitConditions() {
instance.Status.Conditions = condition.Conditions{}
instance.Status.DeploymentStatuses = make(map[string]condition.Conditions)
instance.Status.DeploymentExecutionSummaries = make(map[string]map[string]AnsibleExecutionSummary)

cl := condition.CreateList(
condition.UnknownCondition(condition.DeploymentReadyCondition, condition.InitReason, condition.DeploymentReadyInitMessage),
Expand All @@ -208,10 +213,10 @@ func (instance *OpenStackDataPlaneNodeSet) InitConditions() {
// GetAnsibleEESpec - get the fields that will be passed to AEE Job
func (instance OpenStackDataPlaneNodeSet) GetAnsibleEESpec() AnsibleEESpec {
return AnsibleEESpec{
NetworkAttachments: instance.Spec.NetworkAttachments,
ExtraMounts: instance.Spec.NodeTemplate.ExtraMounts,
Env: instance.Spec.Env,
ServiceAccountName: instance.Name,
NetworkAttachments: instance.Spec.NetworkAttachments,
ExtraMounts: instance.Spec.NodeTemplate.ExtraMounts,
Env: instance.Spec.Env,
ServiceAccountName: instance.Name,
}
}

Expand Down
78 changes: 78 additions & 0 deletions api/dataplane/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

77 changes: 77 additions & 0 deletions bindata/crds/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19071,6 +19071,43 @@ spec:
type: string
description: AnsibleEEHashes
type: object
ansibleExecutionSummaries:
additionalProperties:
description: |-
AnsibleExecutionSummary captures the final ansible-runner execution result
reported by the AEE pod.
properties:
failedHostList:
description: FailedHostList contains the hosts that failed.
items:
type: string
type: array
failedHosts:
description: FailedHosts is the number of hosts with Ansible
task failures.
type: integer
failurePercent:
description: FailurePercent is the percent of total hosts that
failed or were unreachable.
type: integer
totalHosts:
description: TotalHosts is the number of hosts included in the
Ansible execution summary.
type: integer
unreachableHostList:
description: UnreachableHostList contains the hosts that were
unreachable.
items:
type: string
type: array
unreachableHosts:
description: UnreachableHosts is the number of hosts that were
unreachable.
type: integer
type: object
description: AnsibleExecutionSummaries stores the most recent AEE
execution summary per Job name.
type: object
bmhRefHashes:
additionalProperties:
type: string
Expand Down Expand Up @@ -21131,6 +21168,46 @@ spec:
deployedVersion:
description: DeployedVersion
type: string
deploymentExecutionSummaries:
additionalProperties:
additionalProperties:
description: |-
AnsibleExecutionSummary captures the final ansible-runner execution result
reported by the AEE pod.
properties:
failedHostList:
description: FailedHostList contains the hosts that failed.
items:
type: string
type: array
failedHosts:
description: FailedHosts is the number of hosts with Ansible
task failures.
type: integer
failurePercent:
description: FailurePercent is the percent of total hosts
that failed or were unreachable.
type: integer
totalHosts:
description: TotalHosts is the number of hosts included in
the Ansible execution summary.
type: integer
unreachableHostList:
description: UnreachableHostList contains the hosts that were
unreachable.
items:
type: string
type: array
unreachableHosts:
description: UnreachableHosts is the number of hosts that
were unreachable.
type: integer
type: object
type: object
description: |-
DeploymentExecutionSummaries stores the most recent AEE execution summary
per deployment and Job name.
type: object
deploymentStatuses:
additionalProperties:
description: Conditions provide observations of the operational
Expand Down
Loading
Loading