Skip to content

Commit

Permalink
Merge pull request #3818 from k8s-infra-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…3811-to-release-1.9

[release-1.9] add `controller: true` to azure.json Secret ownerRef
  • Loading branch information
k8s-ci-robot authored Aug 9, 2023
2 parents c0e3d6b + 3f8258c commit cc219ab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions controllers/azurejson_machine_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/tools/record"
"k8s.io/utils/pointer"
infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1"
"sigs.k8s.io/cluster-api-provider-azure/azure/scope"
"sigs.k8s.io/cluster-api-provider-azure/azure/services/identities"
Expand Down Expand Up @@ -208,6 +209,7 @@ func (r *AzureJSONMachineReconciler) Reconcile(ctx context.Context, req ctrl.Req
Kind: kind,
Name: azureMachine.GetName(),
UID: azureMachine.GetUID(),
Controller: pointer.Bool(true),
}

// Construct secret for this machine
Expand Down
2 changes: 2 additions & 0 deletions controllers/azurejson_machinepool_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/tools/record"
"k8s.io/utils/pointer"
infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1"
"sigs.k8s.io/cluster-api-provider-azure/azure/scope"
"sigs.k8s.io/cluster-api-provider-azure/azure/services/identities"
Expand Down Expand Up @@ -189,6 +190,7 @@ func (r *AzureJSONMachinePoolReconciler) Reconcile(ctx context.Context, req ctrl
Kind: kind,
Name: azureMachinePool.GetName(),
UID: azureMachinePool.GetUID(),
Controller: pointer.Bool(true),
}

if azureMachinePool.Spec.Identity == infrav1.VMIdentityNone {
Expand Down
2 changes: 2 additions & 0 deletions controllers/azurejson_machinetemplate_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/tools/record"
"k8s.io/utils/pointer"
infrav1 "sigs.k8s.io/cluster-api-provider-azure/api/v1beta1"
"sigs.k8s.io/cluster-api-provider-azure/azure/scope"
"sigs.k8s.io/cluster-api-provider-azure/azure/services/identities"
Expand Down Expand Up @@ -168,6 +169,7 @@ func (r *AzureJSONTemplateReconciler) Reconcile(ctx context.Context, req ctrl.Re
Kind: kind,
Name: azureMachineTemplate.GetName(),
UID: azureMachineTemplate.GetUID(),
Controller: pointer.Bool(true),
}

// Construct secret for this machine template
Expand Down

0 comments on commit cc219ab

Please sign in to comment.