Skip to content

Commit

Permalink
fix apiGroup for ingress rbac (#70)
Browse files Browse the repository at this point in the history
elenz97 authored Feb 8, 2021
1 parent 199973f commit 932b6db
Showing 5 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions apis/registries/v1alpha2/project_types.go
Original file line number Diff line number Diff line change
@@ -82,6 +82,7 @@ type MemberRequest struct {
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Project is the Schema for the projects API
// +kubebuilder:subresource:status
// +kubebuilder:resource:path=projects,scope=Namespaced
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase",description="phase"
// +kubebuilder:printcolumn:name="ID",type="integer",JSONPath=".status.id",description="harbor replication id"
// +kubebuilder:printcolumn:name="Public",type="boolean",JSONPath=".spec.metadata.public",description="harbor replication id"
2 changes: 1 addition & 1 deletion config/rbac/role.yaml
Original file line number Diff line number Diff line change
@@ -63,7 +63,7 @@ rules:
- update
- watch
- apiGroups:
- networking.k8s.io
- extensions
resources:
- ingresses
verbs:
2 changes: 1 addition & 1 deletion controllers/registries/instance_controller.go
Original file line number Diff line number Diff line change
@@ -61,7 +61,7 @@ var _ reconcile.Reconciler = &InstanceReconciler{}
// +kubebuilder:rbac:groups="",resources=persistentvolumeclaims,verbs=get;list;watch;create;update
// +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;delete
// +kubebuilder:rbac:groups="apps",resources=deployments;statefulsets;replicasets,verbs=get;list;watch;create;update;delete;patch
// +kubebuilder:rbac:groups="networking.k8s.io",resources=ingresses,verbs=get;list;watch;create;update;delete;patch
// +kubebuilder:rbac:groups="extensions",resources=ingresses,verbs=get;list;watch;create;update;delete;patch

// Reconcile reads that state of the cluster for a Instance object and makes changes based on the state read
// and what is in the Instance.Spec
2 changes: 1 addition & 1 deletion deploy/helm-chart/harbor-operator/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ rules:
- update
- watch
- apiGroups:
- networking.k8s.io
- extensions
resources:
- ingresses
verbs:
1 change: 1 addition & 0 deletions pkg/apis/v1alpha2/project_types.go
Original file line number Diff line number Diff line change
@@ -82,6 +82,7 @@ type MemberRequest struct {
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Project is the Schema for the projects API
// +kubebuilder:subresource:status
// +kubebuilder:resource:path=projects,scope=Namespaced
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase",description="phase"
// +kubebuilder:printcolumn:name="ID",type="integer",JSONPath=".status.id",description="harbor replication id"
// +kubebuilder:printcolumn:name="Public",type="boolean",JSONPath=".spec.metadata.public",description="harbor replication id"

0 comments on commit 932b6db

Please sign in to comment.