diff --git a/docs/configuration.md b/docs/configuration.md index 04e0563..4e7a4ed 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -10,7 +10,7 @@ kind: Provider metadata: name: provider-huaweicloud spec: - package: xpkg.upbound.io/hcs/provider-huaweicloud:v0.0.8 + package: xpkg.upbound.io/hcs/provider-huaweicloud:v0.0.9 ``` Define the provider version with `spec.package`. @@ -22,7 +22,7 @@ Verify the configuration with `kubectl get providers`. ```shell $ kubectl get providers NAME INSTALLED HEALTHY PACKAGE AGE -provider-huaweicloud True True xpkg.upbound.io/hcs/provider-huaweicloud:v0.0.8 54s +provider-huaweicloud True True xpkg.upbound.io/hcs/provider-huaweicloud:v0.0.9 54s ``` View the Crossplane [Provider CRD definition](https://doc.crds.dev/github.com/huaweicloud/provider-huaweicloud) to view all available `Provider` options. diff --git a/examples/ces/alarmrule.yaml b/examples/ces/alarmrule.yaml new file mode 100644 index 0000000..09706f4 --- /dev/null +++ b/examples/ces/alarmrule.yaml @@ -0,0 +1,46 @@ +apiVersion: ces.huaweicloud.crossplane.io/v1alpha1 +kind: Alarmrule +metadata: + annotations: + meta.upbound.io/example-id: ces/v1alpha1/alarmrule + labels: + testing.upbound.io/example-name: test + name: test +spec: + forProvider: + alarmActionEnabled: true + alarmActions: + - notificationList: + - the_topic_urn + type: notification + alarmEnabled: true + alarmName: rule-test + alarmType: MULTI_INSTANCE + condition: + - alarmLevel: 4 + comparisonOperator: '>' + count: 1 + filter: average + metricName: network_outgoing_bytes_rate_inband + period: 1200 + suppressDuration: 300 + unit: B/s + value: 6.5 + - alarmLevel: 4 + comparisonOperator: '>=' + count: 1 + filter: average + metricName: network_outgoing_bytes_rate_inband + period: 3600 + suppressDuration: 300 + unit: B/s + value: 20 + metric: + - namespace: SYS.ECS + resources: + - dimensions: + - name: instance_id + value: the_instance_id_1 + - dimensions: + - name: instance_id + value: the_instance_id_2 diff --git a/examples/ces/alarmtemplate.yaml b/examples/ces/alarmtemplate.yaml new file mode 100644 index 0000000..62efd92 --- /dev/null +++ b/examples/ces/alarmtemplate.yaml @@ -0,0 +1,23 @@ +apiVersion: ces.huaweicloud.crossplane.io/v1alpha1 +kind: AlarmTemplate +metadata: + annotations: + meta.upbound.io/example-id: ces/v1alpha1/alarmtemplate + labels: + testing.upbound.io/example-name: test + name: test +spec: + forProvider: + name: the_name + policies: + - alarmLevel: 2 + comparisonOperator: '>=' + count: 3 + dimensionName: api_id + filter: average + metricName: req_count_2xx + namespace: SYS.APIG + period: 1 + suppressDuration: 43200 + unit: times/minute + value: "10" diff --git a/examples/ces/dashboard.yaml b/examples/ces/dashboard.yaml new file mode 100644 index 0000000..7037dcd --- /dev/null +++ b/examples/ces/dashboard.yaml @@ -0,0 +1,12 @@ +apiVersion: ces.huaweicloud.crossplane.io/v1alpha1 +kind: Dashboard +metadata: + annotations: + meta.upbound.io/example-id: ces/v1alpha1/dashboard + labels: + testing.upbound.io/example-name: test + name: test +spec: + forProvider: + name: the_name + rowWidgetNum: the_row_widget_num diff --git a/examples/ces/dashboardwidget.yaml b/examples/ces/dashboardwidget.yaml new file mode 100644 index 0000000..1b28e47 --- /dev/null +++ b/examples/ces/dashboardwidget.yaml @@ -0,0 +1,29 @@ +apiVersion: ces.huaweicloud.crossplane.io/v1alpha1 +kind: DashboardWidget +metadata: + annotations: + meta.upbound.io/example-id: ces/v1alpha1/dashboardwidget + labels: + testing.upbound.io/example-name: test + name: test +spec: + forProvider: + dashboardIdSelector: + matchLabels: + testing.upbound.io/example-name: example + location: + - height: the_height + left: the_left + top: the_top + width: the_width + metricDisplayMode: single + metrics: + - dimensions: + - filterType: specific_instances + name: instance_id + values: + - the_instance_id + metricName: cpu_util + namespace: SYS.ECS + title: the_title + view: line diff --git a/examples/ces/eventreport.yaml b/examples/ces/eventreport.yaml new file mode 100644 index 0000000..3164d0f --- /dev/null +++ b/examples/ces/eventreport.yaml @@ -0,0 +1,20 @@ +apiVersion: ces.huaweicloud.crossplane.io/v1alpha1 +kind: EventReport +metadata: + annotations: + meta.upbound.io/example-id: ces/v1alpha1/eventreport + labels: + testing.upbound.io/example-name: test + name: test +spec: + forProvider: + detail: + - content: the_content + level: Major + resourceId: the_resource_id + resourceName: the_resource_name + state: normal + user: the_user + name: the_name + source: the_source + time: the_time diff --git a/examples/ces/oneclickalarm.yaml b/examples/ces/oneclickalarm.yaml new file mode 100644 index 0000000..235b5bd --- /dev/null +++ b/examples/ces/oneclickalarm.yaml @@ -0,0 +1,26 @@ +apiVersion: ces.huaweicloud.crossplane.io/v1alpha1 +kind: OneClickAlarm +metadata: + annotations: + meta.upbound.io/example-id: ces/v1alpha1/oneclickalarm + labels: + testing.upbound.io/example-name: test + name: test +spec: + forProvider: + alarmNotifications: + - notificationList: + - the_notification_object + type: notification + dimensionNames: + - event: true + metric: + - bucket_name + notificationBeginTime: "00:00" + notificationEnabled: true + notificationEndTime: "23:59" + okNotifications: + - notificationList: + - the_notification_object + type: notification + oneClickAlarmId: OBSSystemOneClickAlarm diff --git a/examples/ces/resourcegroup.yaml b/examples/ces/resourcegroup.yaml new file mode 100644 index 0000000..90cebf4 --- /dev/null +++ b/examples/ces/resourcegroup.yaml @@ -0,0 +1,41 @@ +apiVersion: ces.huaweicloud.crossplane.io/v1alpha1 +kind: ResourceGroup +metadata: + annotations: + meta.upbound.io/example-id: ces/v1alpha1/resourcegroup + labels: + testing.upbound.io/example-name: test + name: test +spec: + forProvider: + name: test + resources: + - dimensions: + - name: instance_id + value: vm_1_id + namespace: SYS.ECS + - dimensions: + - name: disk_name + value: vm_1_id-sda + namespace: SYS.EVS + +--- + +apiVersion: ecs.huaweicloud.crossplane.io/v1alpha1 +kind: Instance +metadata: + annotations: + meta.upbound.io/example-id: ces/v1alpha1/resourcegroup + labels: + testing.upbound.io/example-name: vm_1 + name: vm-1 +spec: + forProvider: + availabilityZone: the_availability_zone + flavorId: the_flavor_id + imageId: the_image_id + name: ecs-test + network: + - uuid: the_subnet_id + securityGroupIds: + - the_security_group_id diff --git a/examples/install.yaml b/examples/install.yaml index 91c8b34..81a675a 100644 --- a/examples/install.yaml +++ b/examples/install.yaml @@ -3,7 +3,7 @@ kind: Provider metadata: name: provider-huaweicloud spec: - package: xpkg.upbound.io/hcs/provider-huaweicloud:v0.0.8 + package: xpkg.upbound.io/hcs/provider-huaweicloud:v0.0.9 controllerConfigRef: name: debug-config