-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* dynamo irsa
- Loading branch information
Showing
41 changed files
with
600 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
163 changes: 163 additions & 0 deletions
163
compositions/upbound-aws-provider/dynamo-irsa/definition.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
apiVersion: apiextensions.crossplane.io/v1 | ||
kind: CompositeResourceDefinition | ||
metadata: | ||
name: xdynamoirsas.awsblueprints.io | ||
spec: | ||
claimNames: | ||
kind: DynamoIRSA | ||
plural: dynamoirsas | ||
group: awsblueprints.io | ||
names: | ||
kind: XDynamoIRSA | ||
plural: xdynamoirsas | ||
connectionSecretKeys: | ||
- tableName | ||
versions: | ||
- name: v1alpha1 | ||
served: true | ||
referenceable: true | ||
schema: | ||
openAPIV3Schema: | ||
type: object | ||
description: DYNAMOIRSA is the Schema for the dynamoirsas API | ||
properties: | ||
spec: | ||
type: object | ||
properties: | ||
policyArns: | ||
items: | ||
type: string | ||
type: array | ||
resourceConfig: | ||
properties: | ||
deletionPolicy: | ||
description: Defaults to Delete | ||
enum: | ||
- Delete | ||
- Orphan | ||
type: string | ||
name: | ||
type: string | ||
providerConfigName: | ||
type: string | ||
default: aws-provider-config | ||
region: | ||
type: string | ||
tags: | ||
additionalProperties: | ||
type: string | ||
description: Key-value map of resource tags. | ||
type: object | ||
required: | ||
- region | ||
type: object | ||
dynamoConfig: | ||
properties: | ||
attribute: #required for hashKey and/or rangeKey | ||
items: | ||
properties: | ||
name: #name of the hashKey and/or rangeKey | ||
type: string | ||
type: | ||
enum: | ||
- B #binary | ||
- N #number | ||
- S #string | ||
type: string | ||
required: | ||
- name | ||
- type | ||
type: object | ||
type: array | ||
hashKey: | ||
type: string | ||
rangeKey: | ||
type: string | ||
billingMode: | ||
type: string | ||
default: PAY_PER_REQUEST | ||
readCapacity: | ||
type: number | ||
writeCapacity: | ||
type: number | ||
globalSecondaryIndex: | ||
items: | ||
properties: | ||
hashKey: | ||
type: string | ||
name: | ||
type: string | ||
rangeKey: | ||
type: string | ||
readCapacity: | ||
type: number | ||
writeCapacity: | ||
type: number | ||
projectionType: | ||
type: string | ||
nonKeyAttributes: #required for gsi | ||
items: | ||
type: string | ||
type: array | ||
type: object | ||
required: | ||
- hashKey | ||
- name | ||
- rangeKey | ||
- readCapacity | ||
- writeCapacity | ||
- projectionType | ||
- nonKeyAttributes | ||
type: array | ||
localSecondaryIndex: | ||
items: | ||
properties: | ||
name: | ||
type: string | ||
rangeKey: | ||
type: string | ||
projectionType: | ||
type: string | ||
nonKeyAttributes: #required for lsi | ||
items: | ||
type: string | ||
type: array | ||
type: object | ||
required: | ||
- name | ||
- rangeKey | ||
- projectionType | ||
- nonKeyAttributes | ||
type: array | ||
providerConfigName: | ||
type: string | ||
default: aws-provider-config | ||
region: | ||
type: string | ||
tags: | ||
additionalProperties: | ||
type: string | ||
description: Key-value map of resource tags. | ||
type: object | ||
required: | ||
- attribute | ||
- hashKey | ||
type: object | ||
required: | ||
- resourceConfig | ||
- dynamoConfig | ||
status: | ||
type: object | ||
description: DYNAMOIRSAStatus defines the observed state of DYNAMOIRSA | ||
properties: | ||
roleName: | ||
type: string | ||
tableArn: | ||
type: string | ||
tableName: | ||
type: string | ||
required: | ||
- spec |
77 changes: 77 additions & 0 deletions
77
compositions/upbound-aws-provider/dynamo-irsa/dynamo-irsa.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: MIT-0 | ||
|
||
apiVersion: apiextensions.crossplane.io/v1 | ||
kind: Composition | ||
metadata: | ||
name: xdynamoirsa.awsblueprints.io | ||
annotations: | ||
argocd.argoproj.io/sync-wave: "-10" | ||
labels: | ||
awsblueprints.io/provider: aws | ||
awsblueprints.io/environment: dev | ||
spec: | ||
writeConnectionSecretsToNamespace: crossplane-system | ||
compositeTypeRef: | ||
apiVersion: awsblueprints.io/v1alpha1 | ||
kind: XDynamoIRSA | ||
patchSets: | ||
- name: common-fields-composition | ||
patches: | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: spec.resourceConfig | ||
toFieldPath: spec.resourceConfig | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: spec.dynamoConfig | ||
toFieldPath: spec.dynamoConfig | ||
resources: | ||
- name: dynamodbtable | ||
connectionDetails: | ||
- type: FromFieldPath | ||
name: tableName | ||
fromFieldPath: status.tableName | ||
base: | ||
apiVersion: awsblueprints.io/v1alpha1 | ||
kind: XDynamoDBTable | ||
patches: | ||
- type: PatchSet | ||
patchSetName: common-fields-composition | ||
- type: ToCompositeFieldPath | ||
fromFieldPath: status.tableName | ||
toFieldPath: status.tableName | ||
- type: ToCompositeFieldPath | ||
fromFieldPath: status.tableArn | ||
toFieldPath: status.tableArn | ||
- name: irsa | ||
base: | ||
apiVersion: awsblueprints.io/v1alpha1 | ||
kind: XIRSA | ||
patches: | ||
- type: PatchSet | ||
patchSetName: common-fields-composition | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: metadata.labels[crossplane.io/claim-name] | ||
toFieldPath: spec.serviceAccountName | ||
- type: ToCompositeFieldPath | ||
fromFieldPath: status.roleName | ||
toFieldPath: status.roleName | ||
- name: irsa-dynamo-policy | ||
base: | ||
apiVersion: awsblueprints.io/v1alpha1 | ||
kind: IAMPolicy | ||
spec: | ||
compositionSelector: | ||
matchLabels: | ||
awsblueprints.io/provider: aws | ||
awsblueprints.io/environment: dev | ||
iam.awsblueprints.io/policy-type: write | ||
iam.awsblueprints.io/service: dynamodb | ||
patches: | ||
- type: PatchSet | ||
patchSetName: common-fields-composition | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: status.roleName | ||
toFieldPath: spec.roleName | ||
- type: FromCompositeFieldPath | ||
fromFieldPath: status.tableArn | ||
toFieldPath: spec.resourceArn |
5 changes: 5 additions & 0 deletions
5
compositions/upbound-aws-provider/dynamo-irsa/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- definition.yaml | ||
- dynamo-irsa.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
compositions/upbound-aws-provider/dynamodb/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- definition.yaml | ||
- table.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.