Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add inline struct tag #401

Merged
merged 2 commits into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/apis/rbacmanager/v1beta1/rbacdefinition_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

// Subject is an expansion on the rbacv1.Subject to allow definition of ImagePullSecrets for a Service Account
type Subject struct {
rbacv1.Subject
rbacv1.Subject `json:",inline"`
ImagePullSecrets []string `json:"imagePullSecrets"`
AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty"`
}
Expand Down
1 change: 1 addition & 0 deletions pkg/apis/rbacmanager/v1beta1/zz_generated.deepcopy.go

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

6 changes: 4 additions & 2 deletions pkg/reconciler/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ type Reconciler struct {
var mux = sync.Mutex{}

// ReconcileNamespaceChange reconciles relevant portions of RBAC Definitions
// after changes to namespaces within the cluster
//
// after changes to namespaces within the cluster
func (r *Reconciler) ReconcileNamespaceChange(rbacDef *rbacmanagerv1beta1.RBACDefinition, namespace *v1.Namespace) error {
mux.Lock()
defer mux.Unlock()
Expand Down Expand Up @@ -117,7 +118,8 @@ func (r *Reconciler) ReconcileOwners(ownerRefs []metav1.OwnerReference, kind str
}

// Reconcile creates, updates, or deletes Kubernetes resources to match
// the desired state defined in an RBAC Definition
//
// the desired state defined in an RBAC Definition
func (r *Reconciler) Reconcile(rbacDef *rbacmanagerv1beta1.RBACDefinition) error {
mux.Lock()
defer mux.Unlock()
Expand Down