Skip to content

Commit

Permalink
Update assignmetadata controller pkg (#1025)
Browse files Browse the repository at this point in the history
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
  • Loading branch information
ritazh committed Dec 17, 2020
1 parent a5309a6 commit a128317
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pkg/controller/add_assignmetadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.
package controller

import (
assignmetadata "github.com/open-policy-agent/gatekeeper/pkg/controller/assignmetadata"
"github.com/open-policy-agent/gatekeeper/pkg/controller/assignmetadata"
)

func init() {
Expand Down
14 changes: 7 additions & 7 deletions pkg/controller/assignmetadata/assignmetadata_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package assignmentmetadata
package assignmetadata

import (
"context"
Expand All @@ -38,7 +38,7 @@ import (
)

var (
log = logf.Log.WithName("controller").WithValues(logging.Process, "assignmentmetadata_controller")
log = logf.Log.WithName("controller").WithValues(logging.Process, "assignmetadata_controller")
)

type Adder struct {
Expand All @@ -65,8 +65,8 @@ func (a *Adder) InjectMutationCache(mutationCache *mutation.System) {
}

// newReconciler returns a new reconcile.Reconciler
func newReconciler(mgr manager.Manager, mutationCache *mutation.System) *AssignMetadataReconciler {
r := &AssignMetadataReconciler{system: mutationCache, Client: mgr.GetClient()}
func newReconciler(mgr manager.Manager, mutationCache *mutation.System) *Reconciler {
r := &Reconciler{system: mutationCache, Client: mgr.GetClient()}
return r
}

Expand All @@ -91,8 +91,8 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
return nil
}

// AssignMetadataReconciler reconciles a AssignMetadata object
type AssignMetadataReconciler struct {
// Reconciler reconciles a AssignMetadata object
type Reconciler struct {
client.Client
system *mutation.System
}
Expand All @@ -101,7 +101,7 @@ type AssignMetadataReconciler struct {

// Reconcile reads that state of the cluster for a AssignMetadata object and makes changes based on the state read
// and what is in the AssignMetadata.Spec
func (r *AssignMetadataReconciler) Reconcile(request reconcile.Request) (reconcile.Result, error) {
func (r *Reconciler) Reconcile(request reconcile.Request) (reconcile.Result, error) {
log.Info("Reconcile", "request", request)
deleted := false
assignMetadata := &mutationsv1alpha1.AssignMetadata{}
Expand Down

0 comments on commit a128317

Please sign in to comment.