Documentation ¶
Index ¶
- Constants
- func IsNotOlderThan(res *kremserv1.RbacNegotiation, seconds float64) bool
- func SetupK8sClient() (*kubernetes.Clientset, *rest.Config)
- func UpdateStatus(c client.Client, ctx context.Context, res *kremserv1.RbacNegotiation, ...)
- type AppInfo
- type RbacEntry
- type RbacEventHandler
- type RbacNegotiationReconciler
- type RbacResource
Constants ¶
const ( Requested = 1 InProgress = 2 Stable = 3 Error = 4 Unknown = 5 )
Variables ¶
This section is empty.
Functions ¶
func IsNotOlderThan ¶ added in v0.0.4
func IsNotOlderThan(res *kremserv1.RbacNegotiation, seconds float64) bool
func SetupK8sClient ¶
func SetupK8sClient() (*kubernetes.Clientset, *rest.Config)
SetupK8sClient returns the configured kubernetes client, it checks if it's running from the k8s context or not and use the correct method to initialize the client from the context
func UpdateStatus ¶ added in v0.0.4
Types ¶
type AppInfo ¶
type AppInfo struct {
// contains filtered or unexported fields
}
AppInfo bundles the application specific information including logs, service account and list of live pods
type RbacEntry ¶
type RbacEntry struct { Verb string Object RbacResource ObjectNS string }
RbacEntry holds the information about identified rbac entries that has been found in the logs
type RbacEventHandler ¶
type RbacEventHandler struct { client.Client Recorder record.EventRecorder Config *internal.Config Tracer trace.Tracer // contains filtered or unexported fields }
RbacEventHandler handles the CRUD event from CR
func (*RbacEventHandler) ClientSet ¶
func (r *RbacEventHandler) ClientSet() *kubernetes.Clientset
ClientSet returns the k8s client
func (*RbacEventHandler) Setup ¶ added in v0.0.4
func (r *RbacEventHandler) Setup(ctx context.Context)
Setup Add some initialization stuff in here
type RbacNegotiationReconciler ¶
type RbacNegotiationReconciler struct { client.Client Scheme *runtime.Scheme Config *internal.Config Recorder record.EventRecorder // contains filtered or unexported fields }
RbacNegotiationReconciler reconciles a RbacNegotiation object
func (*RbacNegotiationReconciler) Reconcile ¶
func (r *RbacNegotiationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.10.0/pkg/reconcile
func (*RbacNegotiationReconciler) SetupWithManager ¶
func (r *RbacNegotiationReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type RbacResource ¶
RbacResource identifies the object of the RBAC triplet (example: apps/Deployment)