Skip to content

Commit 1c7d20e

Browse files
author
Martin Linkhorst
committed
use cluster's member function instead of template functions
1 parent c7dea03 commit 1c7d20e

File tree

20 files changed

+31
-31
lines changed

20 files changed

+31
-31
lines changed

cluster/cluster.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,15 +1050,15 @@ Resources:
10501050
Effect: Allow
10511051
Resource:
10521052
- >-
1053-
arn:aws:s3:::zalando-e2e-test-{{accountID .Cluster.InfrastructureAccount}}-{{.Cluster.LocalID}}
1053+
arn:aws:s3:::zalando-e2e-test-{{.Cluster.InfrastructureAccountID}}-{{.Cluster.LocalID}}
10541054
- Action:
10551055
- 's3:PutObject'
10561056
- 's3:GetObject'
10571057
- 's3:DeleteObject'
10581058
Effect: Allow
10591059
Resource:
10601060
- >-
1061-
arn:aws:s3:::zalando-e2e-test-{{accountID .Cluster.InfrastructureAccount}}-{{.Cluster.LocalID}}/*
1061+
arn:aws:s3:::zalando-e2e-test-{{.Cluster.InfrastructureAccountID}}-{{.Cluster.LocalID}}/*
10621062
{{ end }}
10631063
Version: 2012-10-17
10641064
PolicyName: root
@@ -2417,7 +2417,7 @@ Resources:
24172417
- "s3:GetObject"
24182418
- "s3:GetObjectVersion"
24192419
Effect: Allow
2420-
Resource: "arn:aws:s3:::cluster-lifecycle-manager-{{accountID .Cluster.InfrastructureAccount}}-{{.Cluster.Region}}/*"
2420+
Resource: "arn:aws:s3:::cluster-lifecycle-manager-{{.Cluster.InfrastructureAccountID}}-{{.Cluster.Region}}/*"
24212421
Version: 2012-10-17
24222422
PolicyName: root
24232423
RoleName: "{{.Cluster.LocalID}}-static-egress-controller"
@@ -2612,7 +2612,7 @@ Resources:
26122612
Resource: '*'
26132613
- Action: 'secretsmanager:GetSecretValue'
26142614
Effect: Allow
2615-
Resource: "arn:aws:secretsmanager:{{.Cluster.Region}}:{{.Cluster.InfrastructureAccount | getAWSAccountID}}:secret:*.zmon-db-user.credentials*"
2615+
Resource: "arn:aws:secretsmanager:{{.Cluster.Region}}:{{.Cluster.InfrastructureAccountID}}:secret:*.zmon-db-user.credentials*"
26162616
Version: 2012-10-17
26172617
PolicyName: root
26182618
RoleName: "{{.Cluster.LocalID}}-app-zmon"
@@ -2909,15 +2909,15 @@ Resources:
29092909
Effect: Allow
29102910
Resource:
29112911
- >-
2912-
arn:aws:s3:::zalando-e2e-test-{{accountID .Cluster.InfrastructureAccount}}-{{.Cluster.LocalID}}
2912+
arn:aws:s3:::zalando-e2e-test-{{.Cluster.InfrastructureAccountID}}-{{.Cluster.LocalID}}
29132913
- Action:
29142914
- 's3:PutObject'
29152915
- 's3:GetObject'
29162916
- 's3:DeleteObject'
29172917
Effect: Allow
29182918
Resource:
29192919
- >-
2920-
arn:aws:s3:::zalando-e2e-test-{{accountID .Cluster.InfrastructureAccount}}-{{.Cluster.LocalID}}/*
2920+
arn:aws:s3:::zalando-e2e-test-{{.Cluster.InfrastructureAccountID}}-{{.Cluster.LocalID}}/*
29212921
Version: 2012-10-17
29222922
PolicyName: root
29232923
RoleName: "{{.Cluster.LocalID}}-e2e-aws-iam-test"
@@ -2926,7 +2926,7 @@ Resources:
29262926
Type: AWS::S3::Bucket
29272927
DeletionPolicy: Delete
29282928
Properties:
2929-
BucketName: "zalando-e2e-test-{{accountID .Cluster.InfrastructureAccount}}-{{.Cluster.LocalID}}"
2929+
BucketName: "zalando-e2e-test-{{.Cluster.InfrastructureAccountID}}-{{.Cluster.LocalID}}"
29302930
LifecycleConfiguration:
29312931
Rules:
29322932
- AbortIncompleteMultipartUpload:

cluster/config-defaults.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ journald_reader_cpu: "1m"
470470
journald_reader_memory: "30Mi"
471471

472472
# Logging settings
473-
logging_s3_bucket: "zalando-logging-{{ .Cluster.InfrastructureAccount | getAWSAccountID}}-{{ .Cluster.Region }}"
473+
logging_s3_bucket: "zalando-logging-{{ .Cluster.InfrastructureAccountID }}-{{ .Cluster.Region }}"
474474
scalyr_team_token: ""
475475
log_destination_infra: "scalyr/stups"
476476
log_destination_both: "scalyr/main+stups"
@@ -801,7 +801,7 @@ audittrail_adapter_cpu: "50m"
801801
audittrail_adapter_memory: "200Mi"
802802

803803
audittrail_adapter_timeout: "2s"
804-
audittrail_bucket_name: "zalando-audittrail-{{ .Cluster.InfrastructureAccount | getAWSAccountID }}-{{ .Cluster.LocalID }}"
804+
audittrail_bucket_name: "zalando-audittrail-{{ .Cluster.InfrastructureAccountID }}-{{ .Cluster.LocalID }}"
805805

806806
# When enabled, any read-only events are added to the metrics, but are dropped
807807
# before being sent to audittrail-api.
@@ -1044,7 +1044,7 @@ deployment_service_cf_auto_expand_enabled: "false"
10441044
deployment_service_cf_update_source_branch_changes: "true"
10451045
deployment_service_executor_cdp_permissions: "false"
10461046
deployment_service_skip_mustache_rendering: "true"
1047-
deployment_service_bucket_name: "zalando-deployment-service-{{ .Cluster.InfrastructureAccount | getAWSAccountID }}-{{ .Cluster.LocalID }}"
1047+
deployment_service_bucket_name: "zalando-deployment-service-{{ .Cluster.InfrastructureAccountID }}-{{ .Cluster.LocalID }}"
10481048
{{- if eq .Cluster.Environment "test" }}
10491049
# disable CF update of source branch changes in test to avoid updating CF stacks
10501050
# on any PR.

cluster/manifests/02-admission-control/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ data:
3030
pod.default.dns-ndots: "{{ .Cluster.ConfigItems.teapot_admission_controller_ndots }}"
3131
pod.parent-resource-hash.enable: "{{ .Cluster.ConfigItems.teapot_admission_controller_parent_resource_hash }}"
3232
pod.service-account-iam.enable: "true"
33-
pod.service-account-iam.base-aws-account-id: "{{ accountID .Cluster.InfrastructureAccount }}"
33+
pod.service-account-iam.base-aws-account-id: "{{ .Cluster.InfrastructureAccountID }}"
3434
{{- if eq .Cluster.ConfigItems.teapot_admission_controller_inject_aws_waiter "true" }}
3535
pod.aws-waiter.image: "926694233939.dkr.ecr.eu-central-1.amazonaws.com/production_namespace/automata/aws-credentials-waiter:master-266"
3636
{{- end }}

cluster/manifests/aws-load-balancer-controller/serviceaccount.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ metadata:
88
application: kubernetes
99
component: aws-load-balancer-controller
1010
annotations:
11-
eks.amazonaws.com/role-arn: "arn:aws:iam::{{.Cluster.InfrastructureAccount | getAWSAccountID}}:role/aws-load-balancer-controller-{{.Cluster.Name}}"
11+
eks.amazonaws.com/role-arn: "arn:aws:iam::{{.Cluster.InfrastructureAccountID}}:role/aws-load-balancer-controller-{{.Cluster.Name}}"
1212
# {{- end }}

cluster/manifests/aws-node-decommissioner/01-rbac.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
component: aws-node-decommissioner
99
annotations:
1010
{{- if eq .Cluster.Provider "zalando-eks"}}
11-
eks.amazonaws.com/role-arn: "arn:aws:iam::{{.Cluster.InfrastructureAccount | getAWSAccountID}}:role/{{ .Cluster.LocalID }}-aws-node-decommissioner"
11+
eks.amazonaws.com/role-arn: "arn:aws:iam::{{.Cluster.InfrastructureAccountID}}:role/{{ .Cluster.LocalID }}-aws-node-decommissioner"
1212
{{- else}}
1313
iam.amazonaws.com/role: "{{ .Cluster.LocalID }}-aws-node-decommissioner"
1414
{{- end}}

cluster/manifests/deployment-service/01-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: deployment-config
55
namespace: kube-system
66
data:
7-
aws-account-id: "{{accountID .Cluster.InfrastructureAccount}}"
7+
aws-account-id: "{{.Cluster.InfrastructureAccountID}}"
88
aws-account-name: "{{.Cluster.AccountName}}"
99
cluster-alias: "{{.Cluster.Alias}}"
1010
cluster-provider: "{{.Cluster.Provider}}"
@@ -19,9 +19,9 @@ data:
1919
s3-bucket-name: "{{ .Cluster.ConfigItems.deployment_service_bucket_name }}"
2020
status-service-url: "https://depl-status-{{.Cluster.Alias}}.{{.Values.hosted_zone}}"
2121
status-service-url-local: "http://deployment-status-service.ingress.cluster.local."
22-
deployment-role-arn: "arn:aws:iam::{{accountID .Cluster.InfrastructureAccount}}:role/{{.Cluster.LocalID}}-deployment-service-deployment"
22+
deployment-role-arn: "arn:aws:iam::{{.Cluster.InfrastructureAccountID}}:role/{{.Cluster.LocalID}}-deployment-service-deployment"
2323
{{- if eq .Cluster.ConfigItems.deployment_service_ml_experiments_enabled "true"}}
24-
ml-experiment-deployment-role-arn: "arn:aws:iam::{{accountID .Cluster.InfrastructureAccount}}:role/{{ .Cluster.ConfigItems.deployment_service_ml_experiments_role_name }}"
24+
ml-experiment-deployment-role-arn: "arn:aws:iam::{{.Cluster.InfrastructureAccountID}}:role/{{ .Cluster.ConfigItems.deployment_service_ml_experiments_role_name }}"
2525
{{- end }}
2626
cloudformation-enable-auto-expand: "{{.Cluster.ConfigItems.deployment_service_cf_auto_expand_enabled}}"
2727
cloudformation-update-source-branch-changes: "{{.Cluster.ConfigItems.deployment_service_cf_update_source_branch_changes}}"

cluster/manifests/deployment-service/controller-rbac.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
component: "controller"
99
annotations:
1010
{{- if eq .Cluster.Provider "zalando-eks" }}
11-
eks.amazonaws.com/role-arn: "arn:aws:iam::{{.Cluster.InfrastructureAccount | getAWSAccountID}}:role/{{.Cluster.LocalID}}-deployment-service-controller"
11+
eks.amazonaws.com/role-arn: "arn:aws:iam::{{.Cluster.InfrastructureAccountID}}:role/{{.Cluster.LocalID}}-deployment-service-controller"
1212
{{- else }}
1313
iam.amazonaws.com/role: "{{.Cluster.LocalID}}-deployment-service-controller"
1414
{{- end }}

cluster/manifests/deployment-service/controller-statefulset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ spec:
3232
image: "container-registry.zalando.net/teapot/deployment-controller:master-263"
3333
args:
3434
- "--config-namespace=kube-system"
35-
- "--decrypt-kms-alias-arn=arn:aws:kms:{{ .Cluster.Region }}:{{ .Cluster.InfrastructureAccount | getAWSAccountID }}:alias/deployment-secret"
35+
- "--decrypt-kms-alias-arn=arn:aws:kms:{{ .Cluster.Region }}:{{ .Cluster.InfrastructureAccountID }}:alias/deployment-secret"
3636
# {{ if eq .Cluster.Provider "zalando-eks" }}
3737
- --use-service-account
3838
# {{ end }}

cluster/manifests/deployment-service/status-service-rbac.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
component: "status-service"
99
annotations:
1010
{{- if eq .Cluster.Provider "zalando-eks" }}
11-
eks.amazonaws.com/role-arn: "arn:aws:iam::{{.Cluster.InfrastructureAccount | getAWSAccountID}}:role/{{.Cluster.LocalID}}-deployment-service-status-service"
11+
eks.amazonaws.com/role-arn: "arn:aws:iam::{{.Cluster.InfrastructureAccountID}}:role/{{.Cluster.LocalID}}-deployment-service-status-service"
1212
{{- else }}
1313
iam.amazonaws.com/role: "{{.Cluster.LocalID}}-deployment-service-status-service"
1414
{{- end }}

cluster/manifests/external-dns/01-rbac.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
component: external-dns
1010
annotations:
1111
{{- if eq .Cluster.Provider "zalando-eks"}}
12-
eks.amazonaws.com/role-arn: "arn:aws:iam::{{.Cluster.InfrastructureAccount | getAWSAccountID}}:role/{{ .Cluster.LocalID }}-app-external-dns"
12+
eks.amazonaws.com/role-arn: "arn:aws:iam::{{.Cluster.InfrastructureAccountID}}:role/{{ .Cluster.LocalID }}-app-external-dns"
1313
{{- else}}
1414
iam.amazonaws.com/role: "{{ .Cluster.LocalID }}-app-external-dns"
1515
{{- end}}

0 commit comments

Comments
 (0)