Skip to content

Commit

Permalink
Merge pull request #176 from vshn/controller/fix_missing_rbac
Browse files Browse the repository at this point in the history
Fix controller not having enough RBAC
  • Loading branch information
Kidswiss authored Jun 5, 2024
2 parents b3b9c6b + ad9cfb5 commit b883245
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 2 deletions.
1 change: 1 addition & 0 deletions apis/minio/v1/bucket_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ type Bucket struct {

type BucketSpec struct {
xpv1.ResourceSpec `json:",inline"`
ProviderReference *xpv1.Reference `json:"providerReference,omitempty"`
ForProvider BucketParameters `json:"forProvider,omitempty"`
}

Expand Down
4 changes: 3 additions & 1 deletion apis/minio/v1/policy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ type Policy struct {

type PolicySpec struct {
xpv1.ResourceSpec `json:",inline"`
ForProvider PolicyParameters `json:"forProvider,omitempty"`
ProviderReference *xpv1.Reference `json:"providerReference,omitempty"`

ForProvider PolicyParameters `json:"forProvider,omitempty"`
}

type PolicyStatus struct {
Expand Down
4 changes: 3 additions & 1 deletion apis/minio/v1/user_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ type User struct {

type UserSpec struct {
xpv1.ResourceSpec `json:",inline"`
ForProvider UserParameters `json:"forProvider,omitempty"`
ProviderReference *xpv1.Reference `json:"providerReference,omitempty"`

ForProvider UserParameters `json:"forProvider,omitempty"`
}

type UserStatus struct {
Expand Down
16 changes: 16 additions & 0 deletions apis/minio/v1/zz_generated.deepcopy.go

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

11 changes: 11 additions & 0 deletions config/controller/cluster-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,17 @@ rules:
- patch
- update
- watch
- apiGroups:
- vshn.appcat.vshn.io
resources:
- xvshnpostgresqls/finalizers
verbs:
- create
- get
- list
- patch
- update
- watch
- apiGroups:
- vshn.appcat.vshn.io
resources:
Expand Down
3 changes: 3 additions & 0 deletions pkg/controller/postgres/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ import (

//+kubebuilder:rbac:groups=kubernetes.crossplane.io,resources=objects,verbs=delete

// To run on newer OpenShift version, this RBAC permission is necessary.
//+kubebuilder:rbac:groups=vshn.appcat.vshn.io,resources=xvshnpostgresqls/finalizers,verbs=get;list;patch;update;watch;create

type XPostgreSQLReconciler struct {
client.Client
Scheme *runtime.Scheme
Expand Down

0 comments on commit b883245

Please sign in to comment.