Documentation ¶
Index ¶
- Constants
- func EnsureBudgetNotification(ctx context.Context, cli *billing.BudgetClient, ...) error
- func EnsureNoBudgetNotification(ctx context.Context, cli *billing.BudgetClient) error
- func EnsureNoPubSub(ctx context.Context, cli *pubsub.Client) error
- func EnsurePubSub(ctx context.Context, cli *pubsub.Client) (*v1alpha1.GCloudResourceName, error)
- func MakeAppEnv(o *v1alpha1.GoogleCloudBillingSource) []corev1.EnvVar
- func NewController(ctx context.Context, cmw configmap.Watcher) *controller.Impl
- type Reconciler
- func (r *Reconciler) BuildAdapter(src commonv1alpha1.Reconcilable, sinkURI *apis.URL) (*appsv1.Deployment, error)
- func (r *Reconciler) FinalizeKind(ctx context.Context, o *v1alpha1.GoogleCloudBillingSource) reconciler.Event
- func (r *Reconciler) ReconcileKind(ctx context.Context, o *v1alpha1.GoogleCloudBillingSource) reconciler.Event
Constants ¶
const ( // ReasonSubscribed indicates that a source subscribed to // notifications from a Cloud Billing Budget. ReasonSubscribed = "Subscribed" // ReasonUnsubscribed indicates that a source unsubscribed from // notifications from a Cloud Billing Budget. ReasonUnsubscribed = "Unsubscribed" // ReasonFailedSubscribe indicates a failure while synchronizing the // notification configuration of a Cloud Billing Budget, or the Pub/Sub // subscription it depends on. ReasonFailedSubscribe = "FailedSubscribe" // ReasonFailedUnsubscribe indicates a failure while deleting the // notification configuration of a Cloud Billing Budget, or the Pub/Sub // subscription it depends on. ReasonFailedUnsubscribe = "FailedUnsubscribe" )
Variables ¶
This section is empty.
Functions ¶
func EnsureBudgetNotification ¶ added in v1.23.1
func EnsureBudgetNotification(ctx context.Context, cli *billing.BudgetClient, topicResName *v1alpha1.GCloudResourceName) error
EnsureBudgetNotification ensures the existence of a notification configuration targetting the given Pub/Sub topic on a Cloud Billing budget. Required permissions: - billing.budgets.get - billing.budgets.update
func EnsureNoBudgetNotification ¶ added in v1.23.1
func EnsureNoBudgetNotification(ctx context.Context, cli *billing.BudgetClient) error
EnsureNoBudgetNotification ensures that the notification configuration is deleted. Required permissions: - billing.budgets.get - billing.budgets.update
func EnsureNoPubSub ¶ added in v1.23.1
EnsureNoPubSub ensures the Pub/Sub topic and associated subscription used for receiving notifications from a Cloud Billing budget are deleted.
func EnsurePubSub ¶ added in v1.23.1
EnsurePubSub ensures the existence of a Pub/Sub topic and associated subscription for receiving notifications from a Cloud Billing budget.
func MakeAppEnv ¶ added in v1.21.0
func MakeAppEnv(o *v1alpha1.GoogleCloudBillingSource) []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 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.GoogleCloudBillingSource) reconciler.Event
FinalizeKind is called when the resource is deleted.
func (*Reconciler) ReconcileKind ¶
func (r *Reconciler) ReconcileKind(ctx context.Context, o *v1alpha1.GoogleCloudBillingSource) reconciler.Event
ReconcileKind implements Interface.ReconcileKind.