Skip to content

Commit

Permalink
feat(upgrade): upgrading aws-provider and fixing warnings (#179)
Browse files Browse the repository at this point in the history
* fixing some warnings

* matching service

* reverting a test

* feat(upgrade): upbound aws-provider to 1.2.1 and clearing warnings

* upgrading eksclt as well

* apigw warning cleanup
  • Loading branch information
candonov authored Mar 25, 2024
1 parent 578a5db commit 26fcb45
Show file tree
Hide file tree
Showing 17 changed files with 137 additions and 70 deletions.
4 changes: 2 additions & 2 deletions bootstrap/eksctl/crossplane/upbound-aws-provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ kind: Provider
metadata:
name: provider-aws-upbound
spec:
package: "xpkg.upbound.io/upbound/provider-aws:v0.40.0"
package: "xpkg.upbound.io/upbound/provider-aws:v1.2.1"
controllerConfigRef:
name: provider-aws-upbound
---
Expand All @@ -23,4 +23,4 @@ spec:
args:
- --debug
- --enable-management-policies


2 changes: 1 addition & 1 deletion bootstrap/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ locals {

upbound_aws_provider = {
enable = var.enable_upbound_aws_provider # defaults to true
version = "v0.40.0"
version = "v1.2.1"
controller_config = "upbound-aws-controller-config"
provider_config_name = "aws-provider-config" #this is the providerConfigName used in all the examples in this repo
families = [
Expand Down
4 changes: 4 additions & 0 deletions compositions/upbound-aws-provider/apigw/definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ spec:
type: string
region:
type: string
tags:
additionalProperties:
type: string
type: object
required:
- region
type: object
Expand Down
53 changes: 43 additions & 10 deletions compositions/upbound-aws-provider/apigw/rest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,9 @@ spec:
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.deletionPolicy
toFieldPath: spec.deletionPolicy
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.region
toFieldPath: spec.forProvider.region
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.providerConfigName
toFieldPath: spec.providerConfigRef.name
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.tags
toFieldPath: spec.forProvider.tags
policy:
mergeOptions:
keepMapValues: true
- fromFieldPath: "metadata.name"
toFieldPath: "metadata.name"
resources:
Expand All @@ -48,6 +39,9 @@ spec:
patches:
- type: PatchSet
patchSetName: common-fields
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.region
toFieldPath: spec.forProvider.region
- type: FromCompositeFieldPath
fromFieldPath: metadata.name
toFieldPath: metadata.name
Expand Down Expand Up @@ -88,6 +82,12 @@ spec:
type: Regexp
regexp:
match: \d{12,}
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.tags
toFieldPath: spec.forProvider.tags
policy:
mergeOptions:
keepMapValues: true

- name: apigw-role
base:
Expand Down Expand Up @@ -129,6 +129,12 @@ spec:
- type: ToCompositeFieldPath
fromFieldPath: status.atProvider.id
toFieldPath: status.apigwRoleName
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.tags
toFieldPath: spec.forProvider.tags
policy:
mergeOptions:
keepMapValues: true

- name: api-deployment
base:
Expand All @@ -142,6 +148,9 @@ spec:
patches:
- type: PatchSet
patchSetName: common-fields
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.region
toFieldPath: spec.forProvider.region
- type: FromCompositeFieldPath
fromFieldPath: metadata.name
toFieldPath: metadata.name
Expand Down Expand Up @@ -184,6 +193,9 @@ spec:
patches:
- type: PatchSet
patchSetName: common-fields
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.region
toFieldPath: spec.forProvider.region
- type: FromCompositeFieldPath
fromFieldPath: metadata.name
toFieldPath: metadata.name
Expand All @@ -205,6 +217,12 @@ spec:
- type: ToCompositeFieldPath
fromFieldPath: status.atProvider.stageName
toFieldPath: status.apigwStageName
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.tags
toFieldPath: spec.forProvider.tags
policy:
mergeOptions:
keepMapValues: true

- name: api-access-logs-group
base:
Expand All @@ -217,6 +235,9 @@ spec:
patches:
- type: PatchSet
patchSetName: common-fields
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.region
toFieldPath: spec.forProvider.region
- type: FromCompositeFieldPath
fromFieldPath: metadata.name
toFieldPath: metadata.name
Expand All @@ -230,6 +251,12 @@ spec:
- type: ToCompositeFieldPath
fromFieldPath: status.atProvider.arn
toFieldPath: status.apigwAccessLogsGroupArn
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.tags
toFieldPath: spec.forProvider.tags
policy:
mergeOptions:
keepMapValues: true

- name: apigw-logging-account
base:
Expand All @@ -243,6 +270,9 @@ spec:
patches:
- type: PatchSet
patchSetName: common-fields
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.region
toFieldPath: spec.forProvider.region
- type: FromCompositeFieldPath
fromFieldPath: metadata.name
toFieldPath: metadata.name
Expand Down Expand Up @@ -270,6 +300,9 @@ spec:
patches:
- type: PatchSet
patchSetName: common-fields
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.region
toFieldPath: spec.forProvider.region
- type: FromCompositeFieldPath
fromFieldPath: metadata.name
toFieldPath: metadata.name
Expand All @@ -279,4 +312,4 @@ spec:
fmt: "%s-api-method-settings"
- type: FromCompositeFieldPath
fromFieldPath: spec.logLevel
toFieldPath: spec.forProvider.loggingLevel
toFieldPath: spec.forProvider.settings[0].loggingLevel
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ spec:
type: string
region:
type: string
tags:
additionalProperties:
type: string
description: Key-value map of resource tags.
type: object
required:
- providerConfigName
- region
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ spec:
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.providerConfigName
toFieldPath: spec.providerConfigRef.name
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.tags
toFieldPath: spec.forProvider.tags
policy:
mergeOptions:
keepMapValues: true
- fromFieldPath: "metadata.name"
toFieldPath: "metadata.name"
transforms:
Expand Down
4 changes: 4 additions & 0 deletions compositions/upbound-aws-provider/kms/definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ spec:
type: string
region:
type: string
tags:
additionalProperties:
type: string
type: object
required:
- region
type: object
Expand Down
12 changes: 6 additions & 6 deletions compositions/upbound-aws-provider/kms/kms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ spec:
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.providerConfigName
toFieldPath: spec.providerConfigRef.name
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.tags
toFieldPath: spec.forProvider.tags
policy:
mergeOptions:
keepMapValues: true
resources:
- name: key
base:
Expand All @@ -51,6 +45,12 @@ spec:
- type: ToCompositeFieldPath
fromFieldPath: status.atProvider.keyId
toFieldPath: status.keyId
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.tags
toFieldPath: spec.forProvider.tags
policy:
mergeOptions:
keepMapValues: true
- name: alais
base:
apiVersion: kms.aws.upbound.io/v1beta1
Expand Down
27 changes: 15 additions & 12 deletions compositions/upbound-aws-provider/lambda/container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@ spec:
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.deletionPolicy
toFieldPath: spec.deletionPolicy
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.region
toFieldPath: spec.forProvider.region
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.tags
toFieldPath: spec.forProvider.tags
policy:
mergeOptions:
keepMapValues: true
- fromFieldPath: "metadata.name"
toFieldPath: "metadata.name"
resources:
Expand Down Expand Up @@ -72,6 +63,12 @@ spec:
- type: FromCompositeFieldPath
fromFieldPath: spec.permissionsBoundaryArn
toFieldPath: spec.forProvider.permissionsBoundary
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.tags
toFieldPath: spec.forProvider.tags
policy:
mergeOptions:
keepMapValues: true
- name: lambda-basic-policy-attachment
base:
apiVersion: iam.aws.upbound.io/v1beta1
Expand Down Expand Up @@ -100,12 +97,12 @@ spec:
patches:
- type: PatchSet
patchSetName: common-fields
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.region
toFieldPath: spec.forProvider.region
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.providerConfigName
toFieldPath: spec.providerConfigRef.name
- type: FromCompositeFieldPath
fromFieldPath: metadata.name
toFieldPath: spec.forProvider.functionName
- type: FromCompositeFieldPath
fromFieldPath: spec.memorySize
toFieldPath: spec.forProvider.memorySize
Expand All @@ -130,3 +127,9 @@ spec:
- type: ToCompositeFieldPath
fromFieldPath: status.atProvider.id
toFieldPath: status.functionName
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.tags
toFieldPath: spec.forProvider.tags
policy:
mergeOptions:
keepMapValues: true
4 changes: 4 additions & 0 deletions compositions/upbound-aws-provider/lambda/definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ spec:
type: string
region:
type: string
tags:
additionalProperties:
type: string
type: object
required:
- region
type: object
Expand Down
27 changes: 15 additions & 12 deletions compositions/upbound-aws-provider/lambda/zip.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@ spec:
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.deletionPolicy
toFieldPath: spec.deletionPolicy
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.region
toFieldPath: spec.forProvider.region
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.tags
toFieldPath: spec.forProvider.tags
policy:
mergeOptions:
keepMapValues: true
- fromFieldPath: "metadata.name"
toFieldPath: "metadata.name"
resources:
Expand Down Expand Up @@ -72,6 +63,12 @@ spec:
- type: FromCompositeFieldPath
fromFieldPath: spec.permissionsBoundaryArn
toFieldPath: spec.forProvider.permissionsBoundary
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.tags
toFieldPath: spec.forProvider.tags
policy:
mergeOptions:
keepMapValues: true
- name: lambda-basic-policy-attachment
base:
apiVersion: iam.aws.upbound.io/v1beta1
Expand Down Expand Up @@ -105,9 +102,6 @@ spec:
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.providerConfigName
toFieldPath: spec.providerConfigRef.name
- type: FromCompositeFieldPath
fromFieldPath: metadata.name
toFieldPath: spec.forProvider.functionName
- type: FromCompositeFieldPath
fromFieldPath: spec.memorySize
toFieldPath: spec.forProvider.memorySize
Expand Down Expand Up @@ -137,6 +131,9 @@ spec:
toFieldPath: spec.forProvider.s3Key
policy:
fromFieldPath: Required
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.region
toFieldPath: spec.forProvider.region
- type: FromCompositeFieldPath
fromFieldPath: spec.envVariables
toFieldPath: spec.forProvider.environment[0].variables
Expand All @@ -149,3 +146,9 @@ spec:
- type: ToCompositeFieldPath
fromFieldPath: status.atProvider.id
toFieldPath: status.functionName
- type: FromCompositeFieldPath
fromFieldPath: spec.resourceConfig.tags
toFieldPath: spec.forProvider.tags
policy:
mergeOptions:
keepMapValues: true
4 changes: 4 additions & 0 deletions compositions/upbound-aws-provider/sns-sqs/definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ spec:
type: string
region:
type: string
tags:
additionalProperties:
type: string
type: object
required:
- region
type: object
Expand Down
Loading

0 comments on commit 26fcb45

Please sign in to comment.