Skip to content
This repository has been archived by the owner on Nov 7, 2019. It is now read-only.

Commit

Permalink
Merge pull request #70 from christopherhein/bug/using-s3-name-vs-dynamo
Browse files Browse the repository at this point in the history
Use Dynamo Variable Name vs S3 for ConfigMap
  • Loading branch information
Christopher Hein authored Sep 7, 2018
2 parents 1d1d06a + 09b1b46 commit 9711dd7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion models/dynamodb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ spec:
templateKey: TableArn
additionalResources:
configMaps:
- name: s3BucketCM
- name: dynamoCM
data:
- key: tableName
value: "{{.Obj.Output.TableName}}"
Expand Down
6 changes: 3 additions & 3 deletions pkg/operator/dynamodb/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,13 @@ func syncAdditionalResources(config *config.Config, s *awsV1alpha1.DynamoDB) (er
resource = resource.DeepCopy()

configmaps := []string{}
s3BucketCMData := map[string]string{
dynamoCMData := map[string]string{
"tableName": "{{.Obj.Output.TableName}}",
"tableARN": "{{.Obj.Output.TableARN}}",
"region": "{{.Config.Region}}",
}
s3BucketCM := helpers.CreateConfigMap(config, s, s.Name, s.Namespace, s3BucketCMData)
configmaps = append(configmaps, s3BucketCM)
dynamoCM := helpers.CreateConfigMap(config, s, s.Name, s.Namespace, dynamoCMData)
configmaps = append(configmaps, dynamoCM)
resource.AdditionalResources.ConfigMaps = configmaps

_, err = clientSet.DynamoDBs(s.Namespace).Update(resource)
Expand Down

0 comments on commit 9711dd7

Please sign in to comment.