Skip to content

Commit ed71115

Browse files
all: add .Cluster prefix
Update all templates to use .Cluster prefix to access cluster properties except ConfigItems. ConfigItems will be addressed by a separate change to simplify review. Signed-off-by: Alexander Yastrebov <[email protected]>
1 parent 0ccee02 commit ed71115

File tree

30 files changed

+43
-43
lines changed

30 files changed

+43
-43
lines changed

cluster/config-defaults.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ journald_reader_cpu: "1m"
374374
journald_reader_memory: "30Mi"
375375

376376
# Logging settings
377-
logging_s3_bucket: "zalando-logging-{{.InfrastructureAccount | getAWSAccountID}}-{{.Region}}"
377+
logging_s3_bucket: "zalando-logging-{{ .Cluster.InfrastructureAccount | getAWSAccountID}}-{{ .Cluster.Region }}"
378378
scalyr_team_token: ""
379379
log_destination_infra: "scalyr/stups"
380380
log_destination_both: "scalyr/main+stups"

cluster/manifests/03-ebs-csi/serviceaccount-csi-controller.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ metadata:
77
application: kubernetes
88
component: ebs-csi-driver
99
annotations:
10-
iam.amazonaws.com/role: "{{ .LocalID }}-ebs-csi-controller"
10+
iam.amazonaws.com/role: "{{ .Cluster.LocalID }}-ebs-csi-controller"

cluster/manifests/audittrail-adapter/01-rbac.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: audittrail-adapter
55
namespace: kube-system
66
annotations:
7-
iam.amazonaws.com/role: "{{ .LocalID }}-audittrail-adapter"
7+
iam.amazonaws.com/role: "{{ .Cluster.LocalID }}-audittrail-adapter"
88
---
99
apiVersion: rbac.authorization.k8s.io/v1
1010
kind: RoleBinding

cluster/manifests/audittrail-adapter/daemonset.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ spec:
3636
image: container-registry.zalando.net/teapot/audittrail-adapter:master-49
3737
env:
3838
- name: AWS_REGION
39-
value: {{.Cluster.Region}}
39+
value: "{{ .Cluster.Region }}"
4040
args:
41-
- --cluster-id={{ .ID }}
41+
- --cluster-id={{ .Cluster.ID }}
4242
- --cluster-alias={{ .Cluster.Alias }}
4343
- --audittrail-url={{ .Cluster.ConfigItems.audittrail_url }}
44-
- --s3-fallback-bucket-name=zalando-audittrail-{{accountID .InfrastructureAccount}}-{{.LocalID}}
44+
- --s3-fallback-bucket-name=zalando-audittrail-{{accountID .Cluster.InfrastructureAccount}}-{{ .Cluster.LocalID }}
4545
- --address=:8889
4646
- --metrics-address=:7980
4747
- --audittrail-timeout={{ .Cluster.ConfigItems.audittrail_adapter_timeout }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
annotations:
77
application: kubernetes
88
component: aws-node-decommissioner
9-
iam.amazonaws.com/role: "{{.LocalID}}-aws-node-decommissioner"
9+
iam.amazonaws.com/role: "{{ .Cluster.LocalID }}-aws-node-decommissioner"
1010
---
1111
apiVersion: rbac.authorization.k8s.io/v1
1212
kind: ClusterRole

cluster/manifests/cluster-lifecycle-controller/01-rbac.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: cluster-lifecycle-controller
55
namespace: kube-system
66
annotations:
7-
iam.amazonaws.com/role: "{{ .LocalID }}-cluster-lifecycle-controller"
7+
iam.amazonaws.com/role: "{{ .Cluster.LocalID }}-cluster-lifecycle-controller"
88
---
99
apiVersion: rbac.authorization.k8s.io/v1
1010
kind: ClusterRole

cluster/manifests/cluster-lifecycle-controller/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ spec:
5151
memory: 250Mi
5252
env:
5353
- name: AWS_REGION
54-
value: {{ .Region }}
54+
value: "{{ .Cluster.Region }}"
5555
nodeSelector:
5656
node.kubernetes.io/role: master

cluster/manifests/e2e-resources/pool-reserve.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{ if eq .Environment "e2e" }}
1+
{{ if eq .Cluster.Environment "e2e" }}
22
{{ range $pool := split "default-worker-splitaz,worker-limit-az,worker-combined,worker-instance-storage,worker-node-tests,worker-karpenter,worker-arm64" "," }}
33
apiVersion: apps/v1
44
kind: Deployment

cluster/manifests/efs-provisioner/cm-efs-provisioner.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ metadata:
66
namespace: kube-system
77
data:
88
file.system.id: "{{ .ConfigItems.efs_id }}"
9-
aws.region: "{{ .Region }}"
9+
aws.region: "{{ .Cluster.Region }}"
1010
provisioner.name: external-storage.alpha.kubernetes.io/aws-efs
1111
{{ end }}

cluster/manifests/efs-provisioner/depl-efs-provisioner.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ spec:
5656
volumes:
5757
- name: pv-volume
5858
nfs:
59-
server: "{{ .ConfigItems.efs_id }}.efs.{{ .Region }}.amazonaws.com"
59+
server: "{{ .ConfigItems.efs_id }}.efs.{{ .Cluster.Region }}.amazonaws.com"
6060
path: /
6161
{{ end }}

0 commit comments

Comments
 (0)