Skip to content

Commit a3c5dbc

Browse files
authored
Merge pull request #6756 from zalando-incubator/fix-etcd-userdata-change
etcd: move scalyr key to files.yaml
2 parents b7a32b5 + d5ffcbe commit a3c5dbc

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

cluster/config-defaults.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ etcd_instance_type: "t3.medium"
625625
{{end}}
626626

627627
etcd_scalyr_key: ""
628-
etcd_ami: {{ amiID "zalando-ubuntu-etcd-production-v3.5.9-amd64-main-21" "861068367966"}}
628+
etcd_ami: {{ amiID "zalando-ubuntu-etcd-production-v3.5.9-amd64-main-24" "861068367966"}}
629629

630630
dynamodb_service_link_enabled: "false"
631631

cluster/etcd/files.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ files:
1111
data: "{{ .Cluster.ConfigItems.etcd_client_server_key }}"
1212
permissions: 0400
1313
encrypted: true
14+
- path: /etc/scalyr-agent-2/userdata.yaml
15+
data: {{ printf "scalyr_api_key: %s\ncluster_alias: %s\n" .Cluster.ConfigItems.etcd_scalyr_key .Cluster.Alias | base64 }}
16+
permissions: 0400
17+
encrypted: true

cluster/etcd/stack.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@ Resources:
5151
Fn::Base64: !Sub |
5252
#cloud-config
5353
write_files:
54-
- path: /etc/scalyr-agent-2/userdata.yaml
55-
permissions: 0644
56-
content: |
57-
scalyr_api_key: "{{.Values.etcd_scalyr_key}}"
58-
stack_name: ${AWS::StackName}
5954
- path: /etc/default/etcd
6055
permissions: 0644
6156
content: |
@@ -65,7 +60,7 @@ Resources:
6560
ETCD_LOG_LEVEL=info
6661
HOSTED_ZONE="{{.Values.hosted_zone}}"
6762
S3_CERTS_BUCKET="{{ .S3GeneratedFilesPath }}"
68-
AWS_DEFAULT_REGION=eu-central-1
63+
AWS_DEFAULT_REGION="{{ .Cluster.Region }}"
6964
runcmd:
7065
- [ cfn-signal, --success, 'true', --stack, ${AWS::StackName}, --resource, AppServer, --region, ${AWS::Region} ]
7166
- [ complete-asg-lifecycle.py, 'etcd-server-lifecycle-hook' ]

0 commit comments

Comments
 (0)