diff --git a/operators/ack-cloudwatch-controller/0.0.3/bundle.Dockerfile b/operators/ack-cloudwatch-controller/0.0.3/bundle.Dockerfile new file mode 100644 index 00000000000..0d037e713af --- /dev/null +++ b/operators/ack-cloudwatch-controller/0.0.3/bundle.Dockerfile @@ -0,0 +1,21 @@ +FROM scratch + +# Core bundle labels. +LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 +LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ +LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ +LABEL operators.operatorframework.io.bundle.package.v1=ack-cloudwatch-controller +LABEL operators.operatorframework.io.bundle.channels.v1=alpha +LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha +LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.28.0 +LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 +LABEL operators.operatorframework.io.metrics.project_layout=unknown + +# Labels for testing. +LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 +LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ + +# Copy files to locations specified by labels. +COPY bundle/manifests /manifests/ +COPY bundle/metadata /metadata/ +COPY bundle/tests/scorecard /tests/scorecard/ diff --git a/operators/ack-cloudwatch-controller/0.0.3/manifests/ack-cloudwatch-controller.clusterserviceversion.yaml b/operators/ack-cloudwatch-controller/0.0.3/manifests/ack-cloudwatch-controller.clusterserviceversion.yaml new file mode 100644 index 00000000000..571e4833195 --- /dev/null +++ b/operators/ack-cloudwatch-controller/0.0.3/manifests/ack-cloudwatch-controller.clusterserviceversion.yaml @@ -0,0 +1,255 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + annotations: + alm-examples: '[]' + capabilities: Basic Install + categories: Cloud Provider + certified: "false" + containerImage: public.ecr.aws/aws-controllers-k8s/cloudwatch-controller:0.0.3 + createdAt: "2023-12-14T23:47:53Z" + description: AWS CloudWatch controller is a service controller for managing CloudWatch + resources in Kubernetes + operatorframework.io/suggested-namespace: ack-system + operators.operatorframework.io/builder: operator-sdk-v1.28.0 + operators.operatorframework.io/project_layout: unknown + repository: https://github.com/aws-controllers-k8s + support: Community + name: ack-cloudwatch-controller.v0.0.3 + namespace: placeholder +spec: + apiservicedefinitions: {} + customresourcedefinitions: + owned: + - description: MetricAlarm represents the state of an AWS cloudwatch MetricAlarm + resource. + displayName: MetricAlarm + kind: MetricAlarm + name: metricalarms.cloudwatch.services.k8s.aws + version: v1alpha1 + description: |- + Manage Amazon CloudWatch resources in AWS from within your Kubernetes cluster. + + **About Amazon CloudWatch** + + {ADD YOUR DESCRIPTION HERE} + + **About the AWS Controllers for Kubernetes** + + This controller is a component of the [AWS Controller for Kubernetes](https://github.com/aws/aws-controllers-k8s) project. This project is currently in **developer preview**. + + **Pre-Installation Steps** + + Please follow the following link: [Red Hat OpenShift](https://aws-controllers-k8s.github.io/community/docs/user-docs/openshift/) + displayName: AWS Controllers for Kubernetes - Amazon CloudWatch + icon: + - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMzA0IDE4MiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzA0IDE4MjsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiMyNTJGM0U7fQoJLnN0M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y4xLDQuMSw0LjYsOC44LDQuNiwxNGMwLDQuMy0wLjksOC4yLTIuNiwxMS42ICAgYy0xLjgsMy40LTQuMiw2LjQtNy4zLDguOGMtMy4xLDIuNS02LjgsNC4zLTExLjEsNS42QzI2NC40LDk0LjQsMjU5LjcsOTUuMSwyNTQuNiw5NS4xeiIvPgoJPGc+CgkJPHBhdGggY2xhc3M9InN0MSIgZD0iTTI3My41LDE0My43Yy0zMi45LDI0LjMtODAuNywzNy4yLTEyMS44LDM3LjJjLTU3LjYsMC0xMDkuNS0yMS4zLTE0OC43LTU2LjdjLTMuMS0yLjgtMC4zLTYuNiwzLjQtNC40ICAgIGM0Mi40LDI0LjYsOTQuNywzOS41LDE0OC44LDM5LjVjMzYuNSwwLDc2LjYtNy42LDExMy41LTIzLjJDMjc0LjIsMTMzLjYsMjc4LjksMTM5LjcsMjczLjUsMTQzLjd6Ii8+CgkJPHBhdGggY2xhc3M9InN0MSIgZD0iTTI4Ny4yLDEyOC4xYy00LjItNS40LTI3LjgtMi42LTM4LjUtMS4zYy0zLjIsMC40LTMuNy0yLjQtMC44LTQuNWMxOC44LTEzLjIsNDkuNy05LjQsNTMuMy01ICAgIGMzLjYsNC41LTEsMzUuNC0xOC42LDUwLjJjLTIuNywyLjMtNS4zLDEuMS00LjEtMS45QzI4Mi41LDE1NS43LDI5MS40LDEzMy40LDI4Ny4yLDEyOC4xeiIvPgoJPC9nPgo8L2c+Cjwvc3ZnPg== + mediatype: image/svg+xml + install: + spec: + clusterPermissions: + - rules: + - apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - patch + - watch + - apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - secrets + verbs: + - get + - list + - patch + - watch + - apiGroups: + - cloudwatch.services.k8s.aws + resources: + - metricalarms + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - cloudwatch.services.k8s.aws + resources: + - metricalarms/status + verbs: + - get + - patch + - update + - apiGroups: + - services.k8s.aws + resources: + - adoptedresources + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - services.k8s.aws + resources: + - adoptedresources/status + verbs: + - get + - patch + - update + - apiGroups: + - services.k8s.aws + resources: + - fieldexports + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - services.k8s.aws + resources: + - fieldexports/status + verbs: + - get + - patch + - update + serviceAccountName: ack-cloudwatch-controller + deployments: + - label: + app.kubernetes.io/name: ack-cloudwatch-controller + app.kubernetes.io/part-of: ack-system + name: ack-cloudwatch-controller + spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: ack-cloudwatch-controller + strategy: {} + template: + metadata: + labels: + app.kubernetes.io/name: ack-cloudwatch-controller + spec: + containers: + - args: + - --aws-region + - $(AWS_REGION) + - --aws-endpoint-url + - $(AWS_ENDPOINT_URL) + - --enable-development-logging=$(ACK_ENABLE_DEVELOPMENT_LOGGING) + - --log-level + - $(ACK_LOG_LEVEL) + - --resource-tags + - $(ACK_RESOURCE_TAGS) + - --watch-namespace + - $(ACK_WATCH_NAMESPACE) + - --enable-leader-election=$(ENABLE_LEADER_ELECTION) + - --leader-election-namespace + - $(LEADER_ELECTION_NAMESPACE) + command: + - ./bin/controller + env: + - name: ACK_SYSTEM_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + envFrom: + - configMapRef: + name: ack-cloudwatch-user-config + optional: false + - secretRef: + name: ack-cloudwatch-user-secrets + optional: true + image: public.ecr.aws/aws-controllers-k8s/cloudwatch-controller:0.0.3 + name: controller + ports: + - containerPort: 8080 + name: http + resources: + limits: + cpu: 100m + memory: 300Mi + requests: + cpu: 100m + memory: 200Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + privileged: false + runAsNonRoot: true + dnsPolicy: ClusterFirst + securityContext: + seccompProfile: + type: RuntimeDefault + serviceAccountName: ack-cloudwatch-controller + terminationGracePeriodSeconds: 10 + permissions: + - rules: + - apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - "" + resources: + - events + verbs: + - create + - patch + serviceAccountName: ack-cloudwatch-controller + strategy: deployment + installModes: + - supported: true + type: AllNamespaces + keywords: + - cloudwatch + - aws + - amazon + - ack + links: + - name: AWS Controllers for Kubernetes + url: https://github.com/aws-controllers-k8s/community + - name: Documentation + url: https://aws-controllers-k8s.github.io/community/ + - name: Amazon CloudWatch Developer Resources + url: https://aws.amazon.com/CloudWatch/developer-resources/ + maintainers: + - email: ack-maintainers@amazon.com + name: cloudwatch maintainer team + maturity: alpha + provider: + name: Amazon, Inc. + url: https://aws.amazon.com + version: 0.0.3 diff --git a/operators/ack-cloudwatch-controller/0.0.3/manifests/ack-cloudwatch-metrics-service_v1_service.yaml b/operators/ack-cloudwatch-controller/0.0.3/manifests/ack-cloudwatch-metrics-service_v1_service.yaml new file mode 100644 index 00000000000..ecef34ec26f --- /dev/null +++ b/operators/ack-cloudwatch-controller/0.0.3/manifests/ack-cloudwatch-metrics-service_v1_service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + creationTimestamp: null + name: ack-cloudwatch-metrics-service +spec: + ports: + - name: metricsport + port: 8080 + protocol: TCP + targetPort: http + selector: + app.kubernetes.io/name: ack-cloudwatch-controller + type: NodePort +status: + loadBalancer: {} diff --git a/operators/ack-cloudwatch-controller/0.0.3/manifests/ack-cloudwatch-reader_rbac.authorization.k8s.io_v1_role.yaml b/operators/ack-cloudwatch-controller/0.0.3/manifests/ack-cloudwatch-reader_rbac.authorization.k8s.io_v1_role.yaml new file mode 100644 index 00000000000..6230c1f8b93 --- /dev/null +++ b/operators/ack-cloudwatch-controller/0.0.3/manifests/ack-cloudwatch-reader_rbac.authorization.k8s.io_v1_role.yaml @@ -0,0 +1,14 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + creationTimestamp: null + name: ack-cloudwatch-reader +rules: +- apiGroups: + - cloudwatch.services.k8s.aws + resources: + - metricalarms + verbs: + - get + - list + - watch diff --git a/operators/ack-cloudwatch-controller/0.0.3/manifests/ack-cloudwatch-writer_rbac.authorization.k8s.io_v1_role.yaml b/operators/ack-cloudwatch-controller/0.0.3/manifests/ack-cloudwatch-writer_rbac.authorization.k8s.io_v1_role.yaml new file mode 100644 index 00000000000..1d026f0ad35 --- /dev/null +++ b/operators/ack-cloudwatch-controller/0.0.3/manifests/ack-cloudwatch-writer_rbac.authorization.k8s.io_v1_role.yaml @@ -0,0 +1,26 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + creationTimestamp: null + name: ack-cloudwatch-writer +rules: +- apiGroups: + - cloudwatch.services.k8s.aws + resources: + - metricalarms + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - cloudwatch.services.k8s.aws + resources: + - metricalarms + verbs: + - get + - patch + - update diff --git a/operators/ack-cloudwatch-controller/0.0.3/manifests/cloudwatch.services.k8s.aws_metricalarms.yaml b/operators/ack-cloudwatch-controller/0.0.3/manifests/cloudwatch.services.k8s.aws_metricalarms.yaml new file mode 100644 index 00000000000..8f919e471c9 --- /dev/null +++ b/operators/ack-cloudwatch-controller/0.0.3/manifests/cloudwatch.services.k8s.aws_metricalarms.yaml @@ -0,0 +1,441 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.9.2 + creationTimestamp: null + name: metricalarms.cloudwatch.services.k8s.aws +spec: + group: cloudwatch.services.k8s.aws + names: + kind: MetricAlarm + listKind: MetricAlarmList + plural: metricalarms + singular: metricalarm + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: MetricAlarm is the Schema for the MetricAlarms API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: "MetricAlarmSpec defines the desired state of MetricAlarm. + \n The details about a metric alarm." + properties: + actionsEnabled: + description: Indicates whether actions should be executed during any + changes to the alarm state. The default is TRUE. + type: boolean + alarmActions: + description: "The actions to execute when this alarm transitions to + the ALARM state from any other state. Each action is specified as + an Amazon Resource Name (ARN). Valid values: \n EC2 actions: \n + * arn:aws:automate:region:ec2:stop \n * arn:aws:automate:region:ec2:terminate + \n * arn:aws:automate:region:ec2:reboot \n * arn:aws:automate:region:ec2:recover + \n * arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 + \n * arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 + \n * arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0 + \n * arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Recover/1.0 + \n Autoscaling action: \n * arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name + \n SNS notification action: \n * arn:aws:sns:region:account-id:sns-topic-name:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name + \n SSM integration actions: \n * arn:aws:ssm:region:account-id:opsitem:severity#CATEGORY=category-name + \n * arn:aws:ssm-incidents::account-id:responseplan/response-plan-name" + items: + type: string + type: array + alarmDescription: + description: The description for the alarm. + type: string + comparisonOperator: + description: "The arithmetic operation to use when comparing the specified + statistic and threshold. The specified statistic value is used as + the first operand. \n The values LessThanLowerOrGreaterThanUpperThreshold, + LessThanLowerThreshold, and GreaterThanUpperThreshold are used only + for alarms based on anomaly detection models." + type: string + datapointsToAlarm: + description: The number of data points that must be breaching to trigger + the alarm. This is used only if you are setting an "M out of N" + alarm. In that case, this value is the M. For more information, + see Evaluating an Alarm (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarm-evaluation) + in the Amazon CloudWatch User Guide. + format: int64 + type: integer + dimensions: + description: The dimensions for the metric specified in MetricName. + items: + description: "A dimension is a name/value pair that is part of the + identity of a metric. Because dimensions are part of the unique + identifier for a metric, whenever you add a unique name/value + pair to one of your metrics, you are creating a new variation + of that metric. For example, many Amazon EC2 metrics publish InstanceId + as a dimension name, and the actual instance ID as the value for + that dimension. \n You can assign up to 30 dimensions to a metric." + properties: + name: + type: string + value: + type: string + type: object + type: array + evaluateLowSampleCountPercentile: + description: "Used only for alarms based on percentiles. If you specify + ignore, the alarm state does not change during periods with too + few data points to be statistically significant. If you specify + evaluate or omit this parameter, the alarm is always evaluated and + possibly changes state no matter how many data points are available. + For more information, see Percentile-Based CloudWatch Alarms and + Low Data Samples (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#percentiles-with-low-samples). + \n Valid Values: evaluate | ignore" + type: string + evaluationPeriods: + description: "The number of periods over which data is compared to + the specified threshold. If you are setting an alarm that requires + that a number of consecutive data points be breaching to trigger + the alarm, this value specifies that number. If you are setting + an \"M out of N\" alarm, this value is the N. \n An alarm's total + current evaluation period can be no longer than one day, so this + number multiplied by Period cannot be more than 86,400 seconds." + format: int64 + type: integer + extendedStatistic: + description: "The extended statistic for the metric specified in MetricName. + When you call PutMetricAlarm and specify a MetricName, you must + specify either Statistic or ExtendedStatistic but not both. \n If + you specify ExtendedStatistic, the following are valid values: \n + * p90 \n * tm90 \n * tc90 \n * ts90 \n * wm90 \n * IQM \n * PR(n:m) + where n and m are values of the metric \n * TC(X%:X%) where X is + between 10 and 90 inclusive. \n * TM(X%:X%) where X is between 10 + and 90 inclusive. \n * TS(X%:X%) where X is between 10 and 90 inclusive. + \n * WM(X%:X%) where X is between 10 and 90 inclusive. \n For more + information about these extended statistics, see CloudWatch statistics + definitions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html)." + type: string + insufficientDataActions: + description: "The actions to execute when this alarm transitions to + the INSUFFICIENT_DATA state from any other state. Each action is + specified as an Amazon Resource Name (ARN). Valid values: \n EC2 + actions: \n * arn:aws:automate:region:ec2:stop \n * arn:aws:automate:region:ec2:terminate + \n * arn:aws:automate:region:ec2:reboot \n * arn:aws:automate:region:ec2:recover + \n * arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 + \n * arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 + \n * arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0 + \n * arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Recover/1.0 + \n Autoscaling action: \n * arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name + \n SNS notification action: \n * arn:aws:sns:region:account-id:sns-topic-name:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name + \n SSM integration actions: \n * arn:aws:ssm:region:account-id:opsitem:severity#CATEGORY=category-name + \n * arn:aws:ssm-incidents::account-id:responseplan/response-plan-name" + items: + type: string + type: array + metricName: + description: "The name for the metric associated with the alarm. For + each PutMetricAlarm operation, you must specify either MetricName + or a Metrics array. \n If you are creating an alarm based on a math + expression, you cannot specify this parameter, or any of the Namespace, + Dimensions, Period, Unit, Statistic, or ExtendedStatistic parameters. + Instead, you specify all this information in the Metrics array." + type: string + metrics: + description: "An array of MetricDataQuery structures that enable you + to create an alarm based on the result of a metric math expression. + For each PutMetricAlarm operation, you must specify either MetricName + or a Metrics array. \n Each item in the Metrics array either retrieves + a metric or performs a math expression. \n One item in the Metrics + array is the expression that the alarm watches. You designate this + expression by setting ReturnData to true for this object in the + array. For more information, see MetricDataQuery (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDataQuery.html). + \n If you use the Metrics parameter, you cannot include the Namespace, + MetricName, Dimensions, Period, Unit, Statistic, or ExtendedStatistic + parameters of PutMetricAlarm in the same operation. Instead, you + retrieve the metrics you are using in your math expression as part + of the Metrics array." + items: + description: "This structure is used in both GetMetricData and PutMetricAlarm. + The supported use of this structure is different for those two + operations. \n When used in GetMetricData, it indicates the metric + data to return, and whether this call is just retrieving a batch + set of data for one metric, or is performing a Metrics Insights + query or a math expression. A single GetMetricData call can include + up to 500 MetricDataQuery structures. \n When used in PutMetricAlarm, + it enables you to create an alarm based on a metric math expression. + Each MetricDataQuery in the array specifies either a metric to + retrieve, or a math expression to be performed on retrieved metrics. + A single PutMetricAlarm call can include up to 20 MetricDataQuery + structures in the array. The 20 structures can include as many + as 10 structures that contain a MetricStat parameter to retrieve + a metric, and as many as 10 structures that contain the Expression + parameter to perform a math expression. Of those Expression structures, + one must have true as the value for ReturnData. The result of + this expression is the value the alarm watches. \n Any expression + used in a PutMetricAlarm operation must return a single time series. + For more information, see Metric Math Syntax and Functions (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax) + in the Amazon CloudWatch User Guide. \n Some of the parameters + of this structure also have different uses whether you are using + this structure in a GetMetricData operation or a PutMetricAlarm + operation. These differences are explained in the following parameter + list." + properties: + accountID: + type: string + expression: + type: string + id: + type: string + label: + type: string + metricStat: + description: This structure defines the metric to be returned, + along with the statistics, period, and units. + properties: + metric: + description: Represents a specific metric. + properties: + dimensions: + items: + description: "A dimension is a name/value pair that + is part of the identity of a metric. Because dimensions + are part of the unique identifier for a metric, + whenever you add a unique name/value pair to one + of your metrics, you are creating a new variation + of that metric. For example, many Amazon EC2 metrics + publish InstanceId as a dimension name, and the + actual instance ID as the value for that dimension. + \n You can assign up to 30 dimensions to a metric." + properties: + name: + type: string + value: + type: string + type: object + type: array + metricName: + type: string + namespace: + type: string + type: object + period: + format: int64 + type: integer + stat: + type: string + unit: + type: string + type: object + period: + format: int64 + type: integer + returnData: + type: boolean + type: object + type: array + name: + description: "The name for the alarm. This name must be unique within + the Region. \n The name must contain only UTF-8 characters, and + can't contain ASCII control characters" + type: string + namespace: + description: The namespace for the metric associated specified in + MetricName. + type: string + oKActions: + description: "The actions to execute when this alarm transitions to + an OK state from any other state. Each action is specified as an + Amazon Resource Name (ARN). Valid values: \n EC2 actions: \n * arn:aws:automate:region:ec2:stop + \n * arn:aws:automate:region:ec2:terminate \n * arn:aws:automate:region:ec2:reboot + \n * arn:aws:automate:region:ec2:recover \n * arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 + \n * arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 + \n * arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0 + \n * arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Recover/1.0 + \n Autoscaling action: \n * arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name + \n SNS notification action: \n * arn:aws:sns:region:account-id:sns-topic-name:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name + \n SSM integration actions: \n * arn:aws:ssm:region:account-id:opsitem:severity#CATEGORY=category-name + \n * arn:aws:ssm-incidents::account-id:responseplan/response-plan-name" + items: + type: string + type: array + period: + description: "The length, in seconds, used each time the metric specified + in MetricName is evaluated. Valid values are 10, 30, and any multiple + of 60. \n Period is required for alarms based on static thresholds. + If you are creating an alarm based on a metric math expression, + you specify the period for each metric within the objects in the + Metrics array. \n Be sure to specify 10 or 30 only for metrics that + are stored by a PutMetricData call with a StorageResolution of 1. + If you specify a period of 10 or 30 for a metric that does not have + sub-minute resolution, the alarm still attempts to gather data at + the period rate that you specify. In this case, it does not receive + data for the attempts that do not correspond to a one-minute data + resolution, and the alarm might often lapse into INSUFFICENT_DATA + status. Specifying 10 or 30 also sets this alarm as a high-resolution + alarm, which has a higher charge than other alarms. For more information + about pricing, see Amazon CloudWatch Pricing (https://aws.amazon.com/cloudwatch/pricing/). + \n An alarm's total current evaluation period can be no longer than + one day, so Period multiplied by EvaluationPeriods cannot be more + than 86,400 seconds." + format: int64 + type: integer + statistic: + description: The statistic for the metric specified in MetricName, + other than percentile. For percentile statistics, use ExtendedStatistic. + When you call PutMetricAlarm and specify a MetricName, you must + specify either Statistic or ExtendedStatistic, but not both. + type: string + tags: + description: "A list of key-value pairs to associate with the alarm. + You can associate as many as 50 tags with an alarm. To be able to + associate tags with the alarm when you create the alarm, you must + have the cloudwatch:TagResource permission. \n Tags can help you + organize and categorize your resources. You can also use them to + scope user permissions by granting a user permission to access or + change only resources with certain tag values. \n If you are using + this operation to update an existing alarm, any tags you specify + in this parameter are ignored. To change the tags of an existing + alarm, use TagResource (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_TagResource.html) + or UntagResource (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_UntagResource.html)." + items: + description: A key-value pair associated with a CloudWatch resource. + properties: + key: + type: string + value: + type: string + type: object + type: array + threshold: + description: "The value against which the specified statistic is compared. + \n This parameter is required for alarms based on static thresholds, + but should not be used for alarms based on anomaly detection models." + type: number + thresholdMetricID: + description: "If this is an alarm based on an anomaly detection model, + make this value match the ID of the ANOMALY_DETECTION_BAND function. + \n For an example of how to use this parameter, see the Anomaly + Detection Model Alarm example on this page. \n If your alarm uses + this parameter, it cannot have Auto Scaling actions." + type: string + treatMissingData: + description: "Sets how this alarm is to handle missing data points. + If TreatMissingData is omitted, the default behavior of missing + is used. For more information, see Configuring How CloudWatch Alarms + Treats Missing Data (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarms-and-missing-data). + \n Valid Values: breaching | notBreaching | ignore | missing \n + Alarms that evaluate metrics in the AWS/DynamoDB namespace always + ignore missing data even if you choose a different option for TreatMissingData. + When an AWS/DynamoDB metric has missing data, alarms that evaluate + that metric remain in their current state." + type: string + unit: + description: "The unit of measure for the statistic. For example, + the units for the Amazon EC2 NetworkIn metric are Bytes because + NetworkIn tracks the number of bytes that an instance receives on + all network interfaces. You can also specify a unit when you create + a custom metric. Units help provide conceptual meaning to your data. + Metric data points that specify a unit of measure, such as Percent, + are aggregated separately. If you are creating an alarm based on + a metric math expression, you can specify the unit for each metric + (if needed) within the objects in the Metrics array. \n If you don't + specify Unit, CloudWatch retrieves all unit types that have been + published for the metric and attempts to evaluate the alarm. Usually, + metrics are published with only one unit, so the alarm works as + intended. \n However, if the metric is published with multiple types + of units and you don't specify a unit, the alarm's behavior is not + defined and it behaves unpredictably. \n We recommend omitting Unit + so that you don't inadvertently specify an incorrect unit that is + not published for this metric. Doing so causes the alarm to be stuck + in the INSUFFICIENT DATA state." + type: string + required: + - comparisonOperator + - evaluationPeriods + - name + type: object + status: + description: MetricAlarmStatus defines the observed state of MetricAlarm + properties: + ackResourceMetadata: + description: All CRs managed by ACK have a common `Status.ACKResourceMetadata` + member that is used to contain resource sync state, account ownership, + constructed ARN for the resource + properties: + arn: + description: 'ARN is the Amazon Resource Name for the resource. + This is a globally-unique identifier and is set only by the + ACK service controller once the controller has orchestrated + the creation of the resource OR when it has verified that an + "adopted" resource (a resource where the ARN annotation was + set by the Kubernetes user on the CR) exists and matches the + supplied CR''s Spec field values. TODO(vijat@): Find a better + strategy for resources that do not have ARN in CreateOutputResponse + https://github.com/aws/aws-controllers-k8s/issues/270' + type: string + ownerAccountID: + description: OwnerAccountID is the AWS Account ID of the account + that owns the backend AWS service API resource. + type: string + region: + description: Region is the AWS region in which the resource exists + or will exist. + type: string + required: + - ownerAccountID + - region + type: object + conditions: + description: All CRS managed by ACK have a common `Status.Conditions` + member that contains a collection of `ackv1alpha1.Condition` objects + that describe the various terminal states of the CR and its backend + AWS service API resource + items: + description: Condition is the common struct used by all CRDs managed + by ACK service controllers to indicate terminal states of the + CR and its backend AWS service API resource + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status + to another. + format: date-time + type: string + message: + description: A human readable message indicating details about + the transition. + type: string + reason: + description: The reason for the condition's last transition. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type is the type of the Condition + type: string + required: + - status + - type + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: null + storedVersions: null diff --git a/operators/ack-cloudwatch-controller/0.0.3/metadata/annotations.yaml b/operators/ack-cloudwatch-controller/0.0.3/metadata/annotations.yaml new file mode 100644 index 00000000000..9d2ce6d5b36 --- /dev/null +++ b/operators/ack-cloudwatch-controller/0.0.3/metadata/annotations.yaml @@ -0,0 +1,15 @@ +annotations: + # Core bundle annotations. + operators.operatorframework.io.bundle.mediatype.v1: registry+v1 + operators.operatorframework.io.bundle.manifests.v1: manifests/ + operators.operatorframework.io.bundle.metadata.v1: metadata/ + operators.operatorframework.io.bundle.package.v1: ack-cloudwatch-controller + operators.operatorframework.io.bundle.channels.v1: alpha + operators.operatorframework.io.bundle.channel.default.v1: alpha + operators.operatorframework.io.metrics.builder: operator-sdk-v1.28.0 + operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 + operators.operatorframework.io.metrics.project_layout: unknown + + # Annotations for testing. + operators.operatorframework.io.test.mediatype.v1: scorecard+v1 + operators.operatorframework.io.test.config.v1: tests/scorecard/ diff --git a/operators/ack-cloudwatch-controller/0.0.3/tests/scorecard/config.yaml b/operators/ack-cloudwatch-controller/0.0.3/tests/scorecard/config.yaml new file mode 100644 index 00000000000..382ddefd156 --- /dev/null +++ b/operators/ack-cloudwatch-controller/0.0.3/tests/scorecard/config.yaml @@ -0,0 +1,50 @@ +apiVersion: scorecard.operatorframework.io/v1alpha3 +kind: Configuration +metadata: + name: config +stages: +- parallel: true + tests: + - entrypoint: + - scorecard-test + - basic-check-spec + image: quay.io/operator-framework/scorecard-test:v1.7.1 + labels: + suite: basic + test: basic-check-spec-test + storage: + spec: + mountPath: {} + - entrypoint: + - scorecard-test + - olm-bundle-validation + image: quay.io/operator-framework/scorecard-test:v1.7.1 + labels: + suite: olm + test: olm-bundle-validation-test + storage: + spec: + mountPath: {} + - entrypoint: + - scorecard-test + - olm-crds-have-validation + image: quay.io/operator-framework/scorecard-test:v1.7.1 + labels: + suite: olm + test: olm-crds-have-validation-test + storage: + spec: + mountPath: {} + - entrypoint: + - scorecard-test + - olm-spec-descriptors + image: quay.io/operator-framework/scorecard-test:v1.7.1 + labels: + suite: olm + test: olm-spec-descriptors-test + storage: + spec: + mountPath: {} +storage: + spec: + mountPath: {}