Skip to content

Commit

Permalink
Add more status fields to ipm kuttl test
Browse files Browse the repository at this point in the history
Also, fixes some status fields display names.
  • Loading branch information
rabi committed Feb 7, 2024
1 parent f7d213d commit b9557d0
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1888,24 +1888,18 @@ spec:
type: object
status:
properties:
AllHostnames:
allHostnames:
additionalProperties:
additionalProperties:
type: string
type: object
type: object
AllIPs:
allIPs:
additionalProperties:
additionalProperties:
type: string
type: object
type: object
CtlplaneSearchDomain:
type: string
DNSClusterAddresses:
items:
type: string
type: array
conditions:
items:
properties:
Expand All @@ -1932,6 +1926,8 @@ spec:
additionalProperties:
type: string
type: object
ctlplaneSearchDomain:
type: string
deployed:
type: boolean
deploymentStatuses:
Expand All @@ -1958,6 +1954,10 @@ spec:
type: object
type: array
type: object
dnsClusterAddresses:
items:
type: string
type: array
secretHashes:
additionalProperties:
type: string
Expand Down
12 changes: 6 additions & 6 deletions api/v1beta1/openstackdataplanenodeset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,19 @@ type OpenStackDataPlaneNodeSetStatus struct {
Deployed bool `json:"deployed,omitempty" optional:"true"`

// DeploymentStatuses
DeploymentConditions map[string]condition.Conditions `json:"deploymentStatuses,omitempty" optional:"true"`
DeploymentStatuses map[string]condition.Conditions `json:"deploymentStatuses,omitempty" optional:"true"`

// DNSClusterAddresses
DNSClusterAddresses []string `json:"DNSClusterAddresses,omitempty" optional:"true"`
DNSClusterAddresses []string `json:"dnsClusterAddresses,omitempty" optional:"true"`

// CtlplaneSearchDomain
CtlplaneSearchDomain string `json:"CtlplaneSearchDomain,omitempty" optional:"true"`
CtlplaneSearchDomain string `json:"ctlplaneSearchDomain,omitempty" optional:"true"`

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

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

// ConfigMapHashes
ConfigMapHashes map[string]string `json:"configMapHashes,omitempty" optional:"true"`
Expand Down Expand Up @@ -138,7 +138,7 @@ func (instance OpenStackDataPlaneNodeSet) IsReady() bool {
// InitConditions - Initializes Status Conditons
func (instance *OpenStackDataPlaneNodeSet) InitConditions() {
instance.Status.Conditions = condition.Conditions{}
instance.Status.DeploymentConditions = make(map[string]condition.Conditions)
instance.Status.DeploymentStatuses = make(map[string]condition.Conditions)

cl := condition.CreateList(
condition.UnknownCondition(condition.DeploymentReadyCondition, condition.InitReason, condition.InitReason),
Expand Down
4 changes: 2 additions & 2 deletions api/v1beta1/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -1888,24 +1888,18 @@ spec:
type: object
status:
properties:
AllHostnames:
allHostnames:
additionalProperties:
additionalProperties:
type: string
type: object
type: object
AllIPs:
allIPs:
additionalProperties:
additionalProperties:
type: string
type: object
type: object
CtlplaneSearchDomain:
type: string
DNSClusterAddresses:
items:
type: string
type: array
conditions:
items:
properties:
Expand All @@ -1932,6 +1926,8 @@ spec:
additionalProperties:
type: string
type: object
ctlplaneSearchDomain:
type: string
deployed:
type: boolean
deploymentStatuses:
Expand All @@ -1958,6 +1954,10 @@ spec:
type: object
type: array
type: object
dnsClusterAddresses:
items:
type: string
type: array
secretHashes:
additionalProperties:
type: string
Expand Down
6 changes: 3 additions & 3 deletions controllers/openstackdataplanenodeset_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,10 @@ func checkDeployment(helper *helper.Helper,
}
}
deploymentConditions := deployment.Status.NodeSetConditions[instance.Name]
if instance.Status.DeploymentConditions == nil {
instance.Status.DeploymentConditions = make(map[string]condition.Conditions)
if instance.Status.DeploymentStatuses == nil {
instance.Status.DeploymentStatuses = make(map[string]condition.Conditions)
}
instance.Status.DeploymentConditions[deployment.Name] = deploymentConditions
instance.Status.DeploymentStatuses[deployment.Name] = deploymentConditions
}
}

Expand Down
13 changes: 13 additions & 0 deletions tests/kuttl/tests/dataplane-with-ipam-create-test/00-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,19 @@ spec:
- libvirt
- nova
status:
allHostnames:
edpm-compute-0:
ctlplane: edpm-compute-0.ctlplane.example.com
internalapi: edpm-compute-0.internalapi.example.com
storage: edpm-compute-0.storage.example.com
tenant: edpm-compute-0.tenant.example.com
allIPs:
edpm-compute-0:
ctlplane: 192.168.122.100
internalapi: 172.17.0.100
storage: 172.18.0.100
tenant: 172.19.0.100
ctlplaneSearchDomain: ctlplane.example.com
conditions:
- message: Deployment not started
reason: Requested
Expand Down

0 comments on commit b9557d0

Please sign in to comment.