Add temporary chart for experiments

This commit is contained in:
Waqar Ahmed 2020-09-24 13:47:07 +05:00
parent 026c36301a
commit 42d34981f2
61 changed files with 6167 additions and 0 deletions

View File

@ -0,0 +1 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 435.55 43.54"><defs><style>.cls-1{fill:#0096db;}.cls-2{isolation:isolate;}</style></defs><path class="cls-1" d="M60.45,20C59.54,3,35.45-4.15,25,12.74c-6.76-3-14.87,1.56-15,9.12C-3.43,23.23-4.83,43.7,15,43.7h.66a6.9,6.9,0,0,1,.11-4.8H13.67c-9.52-.07-12-13.87.68-12.59-2.31-7.62,5.75-14,12.45-8.22C32.86,4,55.22,3.54,56.23,23.71c12.45.88,12.06,14.09,3,15.34H46.48A4.94,4.94,0,0,1,47,43.7H59.18C73,43.42,75.5,22.93,60.45,20Z" transform="translate(0.01 -3.11)"/><path class="cls-1" d="M36.18,29.39l.12-.22c1.27-2.26,6.31-2.41,8.29-.61a5.72,5.72,0,0,0,2.1,1.84,5,5,0,1,0,4.15-9,5.07,5.07,0,0,0-6.56,2.46c-1.47,2.68-7.15,1.86-8.25.67a6.07,6.07,0,0,0-2.73-1.92A4.69,4.69,0,0,0,27,27.72a5.32,5.32,0,0,0,.55,1.69c.52,1.24-2,6.83-4.63,7.32a5.73,5.73,0,0,0-2.73.56,4.94,4.94,0,1,0,4.45,8.82l.19-.1a5.07,5.07,0,0,0,2-6.68c-1.24-2.78,2.46-7.18,4.57-7.31s5.82,4.84,4.55,7.14A5.08,5.08,0,0,0,37.43,46a5,5,0,0,0,5.32-8.34,5.78,5.78,0,0,0-2.65-.78c-2.58-.69-5.23-4.93-4-7.22ZM49,23.79A2.15,2.15,0,1,1,46.84,26h0A2.16,2.16,0,0,1,49,23.79ZM22.43,44a2.15,2.15,0,1,1,2.15-2.15h0A2.14,2.14,0,0,1,22.45,44ZM31.6,28.4a1.61,1.61,0,1,1,1.6-1.62v0A1.6,1.6,0,0,1,31.6,28.4Zm8.58,11.31A2.15,2.15,0,1,1,38,41.87h0a2.14,2.14,0,0,1,2.13-2.15Z" transform="translate(0.01 -3.11)"/><g class="cls-2"><g class="cls-2"><path d="M90.27,10.7H79V7.2h26.4v3.5H94.11V40.8H90.27Z" transform="translate(0.01 -3.11)"/><path d="M112.5,7.2H127c4.12,0,7.44,1.25,9.55,3.36a9.27,9.27,0,0,1,2.59,6.62v.1c0,5.57-3.84,8.83-9.12,9.79L140.29,40.8h-4.66l-9.74-13.06h-9.6V40.8H112.5Zm14.11,17.13c5,0,8.64-2.59,8.64-6.91v-.09c0-4.13-3.17-6.63-8.59-6.63H116.29V24.33Z" transform="translate(0.01 -3.11)"/><path d="M147.54,7.2h3.79V40.8h-3.79Z" transform="translate(0.01 -3.11)"/><path d="M159.68,24.09V24c0-9.22,6.77-17.38,16.85-17.38a17.72,17.72,0,0,1,12.53,4.46L186.61,14a14.28,14.28,0,0,0-10.23-3.85c-7.44,0-12.76,6.29-12.76,13.78V24c0,8,5.13,14,13.29,14a15.84,15.84,0,0,0,9.7-3.36V26.25H176.38v-3.4h13.88V36.24a20.4,20.4,0,0,1-13.49,5.14C166.21,41.38,159.68,33.7,159.68,24.09Z" transform="translate(0.01 -3.11)"/><path d="M197.31,24.09V24c0-9.22,6.77-17.38,16.85-17.38a17.72,17.72,0,0,1,12.53,4.46L224.24,14A14.27,14.27,0,0,0,214,10.12c-7.44,0-12.77,6.29-12.77,13.78V24c0,8,5.13,14,13.29,14a15.84,15.84,0,0,0,9.7-3.36V26.25H214v-3.4h13.87V36.24a20.4,20.4,0,0,1-13.49,5.14C203.84,41.38,197.31,33.7,197.31,24.09Z" transform="translate(0.01 -3.11)"/><path d="M236.43,7.2h24.29v3.45h-20.5V22.13h18.34v3.45H240.22V37.34H261V40.8H236.43Z" transform="translate(0.01 -3.11)"/><path d="M268.59,7.2H283c4.13,0,7.44,1.25,9.55,3.36a9.27,9.27,0,0,1,2.59,6.62v.1c0,5.57-3.84,8.83-9.12,9.79L296.38,40.8h-4.65L282,27.74h-9.6V40.8h-3.79ZM282.7,24.33c5,0,8.64-2.59,8.64-6.91v-.09c0-4.13-3.16-6.63-8.59-6.63H272.38V24.33Z" transform="translate(0.01 -3.11)"/></g><g class="cls-2"><path d="M302.57,7.2h8l8.83,14.21L328.21,7.2h8V40.8h-7.34V18.86l-9.46,14.35h-.19L309.82,19V40.8h-7.25Z" transform="translate(0.01 -3.11)"/><path d="M344.24,7.2h25.34v6.57h-18v6.82h15.84v6.58H351.58v7h18.24V40.8H344.24Z" transform="translate(0.01 -3.11)"/><path d="M374.09,35.9l4.37-5.23c3,2.5,6.19,4.08,10,4.08,3,0,4.85-1.2,4.85-3.17v-.09c0-1.87-1.15-2.84-6.77-4.28-6.77-1.72-11.13-3.6-11.13-10.27v-.09c0-6.1,4.89-10.13,11.76-10.13A19.44,19.44,0,0,1,399.68,11l-3.84,5.57c-3-2.07-5.91-3.31-8.74-3.31s-4.32,1.29-4.32,2.92v.1c0,2.21,1.44,2.93,7.25,4.42,6.82,1.77,10.66,4.22,10.66,10.08v.09c0,6.68-5.09,10.42-12.34,10.42A21.39,21.39,0,0,1,374.09,35.9Z" transform="translate(0.01 -3.11)"/><path d="M407.12,7.2h7.39V20.49h13.63V7.2h7.39V40.8h-7.39V27.31H414.51V40.8h-7.39Z" transform="translate(0.01 -3.11)"/></g></g></svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

View File

@ -0,0 +1,19 @@
apiVersion: v2
name: aws-event-sources
version: 0.1.0
appVersion: 0.2.0
type: application
description: A Helm chart for AWS event sources by Triggermesh
home: https://github.com/triggermesh/aws-event-sources
icon: file://../logo.png
keywords:
- knative-eventing
- sources
- aws
- triggermesh
- serverless
maintainers:
- name: sameersbn
- name: antoineco
sources:
- https://github.com/triggermesh/aws-event-sources

View File

