Documentation ¶
Index ¶
- Constants
- func EnsureNoPubSub(ctx context.Context, cli *pubsub.Client) error
- func EnsureNoSink(ctx context.Context, cli *logadmin.Client) error
- func EnsurePubSub(ctx context.Context, cli *pubsub.Client) (*v1alpha1.GCloudResourceName, error)
- func MakeAppEnv(o *v1alpha1.GoogleCloudAuditLogsSource) []corev1.EnvVar
- func NewController(ctx context.Context, cmw configmap.Watcher) *controller.Impl
- func ReconcileSink(ctx context.Context, lacli *logadmin.Client, pscli *pubsub.Client, ...) error
- type FilterBuilder
- type FilterOption
- type Reconciler
- func (r *Reconciler) BuildAdapter(src commonv1alpha1.Reconcilable, sinkURI *apis.URL) (*appsv1.Deployment, error)
- func (r *Reconciler) FinalizeKind(ctx context.Context, o *v1alpha1.GoogleCloudAuditLogsSource) reconciler.Event
- func (r *Reconciler) ReconcileKind(ctx context.Context, o *v1alpha1.GoogleCloudAuditLogsSource) reconciler.Event
Constants ¶
const ( // ReasonSubscribed indicates that a source subscribed to change // notifications from a Cloud Audit Logs Sink. ReasonSubscribed = "Subscribed" // ReasonUnsubscribed indicates that a source unsubscribed from change // notifications from a Cloud Audit Logs Sink. ReasonUnsubscribed = "Unsubscribed" // ReasonFailedSubscribe indicates a failure while synchronizing the // notification configuration of a Cloud Audit Logs Sink, or the Pub/Sub // subscription it depends on. ReasonFailedSubscribe = "FailedSubscribe" // ReasonFailedUnsubscribe indicates a failure while deleting the // notification configuration of a Cloud Audit Logs Sink, or the Pub/Sub // subscription it depends on. ReasonFailedUnsubscribe = "FailedUnsubscribe" )
Variables ¶
This section is empty.
Functions ¶
func EnsureNoPubSub ¶ added in v1.22.0
EnsureNoPubSub ensures the Pub/Sub topic and associated subscription used for receiving change notifications from a Cloud Audit Logs resource are deleted.
func EnsureNoSink ¶ added in v1.22.0
EnsureNoSink looks at status.AuditLogSink and if non-empty will delete it Required permissions: - logging.sinks.get - logging.sinks.delete
func EnsurePubSub ¶ added in v1.22.0
EnsurePubSub ensures the existence of a Pub/Sub topic and associated subscription for receiving change notifications from a Cloud Audit Logs resource.
func MakeAppEnv ¶ added in v1.21.0
func MakeAppEnv(o *v1alpha1.GoogleCloudAuditLogsSource) []corev1.EnvVar
MakeAppEnv extracts environment variables from the object. Exported to be used in external tools for local test environments.
func NewController ¶
NewController creates a Reconciler for the event source and returns the result of NewImpl.
Types ¶
type FilterBuilder ¶
type FilterBuilder struct {
// contains filtered or unexported fields
}
FilterBuilder builds a filter for Google Cloud Audit Logs. Currently supports querying by the Audit Logs serviceName, methodName (requireds), and resourceName (optional).
func NewFilterBuilder ¶
func NewFilterBuilder(serviceName, methodName string, opts ...FilterOption) *FilterBuilder
NewFilterBuilder creates a new instance of FilterBuilder.
func (*FilterBuilder) GetFilter ¶
func (fb *FilterBuilder) GetFilter() string
GetFilter returns filter query string.
type FilterOption ¶
type FilterOption func(*FilterBuilder)
FilterOption is used to apply custom options on FilterBuilder.
func WithResourceName ¶
func WithResourceName(resourceName string) FilterOption
WithResourceName sets FilterBuilder resource name.
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
Reconciler implements controller.Reconciler for the event source type.
func (*Reconciler) BuildAdapter ¶
func (r *Reconciler) BuildAdapter(src commonv1alpha1.Reconcilable, sinkURI *apis.URL) (*appsv1.Deployment, error)
BuildAdapter implements common.AdapterBuilder.
func (*Reconciler) FinalizeKind ¶
func (r *Reconciler) FinalizeKind(ctx context.Context, o *v1alpha1.GoogleCloudAuditLogsSource) reconciler.Event
FinalizeKind is called when the resource is deleted.
func (*Reconciler) ReconcileKind ¶
func (r *Reconciler) ReconcileKind(ctx context.Context, o *v1alpha1.GoogleCloudAuditLogsSource) reconciler.Event
ReconcileKind implements Interface.ReconcileKind.