From 5a8b595b4e7d52c0a8cb603ecfdb1d7bae2e2932 Mon Sep 17 00:00:00 2001 From: Chuan-Yen Chiang Date: Mon, 5 Aug 2024 14:51:05 +0200 Subject: [PATCH] Bump up following version, and add configs for metrics - `go` to `1.21` - `crossplane-runtime` to `1.16.0` - `upjet` to `1.4.0` - `crossplane-tools` to `v0.0.0-20240522174801-1ad3d4c87f21` Add implementations to enable metrics. Signed-off-by: Chuan-Yen Chiang --- .github/workflows/ci.yml | 4 +- Makefile | 4 +- apis/addon/v1alpha1/zz_addon_types.go | 2 +- apis/business/v1alpha1/zz_service_types.go | 2 +- .../v1alpha1/zz_servicesubscriber_types.go | 2 +- apis/escalation/v1alpha1/zz_policy_types.go | 2 +- apis/event/v1alpha1/zz_orchestration_types.go | 2 +- .../v1alpha1/zz_orchestrationrouter_types.go | 2 +- .../v1alpha1/zz_orchestrationservice_types.go | 2 +- .../zz_orchestrationunrouted_types.go | 2 +- .../v1alpha1/zz_extension_terraformed.go | 2 +- .../extensions/v1alpha1/zz_extension_types.go | 6 +- .../v1alpha1/zz_generated.deepcopy.go | 11 ++++ .../v1alpha1/zz_servicenow_terraformed.go | 2 +- .../v1alpha1/zz_servicenow_types.go | 6 +- apis/maintenance/v1alpha1/zz_window_types.go | 2 +- apis/response/v1alpha1/zz_play_types.go | 2 +- .../v1alpha1/zz_generated.conversion_hubs.go | 4 +- apis/ruleset/v1alpha1/zz_rule_types.go | 2 +- apis/ruleset/v1alpha1/zz_ruleset_types.go | 2 +- apis/schedule/v1alpha1/zz_schedule_types.go | 2 +- apis/service/v1alpha1/zz_dependency_types.go | 2 +- apis/service/v1alpha1/zz_eventrule_types.go | 2 +- .../v1alpha1/zz_generated.conversion_hubs.go | 6 +- apis/service/v1alpha1/zz_integration_types.go | 2 +- apis/service/v1alpha1/zz_service_types.go | 2 +- apis/slack/v1alpha1/zz_connection_types.go | 2 +- apis/tag/v1alpha1/zz_assignment_types.go | 2 +- .../v1alpha1/zz_generated.conversion_hubs.go | 4 +- apis/tag/v1alpha1/zz_tag_types.go | 2 +- .../v1alpha1/zz_generated.conversion_hubs.go | 4 +- apis/team/v1alpha1/zz_membership_types.go | 2 +- apis/team/v1alpha1/zz_team_types.go | 2 +- apis/user/v1alpha1/zz_contactmethod_types.go | 2 +- .../v1alpha1/zz_generated.conversion_hubs.go | 6 +- .../v1alpha1/zz_notificationrule_types.go | 2 +- apis/user/v1alpha1/zz_user_types.go | 2 +- .../webhook/v1alpha1/zz_subscription_types.go | 2 +- cmd/provider/main.go | 33 ++++++++--- go.mod | 19 ++++--- go.sum | 48 +++++++++++----- .../controller/addon/addon/zz_controller.go | 13 +++++ .../business/service/zz_controller.go | 13 +++++ .../servicesubscriber/zz_controller.go | 13 +++++ .../escalation/policy/zz_controller.go | 13 +++++ .../event/orchestration/zz_controller.go | 13 +++++ .../orchestrationrouter/zz_controller.go | 13 +++++ .../orchestrationservice/zz_controller.go | 13 +++++ .../orchestrationunrouted/zz_controller.go | 13 +++++ .../extensions/extension/zz_controller.go | 13 +++++ .../extensions/servicenow/zz_controller.go | 13 +++++ .../maintenance/window/zz_controller.go | 13 +++++ .../controller/response/play/zz_controller.go | 13 +++++ .../controller/ruleset/rule/zz_controller.go | 13 +++++ .../ruleset/ruleset/zz_controller.go | 13 +++++ .../schedule/schedule/zz_controller.go | 13 +++++ .../service/dependency/zz_controller.go | 13 +++++ .../service/eventrule/zz_controller.go | 13 +++++ .../service/integration/zz_controller.go | 13 +++++ .../service/service/zz_controller.go | 13 +++++ .../slack/connection/zz_controller.go | 13 +++++ .../tag/assignment/zz_controller.go | 13 +++++ internal/controller/tag/tag/zz_controller.go | 13 +++++ .../team/membership/zz_controller.go | 13 +++++ .../controller/team/team/zz_controller.go | 13 +++++ .../user/contactmethod/zz_controller.go | 13 +++++ .../user/notificationrule/zz_controller.go | 13 +++++ .../controller/user/user/zz_controller.go | 13 +++++ .../webhook/subscription/zz_controller.go | 13 +++++ internal/controller/zz_setup.go | 4 ++ .../addon.pagerduty.crossplane.io_addons.yaml | 20 ++++++- ...ness.pagerduty.crossplane.io_services.yaml | 20 ++++++- ...duty.crossplane.io_servicesubscribers.yaml | 20 ++++++- ...tion.pagerduty.crossplane.io_policies.yaml | 20 ++++++- ...ty.crossplane.io_orchestrationrouters.yaml | 20 ++++++- ...agerduty.crossplane.io_orchestrations.yaml | 20 ++++++- ...y.crossplane.io_orchestrationservices.yaml | 20 ++++++- ....crossplane.io_orchestrationunrouteds.yaml | 20 ++++++- ...ns.pagerduty.crossplane.io_extensions.yaml | 39 ++++++++++++- ...s.pagerduty.crossplane.io_servicenows.yaml | 57 ++++++++++++++++++- ...nance.pagerduty.crossplane.io_windows.yaml | 20 ++++++- ...gerduty.crossplane.io_providerconfigs.yaml | 7 +++ .../pagerduty.crossplane.io_storeconfigs.yaml | 7 +++ ...esponse.pagerduty.crossplane.io_plays.yaml | 20 ++++++- ...ruleset.pagerduty.crossplane.io_rules.yaml | 20 ++++++- ...eset.pagerduty.crossplane.io_rulesets.yaml | 20 ++++++- ...ule.pagerduty.crossplane.io_schedules.yaml | 20 ++++++- ....pagerduty.crossplane.io_dependencies.yaml | 20 ++++++- ...ce.pagerduty.crossplane.io_eventrules.yaml | 20 ++++++- ....pagerduty.crossplane.io_integrations.yaml | 20 ++++++- ...vice.pagerduty.crossplane.io_services.yaml | 20 ++++++- ...k.pagerduty.crossplane.io_connections.yaml | 20 ++++++- ...g.pagerduty.crossplane.io_assignments.yaml | 20 ++++++- .../tag.pagerduty.crossplane.io_tags.yaml | 20 ++++++- ...m.pagerduty.crossplane.io_memberships.yaml | 20 ++++++- .../team.pagerduty.crossplane.io_teams.yaml | 20 ++++++- ...agerduty.crossplane.io_contactmethods.yaml | 20 ++++++- ...rduty.crossplane.io_notificationrules.yaml | 20 ++++++- .../user.pagerduty.crossplane.io_users.yaml | 20 ++++++- ...pagerduty.crossplane.io_subscriptions.yaml | 20 ++++++- 100 files changed, 1048 insertions(+), 161 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b2e9c7..564baf5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,8 +10,8 @@ on: env: # Common versions - GO_VERSION: '1.20' - GOLANGCI_VERSION: 'v1.53.3' + GO_VERSION: '1.21' + GOLANGCI_VERSION: 'v1.54.0' DOCKER_BUILDX_VERSION: 'v0.8.2' XPKG_ACCESS_ID: ${{ secrets.XPKG_ACCESS_ID }} diff --git a/Makefile b/Makefile index dd21023..da53ef6 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ NPROCS ?= 1 # to half the number of CPU cores. GO_TEST_PARALLEL := $(shell echo $$(( $(NPROCS) / 2 ))) -GO_REQUIRED_VERSION ?= 1.20 +GO_REQUIRED_VERSION ?= 1.21 GO_STATIC_PACKAGES = $(GO_PROJECT)/cmd/provider $(GO_PROJECT)/cmd/generator GO_LDFLAGS += -X $(GO_PROJECT)/internal/version.Version=$(VERSION) GO_SUBDIRS += cmd internal apis @@ -49,7 +49,7 @@ GO111MODULE = on # Setup Kubernetes tools KIND_VERSION = v0.15.0 -UP_VERSION = v0.24.1 +UP_VERSION = v0.28.0 UP_CHANNEL = stable -include build/makelib/k8s_tools.mk diff --git a/apis/addon/v1alpha1/zz_addon_types.go b/apis/addon/v1alpha1/zz_addon_types.go index 9491f8f..047279c 100755 --- a/apis/addon/v1alpha1/zz_addon_types.go +++ b/apis/addon/v1alpha1/zz_addon_types.go @@ -73,8 +73,8 @@ type AddonStatus struct { // +kubebuilder:storageversion // Addon is the Schema for the Addons API. Creates and manages an add-on in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/business/v1alpha1/zz_service_types.go b/apis/business/v1alpha1/zz_service_types.go index 110c27c..7df5c57 100755 --- a/apis/business/v1alpha1/zz_service_types.go +++ b/apis/business/v1alpha1/zz_service_types.go @@ -123,8 +123,8 @@ type ServiceStatus struct { // +kubebuilder:storageversion // Service is the Schema for the Services API. Creates and manages a business service in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/business/v1alpha1/zz_servicesubscriber_types.go b/apis/business/v1alpha1/zz_servicesubscriber_types.go index 5e59b94..c768a10 100755 --- a/apis/business/v1alpha1/zz_servicesubscriber_types.go +++ b/apis/business/v1alpha1/zz_servicesubscriber_types.go @@ -101,8 +101,8 @@ type ServiceSubscriberStatus struct { // +kubebuilder:storageversion // ServiceSubscriber is the Schema for the ServiceSubscribers API. Creates and manages a business service subscriber in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/escalation/v1alpha1/zz_policy_types.go b/apis/escalation/v1alpha1/zz_policy_types.go index 88c8aca..c656f0e 100755 --- a/apis/escalation/v1alpha1/zz_policy_types.go +++ b/apis/escalation/v1alpha1/zz_policy_types.go @@ -212,8 +212,8 @@ type PolicyStatus struct { // +kubebuilder:storageversion // Policy is the Schema for the Policys API. Creates and manages an escalation policy in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/event/v1alpha1/zz_orchestration_types.go b/apis/event/v1alpha1/zz_orchestration_types.go index 0782e7e..60c3a07 100755 --- a/apis/event/v1alpha1/zz_orchestration_types.go +++ b/apis/event/v1alpha1/zz_orchestration_types.go @@ -144,8 +144,8 @@ type OrchestrationStatus struct { // +kubebuilder:storageversion // Orchestration is the Schema for the Orchestrations API. Creates and manages an Event Orchestration in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/event/v1alpha1/zz_orchestrationrouter_types.go b/apis/event/v1alpha1/zz_orchestrationrouter_types.go index 6398446..70d1661 100755 --- a/apis/event/v1alpha1/zz_orchestrationrouter_types.go +++ b/apis/event/v1alpha1/zz_orchestrationrouter_types.go @@ -258,8 +258,8 @@ type OrchestrationRouterStatus struct { // +kubebuilder:storageversion // OrchestrationRouter is the Schema for the OrchestrationRouters API. Creates and manages a Router for Global Event Orchestration in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/event/v1alpha1/zz_orchestrationservice_types.go b/apis/event/v1alpha1/zz_orchestrationservice_types.go index 1f8936e..eb858d5 100755 --- a/apis/event/v1alpha1/zz_orchestrationservice_types.go +++ b/apis/event/v1alpha1/zz_orchestrationservice_types.go @@ -1014,8 +1014,8 @@ type OrchestrationServiceStatus struct { // +kubebuilder:storageversion // OrchestrationService is the Schema for the OrchestrationServices API. Creates and manages a Service Orchestration for a Service. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/event/v1alpha1/zz_orchestrationunrouted_types.go b/apis/event/v1alpha1/zz_orchestrationunrouted_types.go index 3128b0b..071ea6c 100755 --- a/apis/event/v1alpha1/zz_orchestrationunrouted_types.go +++ b/apis/event/v1alpha1/zz_orchestrationunrouted_types.go @@ -526,8 +526,8 @@ type OrchestrationUnroutedStatus struct { // +kubebuilder:storageversion // OrchestrationUnrouted is the Schema for the OrchestrationUnrouteds API. Creates and manages an Unrouted Orchestration for a Global Event Orchestration in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/extensions/v1alpha1/zz_extension_terraformed.go b/apis/extensions/v1alpha1/zz_extension_terraformed.go index 77c4185..30f4335 100755 --- a/apis/extensions/v1alpha1/zz_extension_terraformed.go +++ b/apis/extensions/v1alpha1/zz_extension_terraformed.go @@ -21,7 +21,7 @@ func (mg *Extension) GetTerraformResourceType() string { // GetConnectionDetailsMapping for this Extension func (tr *Extension) GetConnectionDetailsMapping() map[string]string { - return map[string]string{"endpoint_url": "spec.forProvider.endpointUrlSecretRef"} + return map[string]string{"endpoint_url": "endpointUrlSecretRef"} } // GetObservation of this Extension diff --git a/apis/extensions/v1alpha1/zz_extension_types.go b/apis/extensions/v1alpha1/zz_extension_types.go index eb963e0..44eec92 100755 --- a/apis/extensions/v1alpha1/zz_extension_types.go +++ b/apis/extensions/v1alpha1/zz_extension_types.go @@ -18,6 +18,10 @@ type ExtensionInitParameters struct { // The configuration of the service extension as string containing plain JSON-encoded data. Config *string `json:"config,omitempty" tf:"config,omitempty"` + // The url of the extension. + // Note: The endpoint URL is Optional API wise in most cases. But in some cases it is a Required parameter. For example, pagerduty_extension_schema named Generic V2 Webhook doesn't accept pagerduty_extension with no endpoint_url, but one with named Slack accepts. + EndpointURLSecretRef *v1.SecretKeySelector `json:"endpointUrlSecretRef,omitempty" tf:"-"` + // This is the objects for which the extension applies (An array of service ids). // +crossplane:generate:reference:type=github.com/crossplane-contrib/provider-pagerduty/apis/service/v1alpha1.Service // +listType=set @@ -132,8 +136,8 @@ type ExtensionStatus struct { // +kubebuilder:storageversion // Extension is the Schema for the Extensions API. Creates and manages a service extension in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/extensions/v1alpha1/zz_generated.deepcopy.go b/apis/extensions/v1alpha1/zz_generated.deepcopy.go index e67084e..b20d18c 100644 --- a/apis/extensions/v1alpha1/zz_generated.deepcopy.go +++ b/apis/extensions/v1alpha1/zz_generated.deepcopy.go @@ -48,6 +48,11 @@ func (in *ExtensionInitParameters) DeepCopyInto(out *ExtensionInitParameters) { *out = new(string) **out = **in } + if in.EndpointURLSecretRef != nil { + in, out := &in.EndpointURLSecretRef, &out.EndpointURLSecretRef + *out = new(v1.SecretKeySelector) + **out = **in + } if in.ExtensionObjects != nil { in, out := &in.ExtensionObjects, &out.ExtensionObjects *out = make([]*string, len(*in)) @@ -319,6 +324,11 @@ func (in *Servicenow) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ServicenowInitParameters) DeepCopyInto(out *ServicenowInitParameters) { *out = *in + if in.EndpointURLSecretRef != nil { + in, out := &in.EndpointURLSecretRef, &out.EndpointURLSecretRef + *out = new(v1.SecretKeySelector) + **out = **in + } if in.ExtensionObjects != nil { in, out := &in.ExtensionObjects, &out.ExtensionObjects *out = make([]*string, len(*in)) @@ -345,6 +355,7 @@ func (in *ServicenowInitParameters) DeepCopyInto(out *ServicenowInitParameters) *out = new(string) **out = **in } + out.SnowPasswordSecretRef = in.SnowPasswordSecretRef if in.SnowUser != nil { in, out := &in.SnowUser, &out.SnowUser *out = new(string) diff --git a/apis/extensions/v1alpha1/zz_servicenow_terraformed.go b/apis/extensions/v1alpha1/zz_servicenow_terraformed.go index fb9b889..3435d16 100755 --- a/apis/extensions/v1alpha1/zz_servicenow_terraformed.go +++ b/apis/extensions/v1alpha1/zz_servicenow_terraformed.go @@ -21,7 +21,7 @@ func (mg *Servicenow) GetTerraformResourceType() string { // GetConnectionDetailsMapping for this Servicenow func (tr *Servicenow) GetConnectionDetailsMapping() map[string]string { - return map[string]string{"endpoint_url": "spec.forProvider.endpointUrlSecretRef", "snow_password": "spec.forProvider.snowPasswordSecretRef"} + return map[string]string{"endpoint_url": "endpointUrlSecretRef", "snow_password": "snowPasswordSecretRef"} } // GetObservation of this Servicenow diff --git a/apis/extensions/v1alpha1/zz_servicenow_types.go b/apis/extensions/v1alpha1/zz_servicenow_types.go index 32f6cfc..06dab7f 100755 --- a/apis/extensions/v1alpha1/zz_servicenow_types.go +++ b/apis/extensions/v1alpha1/zz_servicenow_types.go @@ -14,6 +14,7 @@ import ( ) type ServicenowInitParameters struct { + EndpointURLSecretRef *v1.SecretKeySelector `json:"endpointUrlSecretRef,omitempty" tf:"-"` // This is the objects for which the extension applies (An array of service ids). // +listType=set @@ -28,6 +29,9 @@ type ServicenowInitParameters struct { // The ServiceNow referer. Referer *string `json:"referer,omitempty" tf:"referer,omitempty"` + // The ServiceNow password. + SnowPasswordSecretRef v1.SecretKeySelector `json:"snowPasswordSecretRef" tf:"-"` + // The ServiceNow username. SnowUser *string `json:"snowUser,omitempty" tf:"snow_user,omitempty"` @@ -163,8 +167,8 @@ type ServicenowStatus struct { // +kubebuilder:storageversion // Servicenow is the Schema for the Servicenows API. Creates and manages a ServiceNow service extension in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/maintenance/v1alpha1/zz_window_types.go b/apis/maintenance/v1alpha1/zz_window_types.go index 7440d25..9f14a8f 100755 --- a/apis/maintenance/v1alpha1/zz_window_types.go +++ b/apis/maintenance/v1alpha1/zz_window_types.go @@ -118,8 +118,8 @@ type WindowStatus struct { // +kubebuilder:storageversion // Window is the Schema for the Windows API. Creates and manages a maintenance window in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/response/v1alpha1/zz_play_types.go b/apis/response/v1alpha1/zz_play_types.go index ba25ebb..390f5e6 100755 --- a/apis/response/v1alpha1/zz_play_types.go +++ b/apis/response/v1alpha1/zz_play_types.go @@ -329,8 +329,8 @@ type PlayStatus struct { // +kubebuilder:storageversion // Play is the Schema for the Plays API. Creates and manages a response play in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/ruleset/v1alpha1/zz_generated.conversion_hubs.go b/apis/ruleset/v1alpha1/zz_generated.conversion_hubs.go index c070b57..4c95493 100755 --- a/apis/ruleset/v1alpha1/zz_generated.conversion_hubs.go +++ b/apis/ruleset/v1alpha1/zz_generated.conversion_hubs.go @@ -7,7 +7,7 @@ Copyright 2022 Upbound Inc. package v1alpha1 // Hub marks this type as a conversion hub. -func (tr *Ruleset) Hub() {} +func (tr *Rule) Hub() {} // Hub marks this type as a conversion hub. -func (tr *Rule) Hub() {} +func (tr *Ruleset) Hub() {} diff --git a/apis/ruleset/v1alpha1/zz_rule_types.go b/apis/ruleset/v1alpha1/zz_rule_types.go index ff8220c..ce760b0 100755 --- a/apis/ruleset/v1alpha1/zz_rule_types.go +++ b/apis/ruleset/v1alpha1/zz_rule_types.go @@ -688,8 +688,8 @@ type RuleStatus struct { // +kubebuilder:storageversion // Rule is the Schema for the Rules API. Creates and manages a ruleset rule in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/ruleset/v1alpha1/zz_ruleset_types.go b/apis/ruleset/v1alpha1/zz_ruleset_types.go index 385f915..9ca226a 100755 --- a/apis/ruleset/v1alpha1/zz_ruleset_types.go +++ b/apis/ruleset/v1alpha1/zz_ruleset_types.go @@ -116,8 +116,8 @@ type RulesetStatus struct { // +kubebuilder:storageversion // Ruleset is the Schema for the Rulesets API. Creates and manages an ruleset in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/schedule/v1alpha1/zz_schedule_types.go b/apis/schedule/v1alpha1/zz_schedule_types.go index b53beb9..c261a41 100755 --- a/apis/schedule/v1alpha1/zz_schedule_types.go +++ b/apis/schedule/v1alpha1/zz_schedule_types.go @@ -312,8 +312,8 @@ type ScheduleStatus struct { // +kubebuilder:storageversion // Schedule is the Schema for the Schedules API. Creates and manages a schedule in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/service/v1alpha1/zz_dependency_types.go b/apis/service/v1alpha1/zz_dependency_types.go index 9626c81..855b09b 100755 --- a/apis/service/v1alpha1/zz_dependency_types.go +++ b/apis/service/v1alpha1/zz_dependency_types.go @@ -160,8 +160,8 @@ type DependencyStatus struct { // +kubebuilder:storageversion // Dependency is the Schema for the Dependencys API. Creates and manages a business service dependency in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/service/v1alpha1/zz_eventrule_types.go b/apis/service/v1alpha1/zz_eventrule_types.go index a2cf2c2..c9aff31 100755 --- a/apis/service/v1alpha1/zz_eventrule_types.go +++ b/apis/service/v1alpha1/zz_eventrule_types.go @@ -675,8 +675,8 @@ type EventRuleStatus struct { // +kubebuilder:storageversion // EventRule is the Schema for the EventRules API. Creates and manages a service event rule in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/service/v1alpha1/zz_generated.conversion_hubs.go b/apis/service/v1alpha1/zz_generated.conversion_hubs.go index d5f7353..21a7a81 100755 --- a/apis/service/v1alpha1/zz_generated.conversion_hubs.go +++ b/apis/service/v1alpha1/zz_generated.conversion_hubs.go @@ -6,9 +6,6 @@ Copyright 2022 Upbound Inc. package v1alpha1 -// Hub marks this type as a conversion hub. -func (tr *Service) Hub() {} - // Hub marks this type as a conversion hub. func (tr *Dependency) Hub() {} @@ -17,3 +14,6 @@ func (tr *EventRule) Hub() {} // Hub marks this type as a conversion hub. func (tr *Integration) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *Service) Hub() {} diff --git a/apis/service/v1alpha1/zz_integration_types.go b/apis/service/v1alpha1/zz_integration_types.go index 3298556..01c2d04 100755 --- a/apis/service/v1alpha1/zz_integration_types.go +++ b/apis/service/v1alpha1/zz_integration_types.go @@ -589,8 +589,8 @@ type IntegrationStatus struct { // +kubebuilder:storageversion // Integration is the Schema for the Integrations API. Creates and manages a service integration in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/service/v1alpha1/zz_service_types.go b/apis/service/v1alpha1/zz_service_types.go index 16543a3..aec9b4d 100755 --- a/apis/service/v1alpha1/zz_service_types.go +++ b/apis/service/v1alpha1/zz_service_types.go @@ -561,8 +561,8 @@ type ServiceStatus struct { // +kubebuilder:storageversion // Service is the Schema for the Services API. Creates and manages a service in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/slack/v1alpha1/zz_connection_types.go b/apis/slack/v1alpha1/zz_connection_types.go index 0d69624..5e1f98c 100755 --- a/apis/slack/v1alpha1/zz_connection_types.go +++ b/apis/slack/v1alpha1/zz_connection_types.go @@ -158,8 +158,8 @@ type ConnectionStatus struct { // +kubebuilder:storageversion // Connection is the Schema for the Connections API. Creates and manages a slack connection in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/tag/v1alpha1/zz_assignment_types.go b/apis/tag/v1alpha1/zz_assignment_types.go index dbbbd91..232733c 100755 --- a/apis/tag/v1alpha1/zz_assignment_types.go +++ b/apis/tag/v1alpha1/zz_assignment_types.go @@ -83,8 +83,8 @@ type AssignmentStatus struct { // +kubebuilder:storageversion // Assignment is the Schema for the Assignments API. Creates and manages a tag assignment in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/tag/v1alpha1/zz_generated.conversion_hubs.go b/apis/tag/v1alpha1/zz_generated.conversion_hubs.go index 7782267..49b320e 100755 --- a/apis/tag/v1alpha1/zz_generated.conversion_hubs.go +++ b/apis/tag/v1alpha1/zz_generated.conversion_hubs.go @@ -7,7 +7,7 @@ Copyright 2022 Upbound Inc. package v1alpha1 // Hub marks this type as a conversion hub. -func (tr *Tag) Hub() {} +func (tr *Assignment) Hub() {} // Hub marks this type as a conversion hub. -func (tr *Assignment) Hub() {} +func (tr *Tag) Hub() {} diff --git a/apis/tag/v1alpha1/zz_tag_types.go b/apis/tag/v1alpha1/zz_tag_types.go index e60ca02..dbf1470 100755 --- a/apis/tag/v1alpha1/zz_tag_types.go +++ b/apis/tag/v1alpha1/zz_tag_types.go @@ -69,8 +69,8 @@ type TagStatus struct { // +kubebuilder:storageversion // Tag is the Schema for the Tags API. Creates and manages a tag in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/team/v1alpha1/zz_generated.conversion_hubs.go b/apis/team/v1alpha1/zz_generated.conversion_hubs.go index 52354ef..99fa6eb 100755 --- a/apis/team/v1alpha1/zz_generated.conversion_hubs.go +++ b/apis/team/v1alpha1/zz_generated.conversion_hubs.go @@ -7,7 +7,7 @@ Copyright 2022 Upbound Inc. package v1alpha1 // Hub marks this type as a conversion hub. -func (tr *Team) Hub() {} +func (tr *Membership) Hub() {} // Hub marks this type as a conversion hub. -func (tr *Membership) Hub() {} +func (tr *Team) Hub() {} diff --git a/apis/team/v1alpha1/zz_membership_types.go b/apis/team/v1alpha1/zz_membership_types.go index 3354f6e..0f2db76 100755 --- a/apis/team/v1alpha1/zz_membership_types.go +++ b/apis/team/v1alpha1/zz_membership_types.go @@ -120,8 +120,8 @@ type MembershipStatus struct { // +kubebuilder:storageversion // Membership is the Schema for the Memberships API. Creates and manages a team membership in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/team/v1alpha1/zz_team_types.go b/apis/team/v1alpha1/zz_team_types.go index 8eea279..26dd15a 100755 --- a/apis/team/v1alpha1/zz_team_types.go +++ b/apis/team/v1alpha1/zz_team_types.go @@ -96,8 +96,8 @@ type TeamStatus struct { // +kubebuilder:storageversion // Team is the Schema for the Teams API. Creates and manages a team in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/user/v1alpha1/zz_contactmethod_types.go b/apis/user/v1alpha1/zz_contactmethod_types.go index 0f2d639..5bff4af 100755 --- a/apis/user/v1alpha1/zz_contactmethod_types.go +++ b/apis/user/v1alpha1/zz_contactmethod_types.go @@ -137,8 +137,8 @@ type ContactMethodStatus struct { // +kubebuilder:storageversion // ContactMethod is the Schema for the ContactMethods API. Creates and manages contact methods for a user in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/user/v1alpha1/zz_generated.conversion_hubs.go b/apis/user/v1alpha1/zz_generated.conversion_hubs.go index bf2c7f3..c48a28e 100755 --- a/apis/user/v1alpha1/zz_generated.conversion_hubs.go +++ b/apis/user/v1alpha1/zz_generated.conversion_hubs.go @@ -6,11 +6,11 @@ Copyright 2022 Upbound Inc. package v1alpha1 -// Hub marks this type as a conversion hub. -func (tr *User) Hub() {} - // Hub marks this type as a conversion hub. func (tr *ContactMethod) Hub() {} // Hub marks this type as a conversion hub. func (tr *NotificationRule) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *User) Hub() {} diff --git a/apis/user/v1alpha1/zz_notificationrule_types.go b/apis/user/v1alpha1/zz_notificationrule_types.go index 71be54e..080203e 100755 --- a/apis/user/v1alpha1/zz_notificationrule_types.go +++ b/apis/user/v1alpha1/zz_notificationrule_types.go @@ -114,8 +114,8 @@ type NotificationRuleStatus struct { // +kubebuilder:storageversion // NotificationRule is the Schema for the NotificationRules API. Creates and manages notification rules for a user in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/user/v1alpha1/zz_user_types.go b/apis/user/v1alpha1/zz_user_types.go index 6a24106..d527371 100755 --- a/apis/user/v1alpha1/zz_user_types.go +++ b/apis/user/v1alpha1/zz_user_types.go @@ -149,8 +149,8 @@ type UserStatus struct { // +kubebuilder:storageversion // User is the Schema for the Users API. Creates and manages a user in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/apis/webhook/v1alpha1/zz_subscription_types.go b/apis/webhook/v1alpha1/zz_subscription_types.go index a869468..37270a1 100755 --- a/apis/webhook/v1alpha1/zz_subscription_types.go +++ b/apis/webhook/v1alpha1/zz_subscription_types.go @@ -212,8 +212,8 @@ type SubscriptionStatus struct { // +kubebuilder:storageversion // Subscription is the Schema for the Subscriptions API. Creates and manages a webhook subscription in PagerDuty. -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,pagerduty} diff --git a/cmd/provider/main.go b/cmd/provider/main.go index 54c1556..a1b1c48 100644 --- a/cmd/provider/main.go +++ b/cmd/provider/main.go @@ -18,7 +18,9 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/feature" "github.com/crossplane/crossplane-runtime/pkg/logging" "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" @@ -28,6 +30,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/log/zap" + "sigs.k8s.io/controller-runtime/pkg/metrics" "github.com/crossplane-contrib/provider-pagerduty/apis" "github.com/crossplane-contrib/provider-pagerduty/apis/v1alpha1" @@ -39,15 +42,16 @@ import ( func main() { var ( - app = kingpin.New(filepath.Base(os.Args[0]), "Terraform based Crossplane provider for PagerDuty").DefaultEnvars() - debug = app.Flag("debug", "Run with debug logging.").Short('d').Bool() - syncInterval = app.Flag("sync", "Sync interval controls how often all resources will be double checked for drift.").Short('s').Default("1h").Duration() - pollInterval = app.Flag("poll", "Poll interval controls how often an individual resource should be checked for drift.").Default("10m").Duration() - leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").OverrideDefaultFromEnvar("LEADER_ELECTION").Bool() - terraformVersion = app.Flag("terraform-version", "Terraform version.").Required().Envar("TERRAFORM_VERSION").String() - providerSource = app.Flag("terraform-provider-source", "Terraform provider source.").Required().Envar("TERRAFORM_PROVIDER_SOURCE").String() - providerVersion = app.Flag("terraform-provider-version", "Terraform provider version.").Required().Envar("TERRAFORM_PROVIDER_VERSION").String() - maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may checked for drift from the desired state.").Default("10").Int() + app = kingpin.New(filepath.Base(os.Args[0]), "Terraform based Crossplane provider for PagerDuty").DefaultEnvars() + debug = app.Flag("debug", "Run with debug logging.").Short('d').Bool() + syncInterval = app.Flag("sync", "Sync interval controls how often all resources will be double checked for drift.").Short('s').Default("1h").Duration() + pollInterval = app.Flag("poll", "Poll interval controls how often an individual resource should be checked for drift.").Default("10m").Duration() + pollStateMetricInterval = app.Flag("poll-state-metric", "State metric recording interval").Default("5s").Duration() + leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").OverrideDefaultFromEnvar("LEADER_ELECTION").Bool() + terraformVersion = app.Flag("terraform-version", "Terraform version.").Required().Envar("TERRAFORM_VERSION").String() + providerSource = app.Flag("terraform-provider-source", "Terraform provider source.").Required().Envar("TERRAFORM_PROVIDER_SOURCE").String() + providerVersion = app.Flag("terraform-provider-version", "Terraform provider version.").Required().Envar("TERRAFORM_PROVIDER_VERSION").String() + maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may checked for drift from the desired state.").Default("10").Int() namespace = app.Flag("namespace", "Namespace used to set as default scope in default secret store config.").Default("crossplane-system").Envar("POD_NAMESPACE").String() essTLSCertsPath = app.Flag("ess-tls-cert-dir", "Path of ESS TLS certificates.").Envar("ESS_TLS_CERTS_DIR").String() @@ -90,6 +94,12 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add PagerDuty APIs to scheme") + metricRecorder := managed.NewMRMetricRecorder() + stateMetrics := statemetrics.NewMRStateMetrics() + + metrics.Registry.MustRegister(metricRecorder) + metrics.Registry.MustRegister(stateMetrics) + featureFlags := &feature.Flags{} o := tjcontroller.Options{ Options: xpcontroller.Options{ @@ -98,6 +108,11 @@ func main() { PollInterval: *pollInterval, MaxConcurrentReconciles: *maxReconcileRate, Features: featureFlags, + MetricOptions: &xpcontroller.MetricOptions{ + PollStateMetricInterval: *pollStateMetricInterval, + MRMetrics: metricRecorder, + MRStateMetrics: stateMetrics, + }, }, Provider: config.GetProvider(), SetupFn: clients.TerraformSetupBuilder(*terraformVersion, *providerSource, *providerVersion), diff --git a/go.mod b/go.mod index 54c5587..bf9bdea 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,12 @@ module github.com/crossplane-contrib/provider-pagerduty -go 1.20 +go 1.21 require ( dario.cat/mergo v1.0.0 - github.com/crossplane/crossplane-runtime v1.15.1 - github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79 - github.com/crossplane/upjet v1.2.3 + github.com/crossplane/crossplane-runtime v1.16.0 + github.com/crossplane/crossplane-tools v0.0.0-20240522174801-1ad3d4c87f21 + github.com/crossplane/upjet v1.4.0 github.com/pkg/errors v0.9.1 gopkg.in/alecthomas/kingpin.v2 v2.2.6 k8s.io/apimachinery v0.29.1 @@ -17,14 +17,16 @@ require ( require ( github.com/agext/levenshtein v1.2.3 // indirect + github.com/alecthomas/kingpin/v2 v2.4.0 // indirect github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/antchfx/htmlquery v1.2.4 // indirect github.com/antchfx/xpath v1.2.0 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/beorn7/perks v1.0.1 // indirect + github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/dave/jennifer v1.4.1 // indirect + github.com/dave/jennifer v1.7.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect @@ -92,6 +94,7 @@ require ( github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect + github.com/xhit/go-str2duration/v2 v2.1.0 // indirect github.com/yuin/goldmark v1.4.13 // indirect github.com/zclconf/go-cty v1.14.1 // indirect github.com/zclconf/go-cty-yaml v1.0.3 // indirect @@ -99,10 +102,10 @@ require ( go.uber.org/zap v1.26.0 // indirect golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.20.0 // indirect + golang.org/x/net v0.23.0 // indirect golang.org/x/oauth2 v0.15.0 // indirect - golang.org/x/sys v0.16.0 // indirect - golang.org/x/term v0.16.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.17.0 // indirect diff --git a/go.sum b/go.sum index 818fac6..bb57cdf 100644 --- a/go.sum +++ b/go.sum @@ -3,6 +3,8 @@ dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= +github.com/alecthomas/kingpin/v2 v2.4.0 h1:f48lwail6p8zpO1bC4TxtqACaGqHYA22qkHjHpqDjYY= +github.com/alecthomas/kingpin/v2 v2.4.0/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= github.com/alecthomas/kong v0.2.16/go.mod h1:kQOmtJgV+Lb4aj+I2LEn40cbtawdWJ9Y8QLq+lElKxE= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -20,19 +22,22 @@ github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= +github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/crossplane/crossplane-runtime v1.15.1 h1:g1h75tNYOQT152IUNxs8ZgSsRFQKrZN9z69KefMujXs= -github.com/crossplane/crossplane-runtime v1.15.1/go.mod h1:kRcJjJQmBFrR2n/KhwL8wYS7xNfq3D8eK4JliEScOHI= -github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79 h1:HigXs5tEQxWz0fcj8hzbU2UAZgEM7wPe0XRFOsrtF8Y= -github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79/go.mod h1:+e4OaFlOcmr0JvINHl/yvEYBrZawzTgj6pQumOH1SS0= -github.com/crossplane/upjet v1.2.3 h1:Vd/PgpBxBZiwsyOi1tAw3hz6UDgO1p7Q815rh0PjEsk= -github.com/crossplane/upjet v1.2.3/go.mod h1:0bHLtnejZ9bDeyXuBb9MSOQLvKo3+aoTeUBO8N0dGSA= -github.com/dave/jennifer v1.4.1 h1:XyqG6cn5RQsTj3qlWQTKlRGAyrTcsk1kUmWdZBzRjDw= -github.com/dave/jennifer v1.4.1/go.mod h1:7jEdnm+qBcxl8PC0zyp7vxcpSRnzXSt9r39tpTVGlwA= +github.com/crossplane/crossplane-runtime v1.16.0 h1:lz+l0wEB3qowdTmN7t0PZkfuNSvfOoEhQrEYFbYqMow= +github.com/crossplane/crossplane-runtime v1.16.0/go.mod h1:Pz2tdGVMF6KDGzHZOkvKro0nKc8EzK0sb/nSA7pH4Dc= +github.com/crossplane/crossplane-tools v0.0.0-20240522174801-1ad3d4c87f21 h1:8wb7/zCbVPkeX68WbVESWJmSWQE5SZKzz0g9X4FlXRw= +github.com/crossplane/crossplane-tools v0.0.0-20240522174801-1ad3d4c87f21/go.mod h1:cN0Y7PFGQMM8mcagXVCbeQoKtipmFWQTPZYyziCPBUI= +github.com/crossplane/upjet v1.4.0 h1:twKCU8omU7VAA7E5fpbQkqDHjVnoTb8EXqmB805Q37o= +github.com/crossplane/upjet v1.4.0/go.mod h1:3pDVtCgyBc5f2Zx4K5HEPxxhjndmOc5CHCJNpIivK/g= +github.com/dave/jennifer v1.7.0 h1:uRbSBH9UTS64yXbh4FrMHfgfY762RD+C7bUPKODpSJE= +github.com/dave/jennifer v1.7.0/go.mod h1:nXbxhEmQfOZhWml3D1cDK5M1FLnMSozpbFN/m3RmGZc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -61,6 +66,7 @@ github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M= github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= @@ -93,6 +99,7 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20240117000934-35fc243c5815 h1:WzfWbQz/Ze8v6l++GGbGNFZnUShVpP/0xffCPLL+ax8= +github.com/google/pprof v0.0.0-20240117000934-35fc243c5815/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= @@ -133,6 +140,7 @@ github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+h github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -142,6 +150,7 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -185,11 +194,15 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m github.com/muvaf/typewriter v0.0.0-20220131201631-921e94e8e8d7 h1:CxRHKnh1YJXgNKxcos9rrKL6AcmOl1AS/fygmxFDzh4= github.com/muvaf/typewriter v0.0.0-20220131201631-921e94e8e8d7/go.mod h1:SAAdeMEiFXR8LcHffvIdiLI1w243DCH2DuHq7UrA5YQ= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.14.0 h1:vSmGj2Z5YPb9JwCWT6z6ihcUvDhuXLc3sJiqd3jMKAY= +github.com/onsi/ginkgo/v2 v2.14.0/go.mod h1:JkUdW7JkN0V6rFvsHcJ478egV3XH9NxpD27Hal/PhZw= github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= +github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -204,6 +217,7 @@ github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGy github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= @@ -226,6 +240,7 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tmccombs/hcl2json v0.3.3 h1:+DLNYqpWE0CsOQiEZu+OZm5ZBImake3wtITYxQ8uLFQ= github.com/tmccombs/hcl2json v0.3.3/go.mod h1:Y2chtz2x9bAeRTvSibVRVgbLJhLJXKlUeIvjeVdnm4w= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= @@ -237,6 +252,8 @@ github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc= +github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= @@ -251,6 +268,7 @@ github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRK github.com/zclconf/go-cty-yaml v1.0.3 h1:og/eOQ7lvA/WWhHGFETVWNduJM7Rjsv2RRpx1sdFMLc= github.com/zclconf/go-cty-yaml v1.0.3/go.mod h1:9YLUH4g7lOhVWqUbctnVlZ5KLpg7JAprQNgxSZ1Gyxs= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= @@ -279,8 +297,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -290,6 +308,7 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -309,12 +328,12 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= -golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -361,6 +380,7 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= diff --git a/internal/controller/addon/addon/zz_controller.go b/internal/controller/addon/addon/zz_controller.go index c3abc24..27be9b8 100755 --- a/internal/controller/addon/addon/zz_controller.go +++ b/internal/controller/addon/addon/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.Addon // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.AddonList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.AddonList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Addon_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/business/service/zz_controller.go b/internal/controller/business/service/zz_controller.go index 22c4006..94d4ac8 100755 --- a/internal/controller/business/service/zz_controller.go +++ b/internal/controller/business/service/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.Service // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.ServiceList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.ServiceList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Service_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/business/servicesubscriber/zz_controller.go b/internal/controller/business/servicesubscriber/zz_controller.go index 275bee5..55944d5 100755 --- a/internal/controller/business/servicesubscriber/zz_controller.go +++ b/internal/controller/business/servicesubscriber/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.ServiceSubscriber // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.ServiceSubscriberList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.ServiceSubscriberList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ServiceSubscriber_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/escalation/policy/zz_controller.go b/internal/controller/escalation/policy/zz_controller.go index f2a5183..360cbe8 100755 --- a/internal/controller/escalation/policy/zz_controller.go +++ b/internal/controller/escalation/policy/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.Policy // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.PolicyList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.PolicyList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Policy_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/event/orchestration/zz_controller.go b/internal/controller/event/orchestration/zz_controller.go index b335d77..f59546c 100755 --- a/internal/controller/event/orchestration/zz_controller.go +++ b/internal/controller/event/orchestration/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.Orchestration // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.OrchestrationList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.OrchestrationList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Orchestration_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/event/orchestrationrouter/zz_controller.go b/internal/controller/event/orchestrationrouter/zz_controller.go index 3e04d17..7e52ccf 100755 --- a/internal/controller/event/orchestrationrouter/zz_controller.go +++ b/internal/controller/event/orchestrationrouter/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.OrchestrationRouter // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.OrchestrationRouterList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.OrchestrationRouterList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.OrchestrationRouter_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/event/orchestrationservice/zz_controller.go b/internal/controller/event/orchestrationservice/zz_controller.go index 0227aec..a4c5d7e 100755 --- a/internal/controller/event/orchestrationservice/zz_controller.go +++ b/internal/controller/event/orchestrationservice/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.OrchestrationService // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.OrchestrationServiceList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.OrchestrationServiceList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.OrchestrationService_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/event/orchestrationunrouted/zz_controller.go b/internal/controller/event/orchestrationunrouted/zz_controller.go index ac3e38c..80b74f3 100755 --- a/internal/controller/event/orchestrationunrouted/zz_controller.go +++ b/internal/controller/event/orchestrationunrouted/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.OrchestrationUnrouted // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.OrchestrationUnroutedList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.OrchestrationUnroutedList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.OrchestrationUnrouted_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/extensions/extension/zz_controller.go b/internal/controller/extensions/extension/zz_controller.go index 9149970..ba789e4 100755 --- a/internal/controller/extensions/extension/zz_controller.go +++ b/internal/controller/extensions/extension/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.Extension // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.ExtensionList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.ExtensionList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Extension_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/extensions/servicenow/zz_controller.go b/internal/controller/extensions/servicenow/zz_controller.go index 8bfad97..a0e2dc7 100755 --- a/internal/controller/extensions/servicenow/zz_controller.go +++ b/internal/controller/extensions/servicenow/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.Servicenow // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.ServicenowList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.ServicenowList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Servicenow_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/maintenance/window/zz_controller.go b/internal/controller/maintenance/window/zz_controller.go index 9d2dd6f..736fa5b 100755 --- a/internal/controller/maintenance/window/zz_controller.go +++ b/internal/controller/maintenance/window/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.Window // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.WindowList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.WindowList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Window_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/response/play/zz_controller.go b/internal/controller/response/play/zz_controller.go index 2287787..75d1d28 100755 --- a/internal/controller/response/play/zz_controller.go +++ b/internal/controller/response/play/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.Play // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.PlayList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.PlayList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Play_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/ruleset/rule/zz_controller.go b/internal/controller/ruleset/rule/zz_controller.go index fdcdcc2..275af9f 100755 --- a/internal/controller/ruleset/rule/zz_controller.go +++ b/internal/controller/ruleset/rule/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.Rule // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.RuleList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.RuleList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Rule_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/ruleset/ruleset/zz_controller.go b/internal/controller/ruleset/ruleset/zz_controller.go index 373324f..c9ae386 100755 --- a/internal/controller/ruleset/ruleset/zz_controller.go +++ b/internal/controller/ruleset/ruleset/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.Ruleset // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.RulesetList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.RulesetList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Ruleset_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/schedule/schedule/zz_controller.go b/internal/controller/schedule/schedule/zz_controller.go index 8825dc2..0f9da9c 100755 --- a/internal/controller/schedule/schedule/zz_controller.go +++ b/internal/controller/schedule/schedule/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.Schedule // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.ScheduleList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.ScheduleList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Schedule_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/service/dependency/zz_controller.go b/internal/controller/service/dependency/zz_controller.go index 0f76ce3..aee1d13 100755 --- a/internal/controller/service/dependency/zz_controller.go +++ b/internal/controller/service/dependency/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.Dependency // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.DependencyList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.DependencyList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Dependency_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/service/eventrule/zz_controller.go b/internal/controller/service/eventrule/zz_controller.go index f93000b..ea3aa3c 100755 --- a/internal/controller/service/eventrule/zz_controller.go +++ b/internal/controller/service/eventrule/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.EventRule // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.EventRuleList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.EventRuleList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.EventRule_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/service/integration/zz_controller.go b/internal/controller/service/integration/zz_controller.go index 630fbce..c2ef218 100755 --- a/internal/controller/service/integration/zz_controller.go +++ b/internal/controller/service/integration/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.Integration // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.IntegrationList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.IntegrationList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Integration_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/service/service/zz_controller.go b/internal/controller/service/service/zz_controller.go index 1cae714..e04eb72 100755 --- a/internal/controller/service/service/zz_controller.go +++ b/internal/controller/service/service/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.Service // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.ServiceList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.ServiceList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Service_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/slack/connection/zz_controller.go b/internal/controller/slack/connection/zz_controller.go index 41e2444..8a71db4 100755 --- a/internal/controller/slack/connection/zz_controller.go +++ b/internal/controller/slack/connection/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.Connection // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.ConnectionList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.ConnectionList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Connection_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/tag/assignment/zz_controller.go b/internal/controller/tag/assignment/zz_controller.go index d047a0a..f34848b 100755 --- a/internal/controller/tag/assignment/zz_controller.go +++ b/internal/controller/tag/assignment/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.Assignment // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.AssignmentList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.AssignmentList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Assignment_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/tag/tag/zz_controller.go b/internal/controller/tag/tag/zz_controller.go index 256cbb9..c2dc339 100755 --- a/internal/controller/tag/tag/zz_controller.go +++ b/internal/controller/tag/tag/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.Tag // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.TagList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.TagList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Tag_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/team/membership/zz_controller.go b/internal/controller/team/membership/zz_controller.go index f0fc9fd..e1d8561 100755 --- a/internal/controller/team/membership/zz_controller.go +++ b/internal/controller/team/membership/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.Membership // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.MembershipList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.MembershipList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Membership_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/team/team/zz_controller.go b/internal/controller/team/team/zz_controller.go index 748bca6..3bb2577 100755 --- a/internal/controller/team/team/zz_controller.go +++ b/internal/controller/team/team/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.Team // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.TeamList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.TeamList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Team_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/user/contactmethod/zz_controller.go b/internal/controller/user/contactmethod/zz_controller.go index 12f1c6b..702f3b5 100755 --- a/internal/controller/user/contactmethod/zz_controller.go +++ b/internal/controller/user/contactmethod/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.ContactMethod // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.ContactMethodList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.ContactMethodList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ContactMethod_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/user/notificationrule/zz_controller.go b/internal/controller/user/notificationrule/zz_controller.go index 846b9aa..c2a146c 100755 --- a/internal/controller/user/notificationrule/zz_controller.go +++ b/internal/controller/user/notificationrule/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.NotificationRule // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.NotificationRuleList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.NotificationRuleList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.NotificationRule_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/user/user/zz_controller.go b/internal/controller/user/user/zz_controller.go index 3a5e371..9c94742 100755 --- a/internal/controller/user/user/zz_controller.go +++ b/internal/controller/user/user/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.User // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.UserList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.UserList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.User_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/webhook/subscription/zz_controller.go b/internal/controller/webhook/subscription/zz_controller.go index fee2e76..373c463 100755 --- a/internal/controller/webhook/subscription/zz_controller.go +++ b/internal/controller/webhook/subscription/zz_controller.go @@ -14,6 +14,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" @@ -52,6 +53,9 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } // register webhooks for the kind v1alpha1.Subscription // if they're enabled. @@ -63,6 +67,15 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { } } + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.SubscriptionList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.SubscriptionList") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Subscription_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/zz_setup.go b/internal/controller/zz_setup.go index 4174cdb..6f78372 100755 --- a/internal/controller/zz_setup.go +++ b/internal/controller/zz_setup.go @@ -1,3 +1,7 @@ +/* +Copyright 2022 Upbound Inc. +*/ + package controller import ( diff --git a/package/crds/addon.pagerduty.crossplane.io_addons.yaml b/package/crds/addon.pagerduty.crossplane.io_addons.yaml index 1dc2ec6..2d2e99c 100644 --- a/package/crds/addon.pagerduty.crossplane.io_addons.yaml +++ b/package/crds/addon.pagerduty.crossplane.io_addons.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -310,6 +310,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -333,6 +340,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/business.pagerduty.crossplane.io_services.yaml b/package/crds/business.pagerduty.crossplane.io_services.yaml index 472f781..9ac75e4 100644 --- a/package/crds/business.pagerduty.crossplane.io_services.yaml +++ b/package/crds/business.pagerduty.crossplane.io_services.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -487,6 +487,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -510,6 +517,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/business.pagerduty.crossplane.io_servicesubscribers.yaml b/package/crds/business.pagerduty.crossplane.io_servicesubscribers.yaml index ba80fb5..57eb086 100644 --- a/package/crds/business.pagerduty.crossplane.io_servicesubscribers.yaml +++ b/package/crds/business.pagerduty.crossplane.io_servicesubscribers.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -467,6 +467,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -490,6 +497,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/escalation.pagerduty.crossplane.io_policies.yaml b/package/crds/escalation.pagerduty.crossplane.io_policies.yaml index 057f1f1..20df942 100644 --- a/package/crds/escalation.pagerduty.crossplane.io_policies.yaml +++ b/package/crds/escalation.pagerduty.crossplane.io_policies.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -593,6 +593,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -616,6 +623,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/event.pagerduty.crossplane.io_orchestrationrouters.yaml b/package/crds/event.pagerduty.crossplane.io_orchestrationrouters.yaml index 7a858be..ab55c8a 100644 --- a/package/crds/event.pagerduty.crossplane.io_orchestrationrouters.yaml +++ b/package/crds/event.pagerduty.crossplane.io_orchestrationrouters.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -661,6 +661,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -684,6 +691,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/event.pagerduty.crossplane.io_orchestrations.yaml b/package/crds/event.pagerduty.crossplane.io_orchestrations.yaml index 2aff3a5..3a38390 100644 --- a/package/crds/event.pagerduty.crossplane.io_orchestrations.yaml +++ b/package/crds/event.pagerduty.crossplane.io_orchestrations.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -498,6 +498,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -521,6 +528,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/event.pagerduty.crossplane.io_orchestrationservices.yaml b/package/crds/event.pagerduty.crossplane.io_orchestrationservices.yaml index ec79f2d..6cd80b8 100644 --- a/package/crds/event.pagerduty.crossplane.io_orchestrationservices.yaml +++ b/package/crds/event.pagerduty.crossplane.io_orchestrationservices.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -1746,6 +1746,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -1769,6 +1776,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/event.pagerduty.crossplane.io_orchestrationunrouteds.yaml b/package/crds/event.pagerduty.crossplane.io_orchestrationunrouteds.yaml index 05579b3..a76a372 100644 --- a/package/crds/event.pagerduty.crossplane.io_orchestrationunrouteds.yaml +++ b/package/crds/event.pagerduty.crossplane.io_orchestrationunrouteds.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -1110,6 +1110,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -1133,6 +1140,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/extensions.pagerduty.crossplane.io_extensions.yaml b/package/crds/extensions.pagerduty.crossplane.io_extensions.yaml index 91b8d79..a2b10b9 100644 --- a/package/crds/extensions.pagerduty.crossplane.io_extensions.yaml +++ b/package/crds/extensions.pagerduty.crossplane.io_extensions.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -207,6 +207,25 @@ spec: description: The configuration of the service extension as string containing plain JSON-encoded data. type: string + endpointUrlSecretRef: + description: |- + The url of the extension. + Note: The endpoint URL is Optional API wise in most cases. But in some cases it is a Required parameter. For example, pagerduty_extension_schema named Generic V2 Webhook doesn't accept pagerduty_extension with no endpoint_url, but one with named Slack accepts. + properties: + key: + description: The key to select. + type: string + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - key + - name + - namespace + type: object extensionObjects: description: This is the objects for which the extension applies (An array of service ids). @@ -528,6 +547,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -551,6 +577,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/extensions.pagerduty.crossplane.io_servicenows.yaml b/package/crds/extensions.pagerduty.crossplane.io_servicenows.yaml index 7642b3c..6b80bf9 100644 --- a/package/crds/extensions.pagerduty.crossplane.io_servicenows.yaml +++ b/package/crds/extensions.pagerduty.crossplane.io_servicenows.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -159,6 +159,24 @@ spec: for example because of an external controller is managing them, like an autoscaler. properties: + endpointUrlSecretRef: + description: A SecretKeySelector is a reference to a secret key + in an arbitrary namespace. + properties: + key: + description: The key to select. + type: string + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - key + - name + - namespace + type: object extensionObjects: description: This is the objects for which the extension applies (An array of service ids). @@ -175,6 +193,23 @@ spec: referer: description: The ServiceNow referer. type: string + snowPasswordSecretRef: + description: The ServiceNow password. + properties: + key: + description: The key to select. + type: string + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - key + - name + - namespace + type: object snowUser: description: The ServiceNow username. type: string @@ -196,6 +231,8 @@ spec: type: string type: type: string + required: + - snowPasswordSecretRef type: object managementPolicies: default: @@ -462,6 +499,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -485,6 +529,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/maintenance.pagerduty.crossplane.io_windows.yaml b/package/crds/maintenance.pagerduty.crossplane.io_windows.yaml index f762dea..8681773 100644 --- a/package/crds/maintenance.pagerduty.crossplane.io_windows.yaml +++ b/package/crds/maintenance.pagerduty.crossplane.io_windows.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -505,6 +505,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -528,6 +535,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/pagerduty.crossplane.io_providerconfigs.yaml b/package/crds/pagerduty.crossplane.io_providerconfigs.yaml index b038720..e950699 100644 --- a/package/crds/pagerduty.crossplane.io_providerconfigs.yaml +++ b/package/crds/pagerduty.crossplane.io_providerconfigs.yaml @@ -129,6 +129,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. diff --git a/package/crds/pagerduty.crossplane.io_storeconfigs.yaml b/package/crds/pagerduty.crossplane.io_storeconfigs.yaml index a0a997d..b0669ff 100644 --- a/package/crds/pagerduty.crossplane.io_storeconfigs.yaml +++ b/package/crds/pagerduty.crossplane.io_storeconfigs.yaml @@ -183,6 +183,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. diff --git a/package/crds/response.pagerduty.crossplane.io_plays.yaml b/package/crds/response.pagerduty.crossplane.io_plays.yaml index a9180e8..50f2ae5 100644 --- a/package/crds/response.pagerduty.crossplane.io_plays.yaml +++ b/package/crds/response.pagerduty.crossplane.io_plays.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -594,6 +594,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -617,6 +624,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/ruleset.pagerduty.crossplane.io_rules.yaml b/package/crds/ruleset.pagerduty.crossplane.io_rules.yaml index 298af5e..82a46ec 100644 --- a/package/crds/ruleset.pagerduty.crossplane.io_rules.yaml +++ b/package/crds/ruleset.pagerduty.crossplane.io_rules.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -1274,6 +1274,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -1297,6 +1304,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/ruleset.pagerduty.crossplane.io_rulesets.yaml b/package/crds/ruleset.pagerduty.crossplane.io_rulesets.yaml index 325c175..9e76006 100644 --- a/package/crds/ruleset.pagerduty.crossplane.io_rulesets.yaml +++ b/package/crds/ruleset.pagerduty.crossplane.io_rulesets.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -480,6 +480,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -503,6 +510,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/schedule.pagerduty.crossplane.io_schedules.yaml b/package/crds/schedule.pagerduty.crossplane.io_schedules.yaml index f64eb7d..0604efd 100644 --- a/package/crds/schedule.pagerduty.crossplane.io_schedules.yaml +++ b/package/crds/schedule.pagerduty.crossplane.io_schedules.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -827,6 +827,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -850,6 +857,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/service.pagerduty.crossplane.io_dependencies.yaml b/package/crds/service.pagerduty.crossplane.io_dependencies.yaml index 991e2cc..c24d817 100644 --- a/package/crds/service.pagerduty.crossplane.io_dependencies.yaml +++ b/package/crds/service.pagerduty.crossplane.io_dependencies.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -405,6 +405,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -428,6 +435,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/service.pagerduty.crossplane.io_eventrules.yaml b/package/crds/service.pagerduty.crossplane.io_eventrules.yaml index bcbf170..f51dcbc 100644 --- a/package/crds/service.pagerduty.crossplane.io_eventrules.yaml +++ b/package/crds/service.pagerduty.crossplane.io_eventrules.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -1187,6 +1187,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -1210,6 +1217,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/service.pagerduty.crossplane.io_integrations.yaml b/package/crds/service.pagerduty.crossplane.io_integrations.yaml index c7aa8f8..d30e600 100644 --- a/package/crds/service.pagerduty.crossplane.io_integrations.yaml +++ b/package/crds/service.pagerduty.crossplane.io_integrations.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -966,6 +966,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -989,6 +996,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/service.pagerduty.crossplane.io_services.yaml b/package/crds/service.pagerduty.crossplane.io_services.yaml index af5fb09..e5cb607 100644 --- a/package/crds/service.pagerduty.crossplane.io_services.yaml +++ b/package/crds/service.pagerduty.crossplane.io_services.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -1116,6 +1116,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -1139,6 +1146,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/slack.pagerduty.crossplane.io_connections.yaml b/package/crds/slack.pagerduty.crossplane.io_connections.yaml index ea14f70..1f171da 100644 --- a/package/crds/slack.pagerduty.crossplane.io_connections.yaml +++ b/package/crds/slack.pagerduty.crossplane.io_connections.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -443,6 +443,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -466,6 +473,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/tag.pagerduty.crossplane.io_assignments.yaml b/package/crds/tag.pagerduty.crossplane.io_assignments.yaml index 9634452..4598734 100644 --- a/package/crds/tag.pagerduty.crossplane.io_assignments.yaml +++ b/package/crds/tag.pagerduty.crossplane.io_assignments.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -323,6 +323,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -346,6 +353,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/tag.pagerduty.crossplane.io_tags.yaml b/package/crds/tag.pagerduty.crossplane.io_tags.yaml index 35044db..3cb769d 100644 --- a/package/crds/tag.pagerduty.crossplane.io_tags.yaml +++ b/package/crds/tag.pagerduty.crossplane.io_tags.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -305,6 +305,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -328,6 +335,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/team.pagerduty.crossplane.io_memberships.yaml b/package/crds/team.pagerduty.crossplane.io_memberships.yaml index 7ed0b3e..f8f0f76 100644 --- a/package/crds/team.pagerduty.crossplane.io_memberships.yaml +++ b/package/crds/team.pagerduty.crossplane.io_memberships.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -608,6 +608,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -631,6 +638,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/team.pagerduty.crossplane.io_teams.yaml b/package/crds/team.pagerduty.crossplane.io_teams.yaml index 1b5d4b2..1442ce8 100644 --- a/package/crds/team.pagerduty.crossplane.io_teams.yaml +++ b/package/crds/team.pagerduty.crossplane.io_teams.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -337,6 +337,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -360,6 +367,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/user.pagerduty.crossplane.io_contactmethods.yaml b/package/crds/user.pagerduty.crossplane.io_contactmethods.yaml index 77b568c..828d4c2 100644 --- a/package/crds/user.pagerduty.crossplane.io_contactmethods.yaml +++ b/package/crds/user.pagerduty.crossplane.io_contactmethods.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -514,6 +514,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -537,6 +544,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/user.pagerduty.crossplane.io_notificationrules.yaml b/package/crds/user.pagerduty.crossplane.io_notificationrules.yaml index ba8bb8f..dd60e16 100644 --- a/package/crds/user.pagerduty.crossplane.io_notificationrules.yaml +++ b/package/crds/user.pagerduty.crossplane.io_notificationrules.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -495,6 +495,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -518,6 +525,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/user.pagerduty.crossplane.io_users.yaml b/package/crds/user.pagerduty.crossplane.io_users.yaml index d97a712..7185369 100644 --- a/package/crds/user.pagerduty.crossplane.io_users.yaml +++ b/package/crds/user.pagerduty.crossplane.io_users.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -417,6 +417,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -440,6 +447,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec diff --git a/package/crds/webhook.pagerduty.crossplane.io_subscriptions.yaml b/package/crds/webhook.pagerduty.crossplane.io_subscriptions.yaml index a71c307..6c81331 100644 --- a/package/crds/webhook.pagerduty.crossplane.io_subscriptions.yaml +++ b/package/crds/webhook.pagerduty.crossplane.io_subscriptions.yaml @@ -19,12 +19,12 @@ spec: scope: Cluster versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string @@ -495,6 +495,13 @@ spec: A Message containing details about this condition's last transition from one status to another, if any. type: string + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer reason: description: A Reason for this condition's last transition from one status to another. @@ -518,6 +525,13 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer type: object required: - spec