Add initialAdmin to reconcile

[ZITADOPER-1]
This commit is contained in:
Haim Kortovich
2024-05-20 20:14:34 -05:00
parent 430d4a7383
commit baaf56b8de
4 changed files with 9 additions and 5 deletions

View File

@@ -95,7 +95,7 @@ spec:
status: status:
description: OrganizationStatus defines the observed state of Organization description: OrganizationStatus defines the observed state of Organization
properties: properties:
AdminId: adminId:
default: "" default: ""
type: string type: string
conditions: conditions:
@@ -173,7 +173,7 @@ spec:
default: "" default: ""
type: string type: string
required: required:
- AdminId - adminId
- orgId - orgId
type: object type: object
type: object type: object

View File

@@ -54,7 +54,7 @@ type OrganizationStatus struct {
// +kubebuilder:default="" // +kubebuilder:default=""
OrgId string `json:"orgId"` OrgId string `json:"orgId"`
// +kubebuilder:default="" // +kubebuilder:default=""
AdminId string `json:"AdminId"` AdminId string `json:"adminId"`
} }
func (d *OrganizationStatus) SetCondition(condition metav1.Condition) { func (d *OrganizationStatus) SetCondition(condition metav1.Condition) {

View File

@@ -96,7 +96,7 @@ spec:
status: status:
description: OrganizationStatus defines the observed state of Organization description: OrganizationStatus defines the observed state of Organization
properties: properties:
AdminId: adminId:
default: "" default: ""
type: string type: string
conditions: conditions:
@@ -174,7 +174,7 @@ spec:
default: "" default: ""
type: string type: string
required: required:
- AdminId - adminId
- orgId - orgId
type: object type: object
type: object type: object

View File

@@ -102,6 +102,10 @@ func (wr *wrappedOrganizationReconciler) Reconcile(ctx context.Context, ztdClien
Name: "organization", Name: "organization",
Reconcile: wr.reconcileOrg, Reconcile: wr.reconcileOrg,
}, },
{
Name: "admin",
Reconcile: wr.reconcileInitialAdmin,
},
} }
for _, p := range phases { for _, p := range phases {
err := p.Reconcile(ctx, ztdClient) err := p.Reconcile(ctx, ztdClient)