@ -0,0 +1,109 @@
# aws-event-sources
Installs Triggermesh AWS event sources controller. The following event sources are currently supported by the controller
- Amazon CodeCommit (`kind: AWSCodeCommitSource`)
- Amazon Cognito Identity (`kind: AWSCognitoIdentitySource`)
- Amazon Cognito UserPool (`kind: AWSCognitoUserPoolSource`)
- Amazon DynamoDB (`kind: AWSDynamoDBSource`)
- Amazon Kinesis (`kind: AWSKinesisSource`)
- Amazon Simple Notification Service (`kind: AWSSNSSource`)
- Amazon Simple Queue Service (`kind: AWSSQSSource`)
Refer to [aws-event-sources/config/samples](https://github.com/triggermesh/aws-event-sources/tree/master/config/samples) for examples that make use of the controller.
## TL;DR;
```console
$ helm repo add triggermesh https://storage.googleapis.com/triggermesh-charts
$ helm install triggermesh/aws-event-sources
```
To report bugs and for feedback and support please [create a new issue](https://github.com/triggermesh/aws-event-sources/issues/new).
## Introduction
This chart installs the [aws-event-sources](https://github.com/triggermesh/aws-event-sources) controller on a Kubernetes cluster.
## Prerequisites
- Kubernetes 1.16+ with Beta APIs
- Helm 3.0+
- Knative v0.14+
## Installing the Chart
Add the Triggermesh chart repository to Helm:
```console
$ helm repo add triggermesh https://storage.googleapis.com/triggermesh-charts
```
To install the chart with the release name `my-release`:
```console
$ helm install --name my-release triggermesh/aws-event-sources
```
The command deploys the aws-event-sources controller in the default configuration. Refer to the [configuration](#configuration) section for the complete list of parameters that can be specified to customize the deployment of the controller.
## Uninstalling the Chart
To uninstall/delete the `my-release` deployment:
```console
$ helm delete my-release
```
The Kubernetes resources associated with chart will be removed and the Helm release will be deleted.
However note that the `CustomResourceDefinition` resources created by the chart will not be removed by the delete command and therefore need to be removed manually.
```console
$ kubectl delete crd awscodecommitsources.sources.triggermesh.io
$ kubectl delete crd awscognitoidentitysources.sources.triggermesh.io
$ kubectl delete crd awscognitouserpoolsources.sources.triggermesh.io
$ kubectl delete crd awsdynamodbsources.sources.triggermesh.io
$ kubectl delete crd awsiotsources.sources.triggermesh.io
$ kubectl delete crd awskinesissources.sources.triggermesh.io
$ kubectl delete crd awssnssources.sources.triggermesh.io
$ kubectl delete crd awssqssources.sources.triggermesh.io
```
## Configuration
| Parameter | Description | Default |
|-----------------------------------------|-----------------------------------------------------|--------------------------------------------|
| `nameOverride` | Override the name for controller resources | `""` |
| `fullnameOverride` | Override the fullname for controller resources | `""` |
| `rbac.create` | Create RBAC resources | `true` |
| `serviceAccount.create` | Create service account for the controller | `true` |
| `serviceAccount.annotations` | Annotations to add to controller service account | `{}` |
| `serviceAccount.name` | Override the name for the service account | `nil` |
| `imagePullSecrets` | Specify image pull secrets | `[]` |
| `image.registry` | Image registry name | `gcr.io` |
| `image.repository` | Image repository name | `triggermesh/aws-event-sources-controller` |
| `image.tag` | Image tag | `{TAG_NAME}` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `adapter.awscodecommit.repository` | AWS CodeCommit adapter image name | `triggermesh/awscodecommitsource` |
| `adapter.awscodecommit.tag` | AWS CodeCommit adapter image tag | _defaults to value of `.image.tag`_ |
| `adapter.awscognitoidentity.repository` | AWS Cognito Identity adapter image name | `triggermesh/awscognitoidentitysource` |
| `adapter.awscognitoidentity.tag` | AWS Cognito Identity adapter image tag | _defaults to value of `.image.tag`_ |
| `adapter.awscognitouserpool.repository` | AWS Cognito Userpool adapter image name | `triggermesh/awscognitouserpoolsource` |
| `adapter.awscognitouserpool.tag` | AWS Cognito Userpool adapter image tag | _defaults to value of `.image.tag`_ |
| `adapter.awsdynamodb.repository` | AWS DynomoDB adapter image name | `triggermesh/awsdynamodbsource` |
| `adapter.awsdynamodb.tag` | AWS DynomoDB adapter image tag | _defaults to value of `.image.tag`_ |
| `adapter.awskinesis.repository` | AWS Kinesis adapter image name | `triggermesh/awskinesissource` |
| `adapter.awskinesis.tag` | AWS Kinesis adapter image tag | _defaults to value of `.image.tag`_ |
| `adapter.awssns.repository` | AWS SNS adapter image name | `triggermesh/awssnssource` |
| `adapter.awssns.tag` | AWS SNS adapter image tag | _defaults to value of `.image.tag`_ |
| `adapter.awssqs.repository` | AWS SQS adapter image name | `triggermesh/awssqssource` |
| `adapter.awssqs.tag` | AWS SQS adapter image tag | _defaults to value of `.image.tag`_ |
| `knative.domain` | Knative Domain | `example.com` |
| `knative.urlScheme` | Knative URL Scheme | `http` |
| `podAnnotations` | Annotations to add to the controller pod | `{}`` |
| `podSecurityContext` | Security context for controller pods | `{}` |
| `securityContext` | Security context for controller containers | `{}` |
| `resources` | Resource requests/limits for the controller | `{requests: {cpu: 20m, memory: 20Mi}}` |
| `nodeSelector` | Controller node selector | `{}` |
| `tolerations` | Tolerations for use with node taints | `[]` |
| `affinity` | Assign custom affinity rules to the controller pods | `{}` |

View File

@ -0,0 +1,5 @@
# Triggermesh AWS Event Sources
[aws-event-sources](https://github.com/triggermesh/aws-event-sources) is a Kubernetes controller for Knative event sources for AWS services.
You may be using some Cloud services on AWS but still interested to run workloads within Kubernetes. To trigger those workloads when events happen in your AWS service you need to have an event source that can consume AWS events and send them to your workload.

View File

@ -0,0 +1,182 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awscodecommitsources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.codecommit.push" },
{ "type": "com.amazon.codecommit.pull_request" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSCodeCommitSource
plural: awscodecommitsources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:codecommit:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:.+$'
branch:
type: string
eventTypes:
type: array
items:
type: string
enum: [push, pull_request]
credentials:
type: object
properties:
accessKeyID:
type: object
properties:
value:
type: string
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
secretAccessKey:
type: object
properties:
value:
type: string
format: password
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- arn
- branch
- eventTypes
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,172 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awscognitoidentitysources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.cognito-identity.sync_trigger" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSCognitoIdentitySource
plural: awscognitoidentitysources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:cognito-identity:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:identitypool\/.+$'
credentials:
type: object
properties:
accessKeyID:
type: object
properties:
value:
type: string
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
secretAccessKey:
type: object
properties:
value:
type: string
format: password
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- arn
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,172 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awscognitouserpoolsources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.cognitouserpool.sync_trigger" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSCognitoUserPoolSource
plural: awscognitouserpoolsources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:cognito-idp:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:userpool\/.+$'
credentials:
type: object
properties:
accessKeyID:
type: object
properties:
value:
type: string
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
secretAccessKey:
type: object
properties:
value:
type: string
format: password
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- arn
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,174 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awsdynamodbsources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.dynamodb.insert" },
{ "type": "com.amazon.dynamodb.modify" },
{ "type": "com.amazon.dynamodb.remove" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSDynamoDBSource
plural: awsdynamodbsources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:dynamodb:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:table\/.+$'
credentials:
type: object
properties:
accessKeyID:
type: object
properties:
value:
type: string
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
secretAccessKey:
type: object
properties:
value:
type: string
format: password
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- arn
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,157 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awsiotsources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.iot.greetings" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSIoTSource
plural: awsiotsources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
endpoint:
type: string
format: hostname
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:iot:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:topic\/.+$'
rootCA:
type: string
rootCAPath:
type: string
certificate:
type: string
certificatePath:
type: string
privateKey:
type: string
privateKeyPath:
type: string
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- endpoint
- arn
- rootCA
- certificate
- privateKey
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,172 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awskinesissources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.kinesis.stream_record" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSKinesisSource
plural: awskinesissources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:kinesis:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:stream\/.+$'
credentials:
type: object
properties:
accessKeyID:
type: object
properties:
value:
type: string
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
secretAccessKey:
type: object
properties:
value:
type: string
format: password
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- arn
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,199 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awssnssources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.sns.notification" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSSNSSource
plural: awssnssources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:sns:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:.+$'
subscriptionAttributes:
type: object
properties:
DeliveryPolicy:
type: string
format: json
nullable: true
FilterPolicy:
type: string
format: json
nullable: true
RawMessageDelivery:
type: string
format: json
nullable: true
RedrivePolicy:
type: string
format: json
nullable: true
credentials:
type: object
properties:
accessKeyID:
type: object
properties:
value:
type: string
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
secretAccessKey:
type: object
properties:
value:
type: string
format: password
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- arn
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
address:
type: object
properties:
url:
type: string
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: URL
type: string
jsonPath: .status.address.url
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,172 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awssqssources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.sqs.message" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSSQSSource
plural: awssqssources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:sqs:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:.+$'
credentials:
type: object
properties:
accessKeyID:
type: object
properties:
value:
type: string
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
secretAccessKey:
type: object
properties:
value:
type: string
format: password
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- arn
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,46 @@
categories:
- Knative
- faas
- serverless
- AWS
labels:
io.rancher.certified: partner
questions:
- variable: defaultImage
default: "true"
description: "Use default Docker images"
label: Use Default Images
type: boolean
show_subquestion_if: false
group: "Container Images"
subquestions:
- variable: image.registry
default: "gcr.io"
description: "Docker image registry"
type: string
label: Image Registry
- variable: image.repository
default: "triggermesh/aws-event-sources-controller"
description: "Docker image repository"
type: string
label: Image Repository
- variable: image.tag
default: "v0.2.0"
description: "Docker image tag"
type: string
label: Image Tag
- variable: knative.domain
default: "example.com"
description: "Specify the Knative Domain"
type: string
required: true
label: Knative Domain
- variable: knative.urlScheme
default: "http"
description: "Specify the Knative URL Scheme"
type: string
required: true
label: Knative URL Scheme
options:
- "http"
- "https"

View File

@ -0,0 +1,9 @@
Triggermesh AWS event sources controller for Knative has been installed.
To view the controller logs:
kubectl logs -f deploy/{{ include "aws-event-sources.fullname" . }}-controller --namespace {{ .Release.Namespace }}
Refer to https://github.com/triggermesh/aws-event-sources/tree/master/config/samples for examples that make use of the controller.
For support and feedback contact us as https://github.com/triggermesh/aws-event-sources/issues/new.

View File

@ -0,0 +1,63 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "aws-event-sources.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "aws-event-sources.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "aws-event-sources.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "aws-event-sources.labels" -}}
helm.sh/chart: {{ include "aws-event-sources.chart" . }}
{{ include "aws-event-sources.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "aws-event-sources.selectorLabels" -}}
app.kubernetes.io/name: {{ include "aws-event-sources.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "aws-event-sources.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "aws-event-sources.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,30 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if .Values.serviceAccount.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ template "aws-event-sources.fullname" . }}-controller
labels:
{{- include "aws-event-sources.labels" . | nindent 4 }}
subjects:
- kind: ServiceAccount
name: {{ template "aws-event-sources.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ template "aws-event-sources.fullname" . }}-controller
{{- end }}

View File

@ -0,0 +1,152 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ template "aws-event-sources.fullname" . }}-controller
labels:
{{- include "aws-event-sources.labels" . | nindent 4 }}
rules:
# Record Kubernetes events
- apiGroups:
- ''
resources:
- events
verbs:
- create
- patch
- update
# Manage receive-adapters
- apiGroups:
- apps
resources:
- deployments
verbs: &all
- get
- list
- watch
- create
- update
- delete
- patch
- apiGroups:
- serving.knative.dev
resources:
- services
verbs: *all
# Read Source resources and update their statuses
- apiGroups:
- sources.triggermesh.io
resources:
- awscodecommitsources
- awscognitoidentitysources
- awscognitouserpoolsources
- awsdynamodbsources
- awsiotsources
- awskinesissources
- awssnssources
- awssqssources
verbs:
- list
- watch
- get
- patch
- apiGroups:
- sources.triggermesh.io
resources:
- awscodecommitsources/status
- awscognitoidentitysources/status
- awscognitouserpoolsources/status
- awsdynamodbsources/status
- awsiotsources/status
- awskinesissources/status
- awssnssources/status
- awssqssources/status
verbs:
- update
# Read controller configurations
- apiGroups:
- ''
resources:
- configmaps
verbs: &listwatch
- list
- watch
- apiGroups:
- ''
resources:
- configmaps
resourceNames:
- config-logging
- config-observability
- config-leader-election
verbs:
- get
# Resolve sink URIs
- apiGroups:
- ''
resources:
- services
verbs: *listwatch
- apiGroups:
- serving.knative.dev
resources:
- services
verbs: *listwatch
- apiGroups:
- eventing.knative.dev
resources:
- brokers
verbs: *listwatch
- apiGroups:
- messaging.knative.dev
resources:
- channels
verbs: *listwatch
---
# The role is needed for the aggregated role source-observer in knative-eventing to provide readonly access to "Sources".
# see https://github.com/knative/eventing/blob/release-0.14/docs/spec/sources.md#source-rbac
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ template "aws-event-sources.fullname" . }}-observer
labels:
duck.knative.dev/source: 'true'
{{- include "aws-event-sources.labels" . | nindent 4 }}
rules:
- apiGroups:
- sources.triggermesh.io
resources:
- awscodecommitsources
- awscognitoidentitysources
- awscognitouserpoolsources
- awsdynamodbsources
- awsiotsources
- awskinesissources
- awssnssources
- awssqssources
verbs:
- get
- list
- watch
{{- end }}

View File

@ -0,0 +1,102 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "aws-event-sources.fullname" . }}-controller
labels:
{{- include "aws-event-sources.labels" . | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels:
{{- include "aws-event-sources.selectorLabels" . | nindent 6}}
template:
metadata:
labels:
{{- include "aws-event-sources.labels" . | nindent 8 }}
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ template "aws-event-sources.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: controller
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy}}
terminationMessagePolicy: FallbackToLogsOnError
env:
- name: SYSTEM_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
# Logging/observability configuration
- name: CONFIG_LOGGING_NAME
value: config-logging
- name: CONFIG_OBSERVABILITY_NAME
value: config-observability
- name: METRICS_DOMAIN
value: triggermesh.io/sources
# Global settings
- name: KNATIVE_URL_SCHEME
value: {{ .Values.knative.urlScheme }}
- name: KNATIVE_DOMAIN
value: {{ .Values.knative.domain }}
# Source adapters
- name: AWSCODECOMMITSOURCE_IMAGE
value: "{{ .Values.image.registry }}/{{ .Values.adapters.awscodecommit.repository }}:{{ default .Values.image.tag .Values.adapters.awscodecommit.tag }}"
- name: AWSCOGNITOIDENTITYSOURCE_IMAGE
value: "{{ .Values.image.registry }}/{{ .Values.adapters.awscognitoidentity.repository }}:{{ default .Values.image.tag .Values.adapters.awscognitoidentity.tag }}"
- name: AWSCOGNITOUSERPOOLSOURCE_IMAGE
value: "{{ .Values.image.registry }}/{{ .Values.adapters.awscognitouserpool.repository }}:{{ default .Values.image.tag .Values.adapters.awscognitouserpool.tag }}"
- name: AWSDYNAMODBSOURCE_IMAGE
value: "{{ .Values.image.registry }}/{{ .Values.adapters.awsdynamodb.repository }}:{{ default .Values.image.tag .Values.adapters.awsdynamodb.tag }}"
- name: AWSKINESISSOURCE_IMAGE
value: "{{ .Values.image.registry }}/{{ .Values.adapters.awskinesis.repository }}:{{ default .Values.image.tag .Values.adapters.awskinesis.tag }}"
- name: AWSSNSSOURCE_IMAGE
value: "{{ .Values.image.registry }}/{{ .Values.adapters.awssns.repository }}:{{ default .Values.image.tag .Values.adapters.awssns.tag }}"
- name: AWSSQSSOURCE_IMAGE
value: "{{ .Values.image.registry }}/{{ .Values.adapters.awssqs.repository }}:{{ default .Values.image.tag .Values.adapters.awssqs.tag }}"
ports:
- name: metrics
containerPort: 9090
- name: profiling
containerPort: 8008
securityContext:
allowPrivilegeEscalation: false
{{- with .Values.securityContext }}
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

View File

@ -0,0 +1,26 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "aws-event-sources.serviceAccountName" . }}
labels:
{{- include "aws-event-sources.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,63 @@
nameOverride: ""
fullnameOverride: ""
rbac:
create: true
serviceAccount:
create: true
annotations: {}
name: ""
imagePullSecrets: []
image:
registry: gcr.io
repository: triggermesh/aws-event-sources-controller
tag: "v0.2.0"
pullPolicy: IfNotPresent
adapters:
awscodecommit:
repository: triggermesh/awscodecommitsource
tag:
awscognitoidentity:
repository: triggermesh/awscognitoidentitysource
tag:
awscognitouserpool:
repository: triggermesh/awscognitouserpoolsource
tag:
awsdynamodb:
repository: triggermesh/awsdynamodbsource
tag:
awskinesis:
repository: triggermesh/awskinesissource
tag:
awssns:
repository: triggermesh/awssnssource
tag: "latest"
awssqs:
repository: triggermesh/awssqssource
tag:
knative:
urlScheme: http
domain: example.com
podAnnotations: {}
podSecurityContext: {}
securityContext: {}
resources:
requests:
cpu: 20m
memory: 20Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

View File

@ -0,0 +1,19 @@
apiVersion: v2
name: aws-event-sources
version: 0.1.1
appVersion: 0.3.0
type: application
description: AWS Event Sources controller for Kubernetes
home: https://github.com/triggermesh/aws-event-sources
icon: file://../logo.svg
keywords:
- knative-eventing
- sources
- aws
- triggermesh
- serverless
maintainers:
- name: sameersbn
- name: antoineco
sources:
- https://github.com/triggermesh/aws-event-sources

View File

@ -0,0 +1,109 @@
# aws-event-sources
Installs TriggerMesh AWS event sources controller. The following event sources are currently supported by the controller
- Amazon CodeCommit (`kind: AWSCodeCommitSource`)
- Amazon Cognito Identity (`kind: AWSCognitoIdentitySource`)
- Amazon Cognito UserPool (`kind: AWSCognitoUserPoolSource`)
- Amazon DynamoDB (`kind: AWSDynamoDBSource`)
- Amazon Kinesis (`kind: AWSKinesisSource`)
- Amazon Simple Notification Service (`kind: AWSSNSSource`)
- Amazon Simple Queue Service (`kind: AWSSQSSource`)
Refer to [aws-event-sources/config/samples](https://github.com/triggermesh/aws-event-sources/tree/master/config/samples) for examples that make use of the controller.
## TL;DR;
```console
$ helm repo add triggermesh https://storage.googleapis.com/triggermesh-charts
$ helm install triggermesh/aws-event-sources
```
To report bugs and for feedback and support please [create a new issue](https://github.com/triggermesh/aws-event-sources/issues/new).
## Introduction
This chart installs the [aws-event-sources](https://github.com/triggermesh/aws-event-sources) controller on a Kubernetes cluster.
## Prerequisites
- Kubernetes 1.16+ with Beta APIs
- Helm 3.0+
- Knative v0.14+
## Installing the Chart
Add the TriggerMesh chart repository to Helm:
```console
$ helm repo add triggermesh https://storage.googleapis.com/triggermesh-charts
```
To install the chart with the release name `my-release`:
```console
$ helm install --name my-release triggermesh/aws-event-sources
```
The command deploys the aws-event-sources controller in the default configuration. Refer to the [configuration](#configuration) section for the complete list of parameters that can be specified to customize the deployment of the controller.
## Uninstalling the Chart
To uninstall/delete the `my-release` deployment:
```console
$ helm delete my-release
```
The Kubernetes resources associated with chart will be removed and the Helm release will be deleted.
However note that the `CustomResourceDefinition` resources created by the chart will not be removed by the delete command and therefore need to be removed manually.
```console
$ kubectl delete crd awscodecommitsources.sources.triggermesh.io
$ kubectl delete crd awscognitoidentitysources.sources.triggermesh.io
$ kubectl delete crd awscognitouserpoolsources.sources.triggermesh.io
$ kubectl delete crd awsdynamodbsources.sources.triggermesh.io
$ kubectl delete crd awsiotsources.sources.triggermesh.io
$ kubectl delete crd awskinesissources.sources.triggermesh.io
$ kubectl delete crd awssnssources.sources.triggermesh.io
$ kubectl delete crd awssqssources.sources.triggermesh.io
```
## Configuration
| Parameter | Description | Default |
|-----------------------------------------|-----------------------------------------------------|--------------------------------------------|
| `nameOverride` | Override the name for controller resources | `""` |
| `fullnameOverride` | Override the fullname for controller resources | `""` |
| `rbac.create` | Create RBAC resources | `true` |
| `serviceAccount.create` | Create service account for the controller | `true` |
| `serviceAccount.annotations` | Annotations to add to controller service account | `{}` |
| `serviceAccount.name` | Override the name for the service account | `nil` |
| `imagePullSecrets` | Specify image pull secrets | `[]` |
| `image.registry` | Image registry name | `gcr.io` |
| `image.repository` | Image repository name | `triggermesh/aws-event-sources-controller` |
| `image.tag` | Image tag | `{TAG_NAME}` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `adapter.awscodecommit.repository` | AWS CodeCommit adapter image name | `triggermesh/awscodecommitsource` |
| `adapter.awscodecommit.tag` | AWS CodeCommit adapter image tag | _defaults to value of `.image.tag`_ |
| `adapter.awscognitoidentity.repository` | AWS Cognito Identity adapter image name | `triggermesh/awscognitoidentitysource` |
| `adapter.awscognitoidentity.tag` | AWS Cognito Identity adapter image tag | _defaults to value of `.image.tag`_ |
| `adapter.awscognitouserpool.repository` | AWS Cognito Userpool adapter image name | `triggermesh/awscognitouserpoolsource` |
| `adapter.awscognitouserpool.tag` | AWS Cognito Userpool adapter image tag | _defaults to value of `.image.tag`_ |
| `adapter.awsdynamodb.repository` | AWS DynomoDB adapter image name | `triggermesh/awsdynamodbsource` |
| `adapter.awsdynamodb.tag` | AWS DynomoDB adapter image tag | _defaults to value of `.image.tag`_ |
| `adapter.awskinesis.repository` | AWS Kinesis adapter image name | `triggermesh/awskinesissource` |
| `adapter.awskinesis.tag` | AWS Kinesis adapter image tag | _defaults to value of `.image.tag`_ |
| `adapter.awssns.repository` | AWS SNS adapter image name | `triggermesh/awssnssource` |
| `adapter.awssns.tag` | AWS SNS adapter image tag | _defaults to value of `.image.tag`_ |
| `adapter.awssqs.repository` | AWS SQS adapter image name | `triggermesh/awssqssource` |
| `adapter.awssqs.tag` | AWS SQS adapter image tag | _defaults to value of `.image.tag`_ |
| `knative.domain` | Knative Domain | `example.com` |
| `knative.urlScheme` | Knative URL Scheme | `http` |
| `podAnnotations` | Annotations to add to the controller pod | `{}`` |
| `podSecurityContext` | Security context for controller pods | `{}` |
| `securityContext` | Security context for controller containers | `{}` |
| `resources` | Resource requests/limits for the controller | `{requests: {cpu: 20m, memory: 20Mi}}` |
| `nodeSelector` | Controller node selector | `{}` |
| `tolerations` | Tolerations for use with node taints | `[]` |
| `affinity` | Assign custom affinity rules to the controller pods | `{}` |

View File

@ -0,0 +1,5 @@
# TriggerMesh AWS Event Sources
[aws-event-sources](https://github.com/triggermesh/aws-event-sources) is a Kubernetes controller that implements Knative event sources for AWS services.
You may be using some Cloud services on AWS but still interested to run workloads within Kubernetes. To trigger those workloads when events happen in your AWS service you need to have an event source that can consume AWS events and send them to your workload.

View File

@ -0,0 +1,182 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awscodecommitsources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.codecommit.push" },
{ "type": "com.amazon.codecommit.pull_request" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSCodeCommitSource
plural: awscodecommitsources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:codecommit:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:.+$'
branch:
type: string
eventTypes:
type: array
items:
type: string
enum: [push, pull_request]
credentials:
type: object
properties:
accessKeyID:
type: object
properties:
value:
type: string
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
secretAccessKey:
type: object
properties:
value:
type: string
format: password
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- arn
- branch
- eventTypes
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,172 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awscognitoidentitysources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.cognito-identity.sync_trigger" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSCognitoIdentitySource
plural: awscognitoidentitysources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:cognito-identity:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:identitypool\/.+$'
credentials:
type: object
properties:
accessKeyID:
type: object
properties:
value:
type: string
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
secretAccessKey:
type: object
properties:
value:
type: string
format: password
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- arn
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,172 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awscognitouserpoolsources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.cognitouserpool.sync_trigger" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSCognitoUserPoolSource
plural: awscognitouserpoolsources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:cognito-idp:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:userpool\/.+$'
credentials:
type: object
properties:
accessKeyID:
type: object
properties:
value:
type: string
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
secretAccessKey:
type: object
properties:
value:
type: string
format: password
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- arn
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,174 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awsdynamodbsources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.dynamodb.insert" },
{ "type": "com.amazon.dynamodb.modify" },
{ "type": "com.amazon.dynamodb.remove" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSDynamoDBSource
plural: awsdynamodbsources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:dynamodb:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:table\/.+$'
credentials:
type: object
properties:
accessKeyID:
type: object
properties:
value:
type: string
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
secretAccessKey:
type: object
properties:
value:
type: string
format: password
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- arn
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,157 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awsiotsources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.iot.greetings" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSIoTSource
plural: awsiotsources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
endpoint:
type: string
format: hostname
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:iot:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:topic\/.+$'
rootCA:
type: string
rootCAPath:
type: string
certificate:
type: string
certificatePath:
type: string
privateKey:
type: string
privateKeyPath:
type: string
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- endpoint
- arn
- rootCA
- certificate
- privateKey
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,172 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awskinesissources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.kinesis.stream_record" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSKinesisSource
plural: awskinesissources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:kinesis:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:stream\/.+$'
credentials:
type: object
properties:
accessKeyID:
type: object
properties:
value:
type: string
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
secretAccessKey:
type: object
properties:
value:
type: string
format: password
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- arn
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,199 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awssnssources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.sns.notification" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSSNSSource
plural: awssnssources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:sns:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:.+$'
subscriptionAttributes:
type: object
properties:
DeliveryPolicy:
type: string
format: json
nullable: true
FilterPolicy:
type: string
format: json
nullable: true
RawMessageDelivery:
type: string
format: json
nullable: true
RedrivePolicy:
type: string
format: json
nullable: true
credentials:
type: object
properties:
accessKeyID:
type: object
properties:
value:
type: string
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
secretAccessKey:
type: object
properties:
value:
type: string
format: password
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- arn
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
address:
type: object
properties:
url:
type: string
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: URL
type: string
jsonPath: .status.address.url
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,172 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awssqssources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.sqs.message" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSSQSSource
plural: awssqssources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:sqs:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:.+$'
credentials:
type: object
properties:
accessKeyID:
type: object
properties:
value:
type: string
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
secretAccessKey:
type: object
properties:
value:
type: string
format: password
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- arn
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,46 @@
categories:
- Knative
- faas
- serverless
- AWS
labels:
io.rancher.certified: partner
questions:
- variable: defaultImage
default: "true"
description: "Use default Docker images"
label: Use Default Images
type: boolean
show_subquestion_if: false
group: "Container Images"
subquestions:
- variable: image.registry
default: "gcr.io"
description: "Docker image registry"
type: string
label: Image Registry
- variable: image.repository
default: "triggermesh/aws-event-sources-controller"
description: "Docker image repository"
type: string
label: Image Repository
- variable: image.tag
default: v0.3.0
description: "Docker image tag"
type: string
label: Image Tag
- variable: knative.domain
default: "example.com"
description: "Specify the Knative Domain"
type: string
required: true
label: Knative Domain
- variable: knative.urlScheme
default: "http"
description: "Specify the Knative URL Scheme"
type: string
required: true
label: Knative URL Scheme
options:
- "http"
- "https"

View File

@ -0,0 +1,9 @@
TriggerMesh AWS event sources controller for Knative has been installed.
To view the controller logs:
kubectl logs -f deploy/{{ include "aws-event-sources.fullname" . }}-controller --namespace {{ .Release.Namespace }}
Refer to https://github.com/triggermesh/aws-event-sources/tree/master/config/samples for examples that make use of the controller.
For support and feedback contact us as https://github.com/triggermesh/aws-event-sources/issues/new.

View File

@ -0,0 +1,63 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "aws-event-sources.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "aws-event-sources.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "aws-event-sources.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "aws-event-sources.labels" -}}
helm.sh/chart: {{ include "aws-event-sources.chart" . }}
{{ include "aws-event-sources.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "aws-event-sources.selectorLabels" -}}
app.kubernetes.io/name: {{ include "aws-event-sources.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "aws-event-sources.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "aws-event-sources.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,30 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if .Values.serviceAccount.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ template "aws-event-sources.fullname" . }}-controller
labels:
{{- include "aws-event-sources.labels" . | nindent 4 }}
subjects:
- kind: ServiceAccount
name: {{ template "aws-event-sources.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ template "aws-event-sources.fullname" . }}-controller
{{- end }}

View File

@ -0,0 +1,165 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ template "aws-event-sources.fullname" . }}-controller
labels:
{{- include "aws-event-sources.labels" . | nindent 4 }}
rules:
# Record Kubernetes events
- apiGroups:
- ''
resources:
- events
verbs:
- create
- patch
- update
# Manage receive-adapters
- apiGroups:
- apps
resources:
- deployments
verbs: &all
- get
- list
- watch
- create
- update
- delete
- patch
- apiGroups:
- serving.knative.dev
resources:
- services
verbs: *all
# Read Source resources and update their statuses
- apiGroups:
- sources.triggermesh.io
resources:
- awscodecommitsources
- awscognitoidentitysources
- awscognitouserpoolsources
- awsdynamodbsources
- awsiotsources
- awskinesissources
- awssnssources
- awssqssources
verbs:
- list
- watch
- get
- patch
- apiGroups:
- sources.triggermesh.io
resources:
- awscodecommitsources/status
- awscognitoidentitysources/status
- awscognitouserpoolsources/status
- awsdynamodbsources/status
- awsiotsources/status
- awskinesissources/status
- awssnssources/status
- awssqssources/status
verbs:
- update
- apiGroups:
- sources.triggermesh.io
resources:
- awscodecommitsources/finalizers
- awscognitoidentitysources/finalizers
- awscognitouserpoolsources/finalizers
- awsdynamodbsources/finalizers
- awsiotsources/finalizers
- awskinesissources/finalizers
- awssnssources/finalizers
- awssqssources/finalizers
verbs:
- update
# Read controller configurations
- apiGroups:
- ''
resources:
- configmaps
verbs: &listwatch
- list
- watch
- apiGroups:
- ''
resources:
- configmaps
resourceNames:
- config-logging
- config-observability
- config-leader-election
verbs:
- get
# Resolve sink URIs
- apiGroups:
- ''
resources:
- services
verbs: *listwatch
- apiGroups:
- serving.knative.dev
resources:
- services
verbs: *listwatch
- apiGroups:
- eventing.knative.dev
resources:
- brokers
verbs: *listwatch
- apiGroups:
- messaging.knative.dev
resources:
- channels
verbs: *listwatch
---
# The role is needed for the aggregated role source-observer in knative-eventing to provide readonly access to "Sources".
# see https://github.com/knative/eventing/blob/release-0.14/docs/spec/sources.md#source-rbac
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ template "aws-event-sources.fullname" . }}-observer
labels:
duck.knative.dev/source: 'true'
{{- include "aws-event-sources.labels" . | nindent 4 }}
rules:
- apiGroups:
- sources.triggermesh.io
resources:
- awscodecommitsources
- awscognitoidentitysources
- awscognitouserpoolsources
- awsdynamodbsources
- awsiotsources
- awskinesissources
- awssnssources
- awssqssources
verbs:
- get
- list
- watch
{{- end }}

View File

@ -0,0 +1,102 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "aws-event-sources.fullname" . }}-controller
labels:
{{- include "aws-event-sources.labels" . | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels:
{{- include "aws-event-sources.selectorLabels" . | nindent 6}}
template:
metadata:
labels:
{{- include "aws-event-sources.labels" . | nindent 8 }}
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ template "aws-event-sources.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: controller
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy}}
terminationMessagePolicy: FallbackToLogsOnError
env:
- name: SYSTEM_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
# Logging/observability configuration
- name: CONFIG_LOGGING_NAME
value: config-logging
- name: CONFIG_OBSERVABILITY_NAME
value: config-observability
- name: METRICS_DOMAIN
value: triggermesh.io/sources
# Global settings
- name: KNATIVE_URL_SCHEME
value: {{ .Values.knative.urlScheme }}
- name: KNATIVE_DOMAIN
value: {{ .Values.knative.domain }}
# Source adapters
- name: AWSCODECOMMITSOURCE_IMAGE
value: "{{ .Values.image.registry }}/{{ .Values.adapters.awscodecommit.repository }}:{{ default .Values.image.tag .Values.adapters.awscodecommit.tag }}"
- name: AWSCOGNITOIDENTITYSOURCE_IMAGE
value: "{{ .Values.image.registry }}/{{ .Values.adapters.awscognitoidentity.repository }}:{{ default .Values.image.tag .Values.adapters.awscognitoidentity.tag }}"
- name: AWSCOGNITOUSERPOOLSOURCE_IMAGE
value: "{{ .Values.image.registry }}/{{ .Values.adapters.awscognitouserpool.repository }}:{{ default .Values.image.tag .Values.adapters.awscognitouserpool.tag }}"
- name: AWSDYNAMODBSOURCE_IMAGE
value: "{{ .Values.image.registry }}/{{ .Values.adapters.awsdynamodb.repository }}:{{ default .Values.image.tag .Values.adapters.awsdynamodb.tag }}"
- name: AWSKINESISSOURCE_IMAGE
value: "{{ .Values.image.registry }}/{{ .Values.adapters.awskinesis.repository }}:{{ default .Values.image.tag .Values.adapters.awskinesis.tag }}"
- name: AWSSNSSOURCE_IMAGE
value: "{{ .Values.image.registry }}/{{ .Values.adapters.awssns.repository }}:{{ default .Values.image.tag .Values.adapters.awssns.tag }}"
- name: AWSSQSSOURCE_IMAGE
value: "{{ .Values.image.registry }}/{{ .Values.adapters.awssqs.repository }}:{{ default .Values.image.tag .Values.adapters.awssqs.tag }}"
ports:
- name: metrics
containerPort: 9090
- name: profiling
containerPort: 8008
securityContext:
allowPrivilegeEscalation: false
{{- with .Values.securityContext }}
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

View File

@ -0,0 +1,26 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "aws-event-sources.serviceAccountName" . }}
labels:
{{- include "aws-event-sources.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,63 @@
nameOverride: ""
fullnameOverride: ""
rbac:
create: true
serviceAccount:
create: true
annotations: {}
name: ""
imagePullSecrets: []
image:
registry: gcr.io
repository: triggermesh/aws-event-sources-controller
tag: v0.3.0
pullPolicy: IfNotPresent
adapters:
awscodecommit:
repository: triggermesh/awscodecommitsource
tag: ""
awscognitoidentity:
repository: triggermesh/awscognitoidentitysource
tag: ""
awscognitouserpool:
repository: triggermesh/awscognitouserpoolsource
tag: ""
awsdynamodb:
repository: triggermesh/awsdynamodbsource
tag: ""
awskinesis:
repository: triggermesh/awskinesissource
tag: ""
awssns:
repository: triggermesh/awssnssource
tag: ""
awssqs:
repository: triggermesh/awssqssource
tag: ""
knative:
urlScheme: http
domain: example.com
podAnnotations: {}
podSecurityContext: {}
securityContext: {}
resources:
requests:
cpu: 20m
memory: 20Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

View File

@ -0,0 +1,18 @@
apiVersion: v1
name: aws-event-sources
version: 0.1.2
appVersion: 0.3.0
description: AWS Event Sources controller for Kubernetes
home: https://github.com/triggermesh/aws-event-sources
icon: file://../logo.svg
keywords:
- knative-eventing
- sources
- aws
- triggermesh
- serverless
maintainers:
- name: sameersbn
- name: antoineco
sources:
- https://github.com/triggermesh/aws-event-sources

View File

@ -0,0 +1,109 @@
# aws-event-sources
Installs TriggerMesh AWS event sources controller. The following event sources are currently supported by the controller
- Amazon CodeCommit (`kind: AWSCodeCommitSource`)
- Amazon Cognito Identity (`kind: AWSCognitoIdentitySource`)
- Amazon Cognito UserPool (`kind: AWSCognitoUserPoolSource`)
- Amazon DynamoDB (`kind: AWSDynamoDBSource`)
- Amazon Kinesis (`kind: AWSKinesisSource`)
- Amazon Simple Notification Service (`kind: AWSSNSSource`)
- Amazon Simple Queue Service (`kind: AWSSQSSource`)
Refer to [aws-event-sources/config/samples](https://github.com/triggermesh/aws-event-sources/tree/master/config/samples) for examples that make use of the controller.
## TL;DR;
```console
$ helm repo add triggermesh https://storage.googleapis.com/triggermesh-charts
$ helm install triggermesh/aws-event-sources
```
To report bugs and for feedback and support please [create a new issue](https://github.com/triggermesh/aws-event-sources/issues/new).
## Introduction
This chart installs the [aws-event-sources](https://github.com/triggermesh/aws-event-sources) controller on a Kubernetes cluster.
## Prerequisites
- Kubernetes 1.16+ with Beta APIs
- Helm 3.0+
- Knative v0.14+
## Installing the Chart
Add the TriggerMesh chart repository to Helm:
```console
$ helm repo add triggermesh https://storage.googleapis.com/triggermesh-charts
```
To install the chart with the release name `my-release`:
```console
$ helm install --name my-release triggermesh/aws-event-sources
```
The command deploys the aws-event-sources controller in the default configuration. Refer to the [configuration](#configuration) section for the complete list of parameters that can be specified to customize the deployment of the controller.
## Uninstalling the Chart
To uninstall/delete the `my-release` deployment:
```console
$ helm delete my-release
```
The Kubernetes resources associated with chart will be removed and the Helm release will be deleted.
However note that the `CustomResourceDefinition` resources created by the chart will not be removed by the delete command and therefore need to be removed manually.
```console
$ kubectl delete crd awscodecommitsources.sources.triggermesh.io
$ kubectl delete crd awscognitoidentitysources.sources.triggermesh.io
$ kubectl delete crd awscognitouserpoolsources.sources.triggermesh.io
$ kubectl delete crd awsdynamodbsources.sources.triggermesh.io
$ kubectl delete crd awsiotsources.sources.triggermesh.io
$ kubectl delete crd awskinesissources.sources.triggermesh.io
$ kubectl delete crd awssnssources.sources.triggermesh.io
$ kubectl delete crd awssqssources.sources.triggermesh.io
```
## Configuration
| Parameter | Description | Default |
|-----------------------------------------|-----------------------------------------------------|--------------------------------------------|
| `nameOverride` | Override the name for controller resources | `""` |
| `fullnameOverride` | Override the fullname for controller resources | `""` |
| `rbac.create` | Create RBAC resources | `true` |
| `serviceAccount.create` | Create service account for the controller | `true` |
| `serviceAccount.annotations` | Annotations to add to controller service account | `{}` |
| `serviceAccount.name` | Override the name for the service account | `nil` |
| `imagePullSecrets` | Specify image pull secrets | `[]` |
| `image.registry` | Image registry name | `gcr.io` |
| `image.repository` | Image repository name | `triggermesh/aws-event-sources-controller` |
| `image.tag` | Image tag | `{TAG_NAME}` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `adapter.awscodecommit.repository` | AWS CodeCommit adapter image name | `triggermesh/awscodecommitsource` |
| `adapter.awscodecommit.tag` | AWS CodeCommit adapter image tag | _defaults to value of `.image.tag`_ |
| `adapter.awscognitoidentity.repository` | AWS Cognito Identity adapter image name | `triggermesh/awscognitoidentitysource` |
| `adapter.awscognitoidentity.tag` | AWS Cognito Identity adapter image tag | _defaults to value of `.image.tag`_ |
| `adapter.awscognitouserpool.repository` | AWS Cognito Userpool adapter image name | `triggermesh/awscognitouserpoolsource` |
| `adapter.awscognitouserpool.tag` | AWS Cognito Userpool adapter image tag | _defaults to value of `.image.tag`_ |
| `adapter.awsdynamodb.repository` | AWS DynomoDB adapter image name | `triggermesh/awsdynamodbsource` |
| `adapter.awsdynamodb.tag` | AWS DynomoDB adapter image tag | _defaults to value of `.image.tag`_ |
| `adapter.awskinesis.repository` | AWS Kinesis adapter image name | `triggermesh/awskinesissource` |
| `adapter.awskinesis.tag` | AWS Kinesis adapter image tag | _defaults to value of `.image.tag`_ |
| `adapter.awssns.repository` | AWS SNS adapter image name | `triggermesh/awssnssource` |
| `adapter.awssns.tag` | AWS SNS adapter image tag | _defaults to value of `.image.tag`_ |
| `adapter.awssqs.repository` | AWS SQS adapter image name | `triggermesh/awssqssource` |
| `adapter.awssqs.tag` | AWS SQS adapter image tag | _defaults to value of `.image.tag`_ |
| `knative.domain` | Knative Domain | `example.com` |
| `knative.urlScheme` | Knative URL Scheme | `http` |
| `podAnnotations` | Annotations to add to the controller pod | `{}`` |
| `podSecurityContext` | Security context for controller pods | `{}` |
| `securityContext` | Security context for controller containers | `{}` |
| `resources` | Resource requests/limits for the controller | `{requests: {cpu: 20m, memory: 20Mi}}` |
| `nodeSelector` | Controller node selector | `{}` |
| `tolerations` | Tolerations for use with node taints | `[]` |
| `affinity` | Assign custom affinity rules to the controller pods | `{}` |

View File

@ -0,0 +1,5 @@
# TriggerMesh AWS Event Sources
[aws-event-sources](https://github.com/triggermesh/aws-event-sources) is a Kubernetes controller that implements Knative event sources for AWS services.
You may be using some Cloud services on AWS but still interested to run workloads within Kubernetes. To trigger those workloads when events happen in your AWS service you need to have an event source that can consume AWS events and send them to your workload.

View File

@ -0,0 +1,182 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awscodecommitsources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.codecommit.push" },
{ "type": "com.amazon.codecommit.pull_request" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSCodeCommitSource
plural: awscodecommitsources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:codecommit:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:.+$'
branch:
type: string
eventTypes:
type: array
items:
type: string
enum: [push, pull_request]
credentials:
type: object
properties:
accessKeyID:
type: object
properties:
value:
type: string
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
secretAccessKey:
type: object
properties:
value:
type: string
format: password
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- arn
- branch
- eventTypes
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,172 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awscognitoidentitysources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.cognito-identity.sync_trigger" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSCognitoIdentitySource
plural: awscognitoidentitysources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:cognito-identity:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:identitypool\/.+$'
credentials:
type: object
properties:
accessKeyID:
type: object
properties:
value:
type: string
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
secretAccessKey:
type: object
properties:
value:
type: string
format: password
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- arn
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,172 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awscognitouserpoolsources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.cognitouserpool.sync_trigger" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSCognitoUserPoolSource
plural: awscognitouserpoolsources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:cognito-idp:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:userpool\/.+$'
credentials:
type: object
properties:
accessKeyID:
type: object
properties:
value:
type: string
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
secretAccessKey:
type: object
properties:
value:
type: string
format: password
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- arn
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,174 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awsdynamodbsources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.dynamodb.insert" },
{ "type": "com.amazon.dynamodb.modify" },
{ "type": "com.amazon.dynamodb.remove" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSDynamoDBSource
plural: awsdynamodbsources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:dynamodb:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:table\/.+$'
credentials:
type: object
properties:
accessKeyID:
type: object
properties:
value:
type: string
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
secretAccessKey:
type: object
properties:
value:
type: string
format: password
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- arn
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,157 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awsiotsources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.iot.greetings" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSIoTSource
plural: awsiotsources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
endpoint:
type: string
format: hostname
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:iot:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:topic\/.+$'
rootCA:
type: string
rootCAPath:
type: string
certificate:
type: string
certificatePath:
type: string
privateKey:
type: string
privateKeyPath:
type: string
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- endpoint
- arn
- rootCA
- certificate
- privateKey
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,172 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awskinesissources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.kinesis.stream_record" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSKinesisSource
plural: awskinesissources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:kinesis:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:stream\/.+$'
credentials:
type: object
properties:
accessKeyID:
type: object
properties:
value:
type: string
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
secretAccessKey:
type: object
properties:
value:
type: string
format: password
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- arn
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,199 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awssnssources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.sns.notification" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSSNSSource
plural: awssnssources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:sns:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:.+$'
subscriptionAttributes:
type: object
properties:
DeliveryPolicy:
type: string
format: json
nullable: true
FilterPolicy:
type: string
format: json
nullable: true
RawMessageDelivery:
type: string
format: json
nullable: true
RedrivePolicy:
type: string
format: json
nullable: true
credentials:
type: object
properties:
accessKeyID:
type: object
properties:
value:
type: string
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
secretAccessKey:
type: object
properties:
value:
type: string
format: password
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- arn
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
address:
type: object
properties:
url:
type: string
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: URL
type: string
jsonPath: .status.address.url
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,172 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: awssqssources.sources.triggermesh.io
labels:
eventing.knative.dev/source: 'true'
duck.knative.dev/source: 'true'
knative.dev/crd-install: 'true'
annotations:
registry.knative.dev/eventTypes: |
[
{ "type": "com.amazon.sqs.message" }
]
spec:
group: sources.triggermesh.io
scope: Namespaced
names:
kind: AWSSQSSource
plural: awssqssources
categories:
- all
- knative
- eventing
- sources
versions:
- name: v1alpha1
served: true
storage: true
subresources:
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
arn:
type: string
pattern: '^arn:aws(-cn|-us-gov)?:sqs:[a-z]{2}(-gov)?-[a-z]+-\d:\d{12}:.+$'
credentials:
type: object
properties:
accessKeyID:
type: object
properties:
value:
type: string
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
secretAccessKey:
type: object
properties:
value:
type: string
format: password
valueFromSecret:
type: object
properties:
name:
type: string
key:
type: string
oneOf:
- required: ['value']
- required: ['valueFromSecret']
sink:
type: object
properties:
ref:
type: object
properties:
apiVersion:
type: string
kind:
type: string
namespace:
type: string
name:
type: string
required:
- apiVersion
- kind
- name
uri:
type: string
format: uri
oneOf:
- required: ['ref']
- required: ['uri']
required:
- arn
- sink
status:
type: object
properties:
sinkUri:
type: string
format: uri
ceAttributes:
type: array
items:
type: object
properties:
type:
type: string
source:
type: string
required:
- type
- source
observedGeneration:
type: integer
format: int64
conditions:
type: array
items:
type: object
properties:
type:
type: string
status:
type: string
enum: ['True', 'False', Unknown]
severity:
type: string
enum: [Error, Warning, Info]
reason:
type: string
message:
type: string
lastTransitionTime:
type: string
format: date-time
required:
- type
- status
additionalPrinterColumns:
- name: Ready
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].status
- name: Reason
type: string
jsonPath: .status.conditions[?(@.type=='Ready')].reason
- name: Sink
type: string
jsonPath: .status.sinkUri
- name: Age
type: date
jsonPath: .metadata.creationTimestamp

View File

@ -0,0 +1,46 @@
categories:
- Knative
- faas
- serverless
- AWS
labels:
io.rancher.certified: partner
questions:
- variable: defaultImage
default: "true"
description: "Use default Docker images"
label: Use Default Images
type: boolean
show_subquestion_if: false
group: "Container Images"
subquestions:
- variable: image.registry
default: "gcr.io"
description: "Docker image registry"
type: string
label: Image Registry
- variable: image.repository
default: "triggermesh/aws-event-sources-controller"
description: "Docker image repository"
type: string
label: Image Repository
- variable: image.tag
default: v0.3.0
description: "Docker image tag"
type: string
label: Image Tag
- variable: knative.domain
default: "example.com"
description: "Specify the Knative Domain"
type: string
required: true
label: Knative Domain
- variable: knative.urlScheme
default: "http"
description: "Specify the Knative URL Scheme"
type: string
required: true
label: Knative URL Scheme
options:
- "http"
- "https"

View File

@ -0,0 +1,9 @@
TriggerMesh AWS event sources controller for Knative has been installed.
To view the controller logs:
kubectl logs -f deploy/{{ include "aws-event-sources.fullname" . }}-controller --namespace {{ .Release.Namespace }}
Refer to https://github.com/triggermesh/aws-event-sources/tree/master/config/samples for examples that make use of the controller.
For support and feedback contact us as https://github.com/triggermesh/aws-event-sources/issues/new.

View File

@ -0,0 +1,63 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "aws-event-sources.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "aws-event-sources.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "aws-event-sources.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "aws-event-sources.labels" -}}
helm.sh/chart: {{ include "aws-event-sources.chart" . }}
{{ include "aws-event-sources.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "aws-event-sources.selectorLabels" -}}
app.kubernetes.io/name: {{ include "aws-event-sources.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "aws-event-sources.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "aws-event-sources.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,30 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if .Values.serviceAccount.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ template "aws-event-sources.fullname" . }}-controller
labels:
{{- include "aws-event-sources.labels" . | nindent 4 }}
subjects:
- kind: ServiceAccount
name: {{ template "aws-event-sources.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ template "aws-event-sources.fullname" . }}-controller
{{- end }}

View File

@ -0,0 +1,165 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ template "aws-event-sources.fullname" . }}-controller
labels:
{{- include "aws-event-sources.labels" . | nindent 4 }}
rules:
# Record Kubernetes events
- apiGroups:
- ''
resources:
- events
verbs:
- create
- patch
- update
# Manage receive-adapters
- apiGroups:
- apps
resources:
- deployments
verbs: &all
- get
- list
- watch
- create
- update
- delete
- patch
- apiGroups:
- serving.knative.dev
resources:
- services
verbs: *all
# Read Source resources and update their statuses
- apiGroups:
- sources.triggermesh.io
resources:
- awscodecommitsources
- awscognitoidentitysources
- awscognitouserpoolsources
- awsdynamodbsources
- awsiotsources
- awskinesissources
- awssnssources
- awssqssources
verbs:
- list
- watch
- get
- patch
- apiGroups:
- sources.triggermesh.io
resources:
- awscodecommitsources/status
- awscognitoidentitysources/status
- awscognitouserpoolsources/status
- awsdynamodbsources/status
- awsiotsources/status
- awskinesissources/status
- awssnssources/status
- awssqssources/status
verbs:
- update
- apiGroups:
- sources.triggermesh.io
resources:
- awscodecommitsources/finalizers
- awscognitoidentitysources/finalizers
- awscognitouserpoolsources/finalizers
- awsdynamodbsources/finalizers
- awsiotsources/finalizers
- awskinesissources/finalizers
- awssnssources/finalizers
- awssqssources/finalizers
verbs:
- update
# Read controller configurations
- apiGroups:
- ''
resources:
- configmaps
verbs: &listwatch
- list
- watch
- apiGroups:
- ''
resources:
- configmaps
resourceNames:
- config-logging
- config-observability
- config-leader-election
verbs:
- get
# Resolve sink URIs
- apiGroups:
- ''
resources:
- services
verbs: *listwatch
- apiGroups:
- serving.knative.dev
resources:
- services
verbs: *listwatch
- apiGroups:
- eventing.knative.dev
resources:
- brokers
verbs: *listwatch
- apiGroups:
- messaging.knative.dev
resources:
- channels
verbs: *listwatch
---
# The role is needed for the aggregated role source-observer in knative-eventing to provide readonly access to "Sources".
# see https://github.com/knative/eventing/blob/release-0.14/docs/spec/sources.md#source-rbac
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ template "aws-event-sources.fullname" . }}-observer
labels:
duck.knative.dev/source: 'true'
{{- include "aws-event-sources.labels" . | nindent 4 }}
rules:
- apiGroups:
- sources.triggermesh.io
resources:
- awscodecommitsources
- awscognitoidentitysources
- awscognitouserpoolsources
- awsdynamodbsources
- awsiotsources
- awskinesissources
- awssnssources
- awssqssources
verbs:
- get
- list
- watch
{{- end }}

View File

@ -0,0 +1,102 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "aws-event-sources.fullname" . }}-controller
labels:
{{- include "aws-event-sources.labels" . | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels:
{{- include "aws-event-sources.selectorLabels" . | nindent 6}}
template:
metadata:
labels:
{{- include "aws-event-sources.labels" . | nindent 8 }}
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ template "aws-event-sources.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: controller
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy}}
terminationMessagePolicy: FallbackToLogsOnError
env:
- name: SYSTEM_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
# Logging/observability configuration
- name: CONFIG_LOGGING_NAME
value: config-logging
- name: CONFIG_OBSERVABILITY_NAME
value: config-observability
- name: METRICS_DOMAIN
value: triggermesh.io/sources
# Global settings
- name: KNATIVE_URL_SCHEME
value: {{ .Values.knative.urlScheme }}
- name: KNATIVE_DOMAIN
value: {{ .Values.knative.domain }}
# Source adapters
- name: AWSCODECOMMITSOURCE_IMAGE
value: "{{ .Values.image.registry }}/{{ .Values.adapters.awscodecommit.repository }}:{{ default .Values.image.tag .Values.adapters.awscodecommit.tag }}"
- name: AWSCOGNITOIDENTITYSOURCE_IMAGE
value: "{{ .Values.image.registry }}/{{ .Values.adapters.awscognitoidentity.repository }}:{{ default .Values.image.tag .Values.adapters.awscognitoidentity.tag }}"
- name: AWSCOGNITOUSERPOOLSOURCE_IMAGE
value: "{{ .Values.image.registry }}/{{ .Values.adapters.awscognitouserpool.repository }}:{{ default .Values.image.tag .Values.adapters.awscognitouserpool.tag }}"
- name: AWSDYNAMODBSOURCE_IMAGE
value: "{{ .Values.image.registry }}/{{ .Values.adapters.awsdynamodb.repository }}:{{ default .Values.image.tag .Values.adapters.awsdynamodb.tag }}"
- name: AWSKINESISSOURCE_IMAGE
value: "{{ .Values.image.registry }}/{{ .Values.adapters.awskinesis.repository }}:{{ default .Values.image.tag .Values.adapters.awskinesis.tag }}"
- name: AWSSNSSOURCE_IMAGE
value: "{{ .Values.image.registry }}/{{ .Values.adapters.awssns.repository }}:{{ default .Values.image.tag .Values.adapters.awssns.tag }}"
- name: AWSSQSSOURCE_IMAGE
value: "{{ .Values.image.registry }}/{{ .Values.adapters.awssqs.repository }}:{{ default .Values.image.tag .Values.adapters.awssqs.tag }}"
ports:
- name: metrics
containerPort: 9090
- name: profiling
containerPort: 8008
securityContext:
allowPrivilegeEscalation: false
{{- with .Values.securityContext }}
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

View File

@ -0,0 +1,26 @@
# Copyright (c) 2020 TriggerMesh Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "aws-event-sources.serviceAccountName" . }}
labels:
{{- include "aws-event-sources.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,63 @@
nameOverride: ""
fullnameOverride: ""
rbac:
create: true
serviceAccount:
create: true
annotations: {}
name: ""
imagePullSecrets: []
image:
registry: gcr.io
repository: triggermesh/aws-event-sources-controller
tag: v0.3.0
pullPolicy: IfNotPresent
adapters:
awscodecommit:
repository: triggermesh/awscodecommitsource
tag: ""
awscognitoidentity:
repository: triggermesh/awscognitoidentitysource
tag: ""
awscognitouserpool:
repository: triggermesh/awscognitouserpoolsource
tag: ""
awsdynamodb:
repository: triggermesh/awsdynamodbsource
tag: ""
awskinesis:
repository: triggermesh/awskinesissource
tag: ""
awssns:
repository: triggermesh/awssnssource
tag: ""
awssqs:
repository: triggermesh/awssqssource
tag: ""
knative:
urlScheme: http
domain: example.com
podAnnotations: {}
podSecurityContext: {}
securityContext: {}
resources:
requests:
cpu: 20m
memory: 20Mi
nodeSelector: {}
tolerations: []
affinity: {}