Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kon-angelo committed Nov 29, 2023
1 parent cf5e02b commit f9261db
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions hack/api-reference/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ map[string]string
</tr>
<tr>
<td>
<code>items</code></br>
<code>managedItems</code></br>
<em>
<a href="#azure.provider.extensions.gardener.cloud/v1alpha1.AzureResource">
[]AzureResource
Expand All @@ -691,7 +691,7 @@ map[string]string
</td>
<td>
<em>(Optional)</em>
<p>Items is a list of resources that were created during the infrastructure reconciliation.</p>
<p>ManagedItems is a list of resources that were created during the infrastructure reconciliation.</p>
</td>
</tr>
</tbody>
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/azure/helper/scheme.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ func InfrastructureStateFromRaw(raw *runtime.RawExtension) (*api.InfrastructureS
if state.Data == nil {
state.Data = make(map[string]string)
}
if state.Items == nil {
state.Items = make([]api.AzureResource, 0)
if state.ManagedItems == nil {
state.ManagedItems = make([]api.AzureResource, 0)
}

return state, nil
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/azure/types_infrastructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@ type InfrastructureState struct {
// Data is map to store things.
// +optional
Data map[string]string
// Items is a list of resources that were created during the infrastructure reconciliation.
// ManagedItems is a list of resources that were created during the infrastructure reconciliation.
// +optional
Items []AzureResource
ManagedItems []AzureResource
}

// AzureResource represents metadata information about created infrastructure resources.
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/azure/v1alpha1/types_infrastructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,9 @@ type InfrastructureState struct {
// Data is map to store things.
// +optional
Data map[string]string `json:"data,omitempty"`
// Items is a list of resources that were created during the infrastructure reconciliation.
// ManagedItems is a list of resources that were created during the infrastructure reconciliation.
// +optional
Items []AzureResource `json:"items,omitempty"`
ManagedItems []AzureResource `json:"managedItems,omitempty"`
}

// AzureResource represents metadata information about created infrastructure resources.
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/azure/v1alpha1/zz_generated.conversion.go

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

4 changes: 2 additions & 2 deletions pkg/apis/azure/v1alpha1/zz_generated.deepcopy.go

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

4 changes: 2 additions & 2 deletions pkg/apis/azure/zz_generated.deepcopy.go

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

4 changes: 2 additions & 2 deletions pkg/controller/infrastructure/infraflow/ensurer.go
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,8 @@ func (f *FlowContext) GetInfrastructureStatus(_ context.Context) (*v1alpha1.Infr
// GetInfrastructureState returns tha shoot's infrastructure state.
func (f *FlowContext) GetInfrastructureState() (*runtime.RawExtension, error) {
state := &v1alpha1.InfrastructureState{
TypeMeta: helper.InfrastructureStateTypeMeta,
Items: f.inventory.ToList(),
TypeMeta: helper.InfrastructureStateTypeMeta,
ManagedItems: f.inventory.ToList(),
}

return &runtime.RawExtension{
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/infrastructure/infraflow/flow_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func NewFlowContext(factory client.Factory,
}

inv := NewSimpleInventory(wb)
for _, r := range state.Items {
for _, r := range state.ManagedItems {
if err := inv.Insert(r.ID); err != nil {
return nil, err
}
Expand Down Expand Up @@ -179,7 +179,7 @@ func (f *FlowContext) buildReconcileGraph() *flow.Graph {

// Delete deletes all resources managed by the reconciler
func (f *FlowContext) Delete(ctx context.Context) error {
if len(f.state.Items) == 0 {
if len(f.state.ManagedItems) == 0 {
// special case where the credentials were invalid from the beginning
if _, ok := f.state.Data[CreatedResourcesExistKey]; !ok {
return nil
Expand Down

0 comments on commit f9261db

Please sign in to comment.